From ab6080f9449815fe244f6717e0a299c44eaa9c0a Mon Sep 17 00:00:00 2001 From: AD4MANTIS <31745687+AD4MANTIS@users.noreply.github.com> Date: Wed, 12 Jun 2024 22:21:41 +0200 Subject: [PATCH 1/6] Implemented subdivisions for US & DE --- .gitignore | 2 +- Cargo.toml | 10 + gen.py | 196 +++-- src/build.rs | 776 ++++++++++++++----- src/builder.rs | 8 +- src/country.rs | 519 +++++++++++++ src/data/ae.rs | 2 +- src/data/am.rs | 2 +- src/data/ao.rs | 2 +- src/data/ar.rs | 96 +-- src/data/at.rs | 2 +- src/data/au.rs | 2 +- src/data/aw.rs | 2 +- src/data/az.rs | 62 +- src/data/ba.rs | 2 +- src/data/bd.rs | 2 +- src/data/be.rs | 2 +- src/data/bg.rs | 1490 ++++++++++++++++++------------------ src/data/bi.rs | 2 +- src/data/bo.rs | 2 +- src/data/br.rs | 2 +- src/data/bw.rs | 2 +- src/data/by.rs | 2 +- src/data/ca.rs | 2 +- src/data/ch.rs | 2 +- src/data/cl.rs | 2 +- src/data/cn.rs | 2 +- src/data/co.rs | 2 +- src/data/cu.rs | 2 +- src/data/cw.rs | 2 +- src/data/cy.rs | 2 +- src/data/cz.rs | 2 +- src/data/de.rs | 2 +- src/data/de_bb.rs | 975 ++++++++++++++++++++++++ src/data/de_be.rs | 921 ++++++++++++++++++++++ src/data/de_bw.rs | 976 ++++++++++++++++++++++++ src/data/de_by.rs | 1007 ++++++++++++++++++++++++ src/data/de_byp.rs | 976 ++++++++++++++++++++++++ src/data/de_hb.rs | 896 ++++++++++++++++++++++ src/data/de_he.rs | 914 ++++++++++++++++++++++ src/data/de_hh.rs | 896 ++++++++++++++++++++++ src/data/de_mv.rs | 945 +++++++++++++++++++++++ src/data/de_ni.rs | 896 ++++++++++++++++++++++ src/data/de_nw.rs | 945 +++++++++++++++++++++++ src/data/de_rp.rs | 945 +++++++++++++++++++++++ src/data/de_sh.rs | 896 ++++++++++++++++++++++ src/data/de_sl.rs | 976 ++++++++++++++++++++++++ src/data/de_sn.rs | 944 +++++++++++++++++++++++ src/data/de_st.rs | 944 +++++++++++++++++++++++ src/data/de_th.rs | 925 ++++++++++++++++++++++ src/data/dj.rs | 2 +- src/data/dk.rs | 2 +- src/data/do.rs | 2 +- src/data/ee.rs | 2 +- src/data/eg.rs | 2 +- src/data/es.rs | 2 +- src/data/et.rs | 2 +- src/data/fi.rs | 2 +- src/data/fr.rs | 2 +- src/data/gb.rs | 2 +- src/data/ge.rs | 2 +- src/data/gr.rs | 2 +- src/data/helper.rs | 7 +- src/data/hk.rs | 46 +- src/data/hn.rs | 2 +- src/data/hr.rs | 506 ++++++------ src/data/hu.rs | 2 +- src/data/id.rs | 2 +- src/data/ie.rs | 2 +- src/data/il.rs | 2 +- src/data/im.rs | 2 +- src/data/in.rs | 2 +- src/data/is.rs | 2 +- src/data/it.rs | 2 +- src/data/jm.rs | 2 +- src/data/jp.rs | 2 +- src/data/ke.rs | 2 +- src/data/kr.rs | 2 +- src/data/kz.rs | 2 +- src/data/li.rs | 2 +- src/data/ls.rs | 2 +- src/data/lt.rs | 2 +- src/data/lu.rs | 2 +- src/data/lv.rs | 52 +- src/data/ma.rs | 2 +- src/data/md.rs | 694 ++++++++--------- src/data/mg.rs | 2 +- src/data/mk.rs | 2 +- src/data/mod.rs | 222 ++++++ src/data/mt.rs | 2 +- src/data/mw.rs | 2 +- src/data/mx.rs | 2 +- src/data/my.rs | 2 +- src/data/mz.rs | 2 +- src/data/na.rs | 2 +- src/data/ng.rs | 2 +- src/data/ni.rs | 2 +- src/data/nl.rs | 2 +- src/data/no.rs | 2 +- src/data/nz.rs | 2 +- src/data/pe.rs | 2 +- src/data/pk.rs | 2 +- src/data/pl.rs | 2 +- src/data/pt.rs | 2 +- src/data/py.rs | 2 +- src/data/ro.rs | 2 +- src/data/rs.rs | 2 +- src/data/ru.rs | 2 +- src/data/sa.rs | 2 +- src/data/se.rs | 2 +- src/data/sg.rs | 2 +- src/data/si.rs | 2 +- src/data/sk.rs | 2 +- src/data/sz.rs | 2 +- src/data/tn.rs | 2 +- src/data/tr.rs | 2 +- src/data/tw.rs | 2 +- src/data/ua.rs | 2 +- src/data/us.rs | 2 +- src/data/us_ak.rs | 1148 ++++++++++++++++++++++++++++ src/data/us_al.rs | 1347 ++++++++++++++++++++++++++++++++ src/data/us_ar.rs | 975 ++++++++++++++++++++++++ src/data/us_as.rs | 1085 ++++++++++++++++++++++++++ src/data/us_az.rs | 1006 ++++++++++++++++++++++++ src/data/us_ca.rs | 1237 ++++++++++++++++++++++++++++++ src/data/us_co.rs | 1005 ++++++++++++++++++++++++ src/data/us_ct.rs | 1104 +++++++++++++++++++++++++++ src/data/us_dc.rs | 1107 +++++++++++++++++++++++++++ src/data/us_de.rs | 1018 +++++++++++++++++++++++++ src/data/us_fl.rs | 1055 +++++++++++++++++++++++++ src/data/us_ga.rs | 1148 ++++++++++++++++++++++++++++ src/data/us_gu.rs | 1223 +++++++++++++++++++++++++++++ src/data/us_hi.rs | 1233 ++++++++++++++++++++++++++++++ src/data/us_ia.rs | 1042 +++++++++++++++++++++++++ src/data/us_id.rs | 1006 ++++++++++++++++++++++++ src/data/us_il.rs | 1116 +++++++++++++++++++++++++++ src/data/us_in.rs | 1099 ++++++++++++++++++++++++++ src/data/us_ks.rs | 1019 +++++++++++++++++++++++++ src/data/us_ky.rs | 1030 +++++++++++++++++++++++++ src/data/us_la.rs | 1056 +++++++++++++++++++++++++ src/data/us_ma.rs | 1108 +++++++++++++++++++++++++++ src/data/us_md.rs | 1105 +++++++++++++++++++++++++++ src/data/us_me.rs | 1073 ++++++++++++++++++++++++++ src/data/us_mi.rs | 1043 +++++++++++++++++++++++++ src/data/us_mn.rs | 975 ++++++++++++++++++++++++ src/data/us_mo.rs | 1069 ++++++++++++++++++++++++++ src/data/us_mp.rs | 1452 +++++++++++++++++++++++++++++++++++ src/data/us_ms.rs | 1099 ++++++++++++++++++++++++++ src/data/us_mt.rs | 1018 +++++++++++++++++++++++++ src/data/us_nc.rs | 1266 ++++++++++++++++++++++++++++++ src/data/us_nd.rs | 975 ++++++++++++++++++++++++ src/data/us_ne.rs | 1070 ++++++++++++++++++++++++++ src/data/us_nh.rs | 1111 +++++++++++++++++++++++++++ src/data/us_nj.rs | 1116 +++++++++++++++++++++++++++ src/data/us_nm.rs | 949 +++++++++++++++++++++++ src/data/us_nv.rs | 1037 +++++++++++++++++++++++++ src/data/us_ny.rs | 1185 ++++++++++++++++++++++++++++ src/data/us_oh.rs | 1006 ++++++++++++++++++++++++ src/data/us_ok.rs | 1099 ++++++++++++++++++++++++++ src/data/us_or.rs | 975 ++++++++++++++++++++++++ src/data/us_pa.rs | 1130 +++++++++++++++++++++++++++ src/data/us_pr.rs | 1089 ++++++++++++++++++++++++++ src/data/us_ri.rs | 1064 ++++++++++++++++++++++++++ src/data/us_sc.rs | 1099 ++++++++++++++++++++++++++ src/data/us_sd.rs | 1099 ++++++++++++++++++++++++++ src/data/us_tn.rs | 1006 ++++++++++++++++++++++++ src/data/us_tx.rs | 1821 ++++++++++++++++++++++++++++++++++++++++++++ src/data/us_um.rs | 975 ++++++++++++++++++++++++ src/data/us_ut.rs | 1069 ++++++++++++++++++++++++++ src/data/us_va.rs | 1067 ++++++++++++++++++++++++++ src/data/us_vi.rs | 1327 ++++++++++++++++++++++++++++++++ src/data/us_vt.rs | 1162 ++++++++++++++++++++++++++++ src/data/us_wa.rs | 975 ++++++++++++++++++++++++ src/data/us_wi.rs | 1153 ++++++++++++++++++++++++++++ src/data/us_wv.rs | 1200 +++++++++++++++++++++++++++++ src/data/us_wy.rs | 975 ++++++++++++++++++++++++ src/data/uy.rs | 2 +- src/data/uz.rs | 2 +- src/data/ve.rs | 2 +- src/data/vn.rs | 2 +- src/data/za.rs | 2 +- src/data/zm.rs | 2 +- src/data/zw.rs | 2 +- src/lib.rs | 44 +- tests/test.rs | 16 + 185 files changed, 82053 insertions(+), 1859 deletions(-) create mode 100644 src/data/de_bb.rs create mode 100644 src/data/de_be.rs create mode 100644 src/data/de_bw.rs create mode 100644 src/data/de_by.rs create mode 100644 src/data/de_byp.rs create mode 100644 src/data/de_hb.rs create mode 100644 src/data/de_he.rs create mode 100644 src/data/de_hh.rs create mode 100644 src/data/de_mv.rs create mode 100644 src/data/de_ni.rs create mode 100644 src/data/de_nw.rs create mode 100644 src/data/de_rp.rs create mode 100644 src/data/de_sh.rs create mode 100644 src/data/de_sl.rs create mode 100644 src/data/de_sn.rs create mode 100644 src/data/de_st.rs create mode 100644 src/data/de_th.rs create mode 100644 src/data/us_ak.rs create mode 100644 src/data/us_al.rs create mode 100644 src/data/us_ar.rs create mode 100644 src/data/us_as.rs create mode 100644 src/data/us_az.rs create mode 100644 src/data/us_ca.rs create mode 100644 src/data/us_co.rs create mode 100644 src/data/us_ct.rs create mode 100644 src/data/us_dc.rs create mode 100644 src/data/us_de.rs create mode 100644 src/data/us_fl.rs create mode 100644 src/data/us_ga.rs create mode 100644 src/data/us_gu.rs create mode 100644 src/data/us_hi.rs create mode 100644 src/data/us_ia.rs create mode 100644 src/data/us_id.rs create mode 100644 src/data/us_il.rs create mode 100644 src/data/us_in.rs create mode 100644 src/data/us_ks.rs create mode 100644 src/data/us_ky.rs create mode 100644 src/data/us_la.rs create mode 100644 src/data/us_ma.rs create mode 100644 src/data/us_md.rs create mode 100644 src/data/us_me.rs create mode 100644 src/data/us_mi.rs create mode 100644 src/data/us_mn.rs create mode 100644 src/data/us_mo.rs create mode 100644 src/data/us_mp.rs create mode 100644 src/data/us_ms.rs create mode 100644 src/data/us_mt.rs create mode 100644 src/data/us_nc.rs create mode 100644 src/data/us_nd.rs create mode 100644 src/data/us_ne.rs create mode 100644 src/data/us_nh.rs create mode 100644 src/data/us_nj.rs create mode 100644 src/data/us_nm.rs create mode 100644 src/data/us_nv.rs create mode 100644 src/data/us_ny.rs create mode 100644 src/data/us_oh.rs create mode 100644 src/data/us_ok.rs create mode 100644 src/data/us_or.rs create mode 100644 src/data/us_pa.rs create mode 100644 src/data/us_pr.rs create mode 100644 src/data/us_ri.rs create mode 100644 src/data/us_sc.rs create mode 100644 src/data/us_sd.rs create mode 100644 src/data/us_tn.rs create mode 100644 src/data/us_tx.rs create mode 100644 src/data/us_um.rs create mode 100644 src/data/us_ut.rs create mode 100644 src/data/us_va.rs create mode 100644 src/data/us_vi.rs create mode 100644 src/data/us_vt.rs create mode 100644 src/data/us_wa.rs create mode 100644 src/data/us_wi.rs create mode 100644 src/data/us_wv.rs create mode 100644 src/data/us_wy.rs diff --git a/.gitignore b/.gitignore index e809c62..9c96ccb 100644 --- a/.gitignore +++ b/.gitignore @@ -9,4 +9,4 @@ Cargo.lock # These are backup files generated by rustfmt **/*.rs.bk -poetry.lock +poetry.lock \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml index 31a4720..0d7a6ee 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -225,3 +225,13 @@ VE = [] VN = [] ZM = [] ZW = [] + +[lints.rust] +unsafe_code = "forbid" + +[lints.clippy] +enum_glob_use = "forbid" +pedantic = { level = "deny", priority = -1 } +missing_errors_doc = "allow" +too_many_lines = "allow" +wildcard_imports = "allow" diff --git a/gen.py b/gen.py index 6c67adf..cac2a9d 100644 --- a/gen.py +++ b/gen.py @@ -7,6 +7,8 @@ class Country: code: str name: str + subdivision_code: str = None + subdivision_name: str = None countries = [ @@ -45,6 +47,23 @@ class Country: Country("FR", "France"), Country("GE", "Georgia"), Country("DE", "Germany"), + Country("DE", "Germany", "BB", "Brandenburg"), + Country("DE", "Germany", "BE", "Berlin"), + Country("DE", "Germany", "BW", "Baden-Württemberg"), + Country("DE", "Germany", "BY", "Bavaria (Bayern)"), + Country("DE", "Germany", "BYP", "Bavaria (Bayern) with more protestants"), + Country("DE", "Germany", "HB", "Bremen"), + Country("DE", "Germany", "HE", "Hesse (Hessen)"), + Country("DE", "Germany", "HH", "Hamburg"), + Country("DE", "Germany", "MV", "Mecklenburg-Vorpommern"), + Country("DE", "Germany", "NI", "Lower Saxony (Niedersachsen)"), + Country("DE", "Germany", "NW", "North Rhine-Westphalia (Nordrhein-Westfalen)"), + Country("DE", "Germany", "RP", "Rhineland-Palatinate (Rheinland-Pfalz)"), + Country("DE", "Germany", "SH", "Schleswig-Holstein"), + Country("DE", "Germany", "SL", "Saarland"), + Country("DE", "Germany", "SN", "Saxony (Sachsen)"), + Country("DE", "Germany", "ST", "Saxony-Anhalt (Sachsen-Anhalt)"), + Country("DE", "Germany", "TH", "Thuringia (Thüringen)"), Country("GR", "Greece"), Country("HN", "Honduras"), Country("HK", "Hong Kong"), @@ -105,6 +124,63 @@ class Country: Country("AE", "United Arab Emirates"), Country("GB", "United Kingdom"), Country("US", "United States"), + Country("US", "United States", "AK", "Alaska"), + Country("US", "United States", "AL", "Alabama"), + Country("US", "United States", "AR", "Arkansas"), + Country("US", "United States", "AS", "American Samoa"), + Country("US", "United States", "AZ", "Arizona"), + Country("US", "United States", "CA", "California"), + Country("US", "United States", "CO", "Colorado"), + Country("US", "United States", "CT", "Connecticut"), + Country("US", "United States", "DC", "District of Columbia"), + Country("US", "United States", "DE", "Delaware"), + Country("US", "United States", "FL", "Florida"), + Country("US", "United States", "GA", "Georgia"), + Country("US", "United States", "GU", "Guam"), + Country("US", "United States", "HI", "Hawaii"), + Country("US", "United States", "IA", "Iowa"), + Country("US", "United States", "ID", "Idaho"), + Country("US", "United States", "IL", "Illinois"), + Country("US", "United States", "IN", "Indiana"), + Country("US", "United States", "KS", "Kansas"), + Country("US", "United States", "KY", "Kentucky"), + Country("US", "United States", "LA", "Louisiana"), + Country("US", "United States", "MA", "Massachusetts"), + Country("US", "United States", "MD", "Maryland"), + Country("US", "United States", "ME", "Maine"), + Country("US", "United States", "MI", "Michigan"), + Country("US", "United States", "MN", "Minnesota"), + Country("US", "United States", "MO", "Missouri"), + Country("US", "United States", "MP", "Northern Mariana Islands"), + Country("US", "United States", "MS", "Mississippi"), + Country("US", "United States", "MT", "Montana"), + Country("US", "United States", "NC", "North Carolina"), + Country("US", "United States", "ND", "North Dakota"), + Country("US", "United States", "NE", "Nebraska"), + Country("US", "United States", "NH", "New Hampshire"), + Country("US", "United States", "NJ", "New Jersey"), + Country("US", "United States", "NM", "New Mexico"), + Country("US", "United States", "NV", "Nevada"), + Country("US", "United States", "NY", "New York"), + Country("US", "United States", "OH", "Ohio"), + Country("US", "United States", "OK", "Oklahoma"), + Country("US", "United States", "OR", "Oregon"), + Country("US", "United States", "PA", "Pennsylvania"), + Country("US", "United States", "PR", "Puerto Rico"), + Country("US", "United States", "RI", "Rhode Island"), + Country("US", "United States", "SC", "South Carolina"), + Country("US", "United States", "SD", "South Dakota"), + Country("US", "United States", "TN", "Tennessee"), + Country("US", "United States", "TX", "Texas"), + Country("US", "United States", "UM", "United States Minor Outlying Islands"), + Country("US", "United States", "UT", "Utah"), + Country("US", "United States", "VA", "Virginia"), + Country("US", "United States", "VI", "Virgin Islands, U.S.."), + Country("US", "United States", "VT", "Vermont"), + Country("US", "United States", "WA", "Washington"), + Country("US", "United States", "WI", "Wisconsin"), + Country("US", "United States", "WV", "West Virginia"), + Country("US", "United States", "WY", "Wyoming"), Country("UY", "Uruguay"), Country("UZ", "Uzbekistan"), Country("VE", "Venezuela"), @@ -120,12 +196,13 @@ class Country: /// Two-letter country codes defined in ISO 3166-1 alpha-2 . #[allow(dead_code)] +#[allow(non_camel_case_types)] #[derive(Debug, Clone, Copy, Eq, PartialEq, Hash, PartialOrd, Ord)] pub enum Country { {%- for country in countries %} - #[cfg(feature = "{{country.code}}")] - /// {{country.name}} - {{country.code}}, + #[cfg(feature = "{{country.code}}")] + /// {{country|display_name}} + {{country|enum_name}}, {%- endfor %} } @@ -136,28 +213,28 @@ class Country: } impl AsRef for Country { - fn as_ref(&self) -> &str { - match self { + fn as_ref(&self) -> &str { + match self { {%- for country in countries %} - #[cfg(feature = "{{country.code}}")] - Country::{{country.code}} => "{{country.code}}", + #[cfg(feature = "{{country.code}}")] + Country::{{country|enum_name}} => "{{country|enum_name}}", {%- endfor %} + } } - } } impl std::str::FromStr for Country { - type Err = Error; + type Err = Error; - fn from_str(s: &str) -> std::result::Result { - Ok(match s { + fn from_str(s: &str) -> std::result::Result { + Ok(match s { {%- for country in countries %} - #[cfg(feature = "{{country.code}}")] - "{{country.code}}" => Country::{{country.code}}, + #[cfg(feature = "{{country.code}}")] + "{{country|enum_name}}" => Country::{{country|enum_name}}, {%- endfor %} - _ => return Err(Error::CountryNotAvailable), - }) - } + _ => return Err(Error::CountryNotAvailable), + }) + } } """ @@ -165,18 +242,20 @@ class Country: build = """ use std::collections::HashSet; -use crate::{data::*, prelude::*, HolidayMap, Result, Year}; +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(); + let mut map = HolidayMap::new(); + {% for country in countries %} - #[cfg(feature = "{{country.code}}")] - if countries.is_none() || countries.unwrap().contains(&Country::{{country.code}}) { - map.insert(Country::{{country.code}}, {{country.code|escape}}::build(&years)?); - } + #[cfg(feature = "{{country.code}}")] + if countries.map_or(true, |c| c.contains(&Country::{{country|enum_name}})) { + map.insert(Country::{{country|enum_name}}, data::{{country|mod_name|escape}}::build(years)?); + } {% endfor %} - Ok(map) + + Ok(map) } """ @@ -193,37 +272,37 @@ class Country: {% for country in countries %} #[cfg(feature = "{{country.code}}")] -pub mod {{country.code|escape}}; +pub mod {{country|mod_name|escape}}; {% endfor %} """ build_country = """ -//! {{country}} +//! {{country|display_name}} use super::*; -/// Generate holiday map for {{country}}. +/// Generate holiday map for {{country|display_name}}. #[allow(unused_mut, unused_variables)] -pub fn build(years: &Option<&std::ops::Range>) -> Result>> { - let mut map = HashMap::new(); - -{%- for year in years %} -{% if holiday(years=year) %} - build_year( - years, - {{year}}, - vec![ -{% for date, name in holiday(years=year).items() %} - (NaiveDate::from_ymd_res({{date|year}}, {{date|month}}, {{date|day}})?, "{{name}}"), +pub fn build(years: Option<&std::ops::Range>) -> Result>> { + let mut map = HashMap::new(); + +{% for year in years %} +{% if holiday(years=year, subdiv=country.subdivision_code) %} + build_year( + years, + {{year}}, + vec![ +{% for date, name in holiday(years=year, subdiv=country.subdivision_code).items() %} + (NaiveDate::from_ymd_res({{date|year}}, {{date|month}}, {{date|day}})?, "{{name}}"), {%- endfor %} - ], - &mut map, - Country::{{code}}, - "{{country}}", - ); + ], + &mut map, + Country::{{country|enum_name}}, + "{{country|display_name}}", + ); {%- endif %} {%- endfor %} - Ok(map) + Ok(map) } """ @@ -240,10 +319,20 @@ def escape(code: str) -> str: else: return lower +def enum_name(country: Country) -> str: + if country.subdivision_code == None: + return country.code + else: + return country.code + "_" + country.subdivision_code -def empty_holiday(**kwargs): - return {} +def mod_name(country: Country) -> str: + return enum_name(country).lower() +def display_name(country: Country) -> str: + if country.subdivision_name == None: + return country.name + else: + return country.name + " (" + country.subdivision_name + ")" if __name__ == "__main__": env = Environment() @@ -251,7 +340,10 @@ def empty_holiday(**kwargs): env.filters["month"] = lambda d: d.month env.filters["day"] = lambda d: d.day env.filters["escape"] = escape - env.filters["lower"] = lower + env.filters["enum_name"] = enum_name + env.filters["mod_name"] = mod_name + env.filters["display_name"] = display_name + with open("src/country.rs", "w") as f: rendered = env.from_string(country).render(countries=countries) f.write(rendered) @@ -263,13 +355,13 @@ def empty_holiday(**kwargs): 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) + with open("src/data/{}.rs".format(mod_name(country)), "w") as f: + # Could use `getattr(holidays, country.code, {}).subdivisions` but this only has the codes and not the names. + holiday = getattr(holidays, country.code, {}) rendered = env.from_string(build_country).render( - code=country.code, - country=country.name, + country=country, years=years, - holiday=holiday or empty_holiday) + holiday=holiday) f.write(rendered) diff --git a/src/build.rs b/src/build.rs index caa9ff3..73df354 100644 --- a/src/build.rs +++ b/src/build.rs @@ -1,6 +1,6 @@ use std::collections::HashSet; -use crate::{data::*, prelude::*, HolidayMap, Result, Year}; +use crate::{data, prelude::*, HolidayMap, Result, Year}; /// Generate holiday map for the specified countries and years. pub fn build( @@ -10,508 +10,878 @@ pub fn build( let mut map = HolidayMap::new(); #[cfg(feature = "AO")] - if countries.is_none() || countries.unwrap().contains(&Country::AO) { - map.insert(Country::AO, ao::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::AO)) { + map.insert(Country::AO, data::ao::build(years)?); } #[cfg(feature = "AR")] - if countries.is_none() || countries.unwrap().contains(&Country::AR) { - map.insert(Country::AR, ar::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::AR)) { + map.insert(Country::AR, data::ar::build(years)?); } #[cfg(feature = "AM")] - if countries.is_none() || countries.unwrap().contains(&Country::AM) { - map.insert(Country::AM, am::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::AM)) { + map.insert(Country::AM, data::am::build(years)?); } #[cfg(feature = "AW")] - if countries.is_none() || countries.unwrap().contains(&Country::AW) { - map.insert(Country::AW, aw::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::AW)) { + map.insert(Country::AW, data::aw::build(years)?); } #[cfg(feature = "AU")] - if countries.is_none() || countries.unwrap().contains(&Country::AU) { - map.insert(Country::AU, au::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::AU)) { + map.insert(Country::AU, data::au::build(years)?); } #[cfg(feature = "AT")] - if countries.is_none() || countries.unwrap().contains(&Country::AT) { - map.insert(Country::AT, at::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::AT)) { + map.insert(Country::AT, data::at::build(years)?); } #[cfg(feature = "AZ")] - if countries.is_none() || countries.unwrap().contains(&Country::AZ) { - map.insert(Country::AZ, az::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::AZ)) { + map.insert(Country::AZ, data::az::build(years)?); } #[cfg(feature = "BD")] - if countries.is_none() || countries.unwrap().contains(&Country::BD) { - map.insert(Country::BD, bd::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::BD)) { + map.insert(Country::BD, data::bd::build(years)?); } #[cfg(feature = "BY")] - if countries.is_none() || countries.unwrap().contains(&Country::BY) { - map.insert(Country::BY, by::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::BY)) { + map.insert(Country::BY, data::by::build(years)?); } #[cfg(feature = "BE")] - if countries.is_none() || countries.unwrap().contains(&Country::BE) { - map.insert(Country::BE, be::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::BE)) { + map.insert(Country::BE, data::be::build(years)?); } #[cfg(feature = "BO")] - if countries.is_none() || countries.unwrap().contains(&Country::BO) { - map.insert(Country::BO, bo::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::BO)) { + map.insert(Country::BO, data::bo::build(years)?); } #[cfg(feature = "BA")] - if countries.is_none() || countries.unwrap().contains(&Country::BA) { - map.insert(Country::BA, ba::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::BA)) { + map.insert(Country::BA, data::ba::build(years)?); } #[cfg(feature = "BW")] - if countries.is_none() || countries.unwrap().contains(&Country::BW) { - map.insert(Country::BW, bw::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::BW)) { + map.insert(Country::BW, data::bw::build(years)?); } #[cfg(feature = "BR")] - if countries.is_none() || countries.unwrap().contains(&Country::BR) { - map.insert(Country::BR, br::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::BR)) { + map.insert(Country::BR, data::br::build(years)?); } #[cfg(feature = "BG")] - if countries.is_none() || countries.unwrap().contains(&Country::BG) { - map.insert(Country::BG, bg::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::BG)) { + map.insert(Country::BG, data::bg::build(years)?); } #[cfg(feature = "BI")] - if countries.is_none() || countries.unwrap().contains(&Country::BI) { - map.insert(Country::BI, bi::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::BI)) { + map.insert(Country::BI, data::bi::build(years)?); } #[cfg(feature = "CA")] - if countries.is_none() || countries.unwrap().contains(&Country::CA) { - map.insert(Country::CA, ca::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::CA)) { + map.insert(Country::CA, data::ca::build(years)?); } #[cfg(feature = "CL")] - if countries.is_none() || countries.unwrap().contains(&Country::CL) { - map.insert(Country::CL, cl::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::CL)) { + map.insert(Country::CL, data::cl::build(years)?); } #[cfg(feature = "CN")] - if countries.is_none() || countries.unwrap().contains(&Country::CN) { - map.insert(Country::CN, cn::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::CN)) { + map.insert(Country::CN, data::cn::build(years)?); } #[cfg(feature = "CO")] - if countries.is_none() || countries.unwrap().contains(&Country::CO) { - map.insert(Country::CO, co::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::CO)) { + map.insert(Country::CO, data::co::build(years)?); } #[cfg(feature = "HR")] - if countries.is_none() || countries.unwrap().contains(&Country::HR) { - map.insert(Country::HR, hr::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::HR)) { + map.insert(Country::HR, data::hr::build(years)?); } #[cfg(feature = "CU")] - if countries.is_none() || countries.unwrap().contains(&Country::CU) { - map.insert(Country::CU, cu::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::CU)) { + map.insert(Country::CU, data::cu::build(years)?); } #[cfg(feature = "CW")] - if countries.is_none() || countries.unwrap().contains(&Country::CW) { - map.insert(Country::CW, cw::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::CW)) { + map.insert(Country::CW, data::cw::build(years)?); } #[cfg(feature = "CY")] - if countries.is_none() || countries.unwrap().contains(&Country::CY) { - map.insert(Country::CY, cy::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::CY)) { + map.insert(Country::CY, data::cy::build(years)?); } #[cfg(feature = "CZ")] - if countries.is_none() || countries.unwrap().contains(&Country::CZ) { - map.insert(Country::CZ, cz::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::CZ)) { + map.insert(Country::CZ, data::cz::build(years)?); } #[cfg(feature = "DK")] - if countries.is_none() || countries.unwrap().contains(&Country::DK) { - map.insert(Country::DK, dk::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::DK)) { + map.insert(Country::DK, data::dk::build(years)?); } #[cfg(feature = "DJ")] - if countries.is_none() || countries.unwrap().contains(&Country::DJ) { - map.insert(Country::DJ, dj::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::DJ)) { + map.insert(Country::DJ, data::dj::build(years)?); } #[cfg(feature = "DO")] - if countries.is_none() || countries.unwrap().contains(&Country::DO) { - map.insert(Country::DO, r#do::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::DO)) { + map.insert(Country::DO, data::r#do::build(years)?); } #[cfg(feature = "EG")] - if countries.is_none() || countries.unwrap().contains(&Country::EG) { - map.insert(Country::EG, eg::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::EG)) { + map.insert(Country::EG, data::eg::build(years)?); } #[cfg(feature = "EE")] - if countries.is_none() || countries.unwrap().contains(&Country::EE) { - map.insert(Country::EE, ee::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::EE)) { + map.insert(Country::EE, data::ee::build(years)?); } #[cfg(feature = "ET")] - if countries.is_none() || countries.unwrap().contains(&Country::ET) { - map.insert(Country::ET, et::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::ET)) { + map.insert(Country::ET, data::et::build(years)?); } #[cfg(feature = "FI")] - if countries.is_none() || countries.unwrap().contains(&Country::FI) { - map.insert(Country::FI, fi::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::FI)) { + map.insert(Country::FI, data::fi::build(years)?); } #[cfg(feature = "FR")] - if countries.is_none() || countries.unwrap().contains(&Country::FR) { - map.insert(Country::FR, fr::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::FR)) { + map.insert(Country::FR, data::fr::build(years)?); } #[cfg(feature = "GE")] - if countries.is_none() || countries.unwrap().contains(&Country::GE) { - map.insert(Country::GE, ge::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::GE)) { + map.insert(Country::GE, data::ge::build(years)?); } #[cfg(feature = "DE")] - if countries.is_none() || countries.unwrap().contains(&Country::DE) { - map.insert(Country::DE, de::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::DE)) { + map.insert(Country::DE, data::de::build(years)?); + } + + #[cfg(feature = "DE")] + if countries.map_or(true, |c| c.contains(&Country::DE_BB)) { + map.insert(Country::DE_BB, data::de_bb::build(years)?); + } + + #[cfg(feature = "DE")] + if countries.map_or(true, |c| c.contains(&Country::DE_BE)) { + map.insert(Country::DE_BE, data::de_be::build(years)?); + } + + #[cfg(feature = "DE")] + if countries.map_or(true, |c| c.contains(&Country::DE_BW)) { + map.insert(Country::DE_BW, data::de_bw::build(years)?); + } + + #[cfg(feature = "DE")] + if countries.map_or(true, |c| c.contains(&Country::DE_BY)) { + map.insert(Country::DE_BY, data::de_by::build(years)?); + } + + #[cfg(feature = "DE")] + if countries.map_or(true, |c| c.contains(&Country::DE_BYP)) { + map.insert(Country::DE_BYP, data::de_byp::build(years)?); + } + + #[cfg(feature = "DE")] + if countries.map_or(true, |c| c.contains(&Country::DE_HB)) { + map.insert(Country::DE_HB, data::de_hb::build(years)?); + } + + #[cfg(feature = "DE")] + if countries.map_or(true, |c| c.contains(&Country::DE_HE)) { + map.insert(Country::DE_HE, data::de_he::build(years)?); + } + + #[cfg(feature = "DE")] + if countries.map_or(true, |c| c.contains(&Country::DE_HH)) { + map.insert(Country::DE_HH, data::de_hh::build(years)?); + } + + #[cfg(feature = "DE")] + if countries.map_or(true, |c| c.contains(&Country::DE_MV)) { + map.insert(Country::DE_MV, data::de_mv::build(years)?); + } + + #[cfg(feature = "DE")] + if countries.map_or(true, |c| c.contains(&Country::DE_NI)) { + map.insert(Country::DE_NI, data::de_ni::build(years)?); + } + + #[cfg(feature = "DE")] + if countries.map_or(true, |c| c.contains(&Country::DE_NW)) { + map.insert(Country::DE_NW, data::de_nw::build(years)?); + } + + #[cfg(feature = "DE")] + if countries.map_or(true, |c| c.contains(&Country::DE_RP)) { + map.insert(Country::DE_RP, data::de_rp::build(years)?); + } + + #[cfg(feature = "DE")] + if countries.map_or(true, |c| c.contains(&Country::DE_SH)) { + map.insert(Country::DE_SH, data::de_sh::build(years)?); + } + + #[cfg(feature = "DE")] + if countries.map_or(true, |c| c.contains(&Country::DE_SL)) { + map.insert(Country::DE_SL, data::de_sl::build(years)?); + } + + #[cfg(feature = "DE")] + if countries.map_or(true, |c| c.contains(&Country::DE_SN)) { + map.insert(Country::DE_SN, data::de_sn::build(years)?); + } + + #[cfg(feature = "DE")] + if countries.map_or(true, |c| c.contains(&Country::DE_ST)) { + map.insert(Country::DE_ST, data::de_st::build(years)?); + } + + #[cfg(feature = "DE")] + if countries.map_or(true, |c| c.contains(&Country::DE_TH)) { + map.insert(Country::DE_TH, data::de_th::build(years)?); } #[cfg(feature = "GR")] - if countries.is_none() || countries.unwrap().contains(&Country::GR) { - map.insert(Country::GR, gr::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::GR)) { + map.insert(Country::GR, data::gr::build(years)?); } #[cfg(feature = "HN")] - if countries.is_none() || countries.unwrap().contains(&Country::HN) { - map.insert(Country::HN, hn::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::HN)) { + map.insert(Country::HN, data::hn::build(years)?); } #[cfg(feature = "HK")] - if countries.is_none() || countries.unwrap().contains(&Country::HK) { - map.insert(Country::HK, hk::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::HK)) { + map.insert(Country::HK, data::hk::build(years)?); } #[cfg(feature = "HU")] - if countries.is_none() || countries.unwrap().contains(&Country::HU) { - map.insert(Country::HU, hu::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::HU)) { + map.insert(Country::HU, data::hu::build(years)?); } #[cfg(feature = "IS")] - if countries.is_none() || countries.unwrap().contains(&Country::IS) { - map.insert(Country::IS, is::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::IS)) { + map.insert(Country::IS, data::is::build(years)?); } #[cfg(feature = "IN")] - if countries.is_none() || countries.unwrap().contains(&Country::IN) { - map.insert(Country::IN, r#in::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::IN)) { + map.insert(Country::IN, data::r#in::build(years)?); } #[cfg(feature = "ID")] - if countries.is_none() || countries.unwrap().contains(&Country::ID) { - map.insert(Country::ID, id::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::ID)) { + map.insert(Country::ID, data::id::build(years)?); } #[cfg(feature = "IE")] - if countries.is_none() || countries.unwrap().contains(&Country::IE) { - map.insert(Country::IE, ie::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::IE)) { + map.insert(Country::IE, data::ie::build(years)?); } #[cfg(feature = "IM")] - if countries.is_none() || countries.unwrap().contains(&Country::IM) { - map.insert(Country::IM, im::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::IM)) { + map.insert(Country::IM, data::im::build(years)?); } #[cfg(feature = "IL")] - if countries.is_none() || countries.unwrap().contains(&Country::IL) { - map.insert(Country::IL, il::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::IL)) { + map.insert(Country::IL, data::il::build(years)?); } #[cfg(feature = "IT")] - if countries.is_none() || countries.unwrap().contains(&Country::IT) { - map.insert(Country::IT, it::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::IT)) { + map.insert(Country::IT, data::it::build(years)?); } #[cfg(feature = "JM")] - if countries.is_none() || countries.unwrap().contains(&Country::JM) { - map.insert(Country::JM, jm::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::JM)) { + map.insert(Country::JM, data::jm::build(years)?); } #[cfg(feature = "JP")] - if countries.is_none() || countries.unwrap().contains(&Country::JP) { - map.insert(Country::JP, jp::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::JP)) { + map.insert(Country::JP, data::jp::build(years)?); } #[cfg(feature = "KZ")] - if countries.is_none() || countries.unwrap().contains(&Country::KZ) { - map.insert(Country::KZ, kz::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::KZ)) { + map.insert(Country::KZ, data::kz::build(years)?); } #[cfg(feature = "KE")] - if countries.is_none() || countries.unwrap().contains(&Country::KE) { - map.insert(Country::KE, ke::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::KE)) { + map.insert(Country::KE, data::ke::build(years)?); } #[cfg(feature = "LV")] - if countries.is_none() || countries.unwrap().contains(&Country::LV) { - map.insert(Country::LV, lv::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::LV)) { + map.insert(Country::LV, data::lv::build(years)?); } #[cfg(feature = "LS")] - if countries.is_none() || countries.unwrap().contains(&Country::LS) { - map.insert(Country::LS, ls::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::LS)) { + map.insert(Country::LS, data::ls::build(years)?); } #[cfg(feature = "LI")] - if countries.is_none() || countries.unwrap().contains(&Country::LI) { - map.insert(Country::LI, li::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::LI)) { + map.insert(Country::LI, data::li::build(years)?); } #[cfg(feature = "LT")] - if countries.is_none() || countries.unwrap().contains(&Country::LT) { - map.insert(Country::LT, lt::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::LT)) { + map.insert(Country::LT, data::lt::build(years)?); } #[cfg(feature = "LU")] - if countries.is_none() || countries.unwrap().contains(&Country::LU) { - map.insert(Country::LU, lu::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::LU)) { + map.insert(Country::LU, data::lu::build(years)?); } #[cfg(feature = "MG")] - if countries.is_none() || countries.unwrap().contains(&Country::MG) { - map.insert(Country::MG, mg::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::MG)) { + map.insert(Country::MG, data::mg::build(years)?); } #[cfg(feature = "MY")] - if countries.is_none() || countries.unwrap().contains(&Country::MY) { - map.insert(Country::MY, my::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::MY)) { + map.insert(Country::MY, data::my::build(years)?); } #[cfg(feature = "MW")] - if countries.is_none() || countries.unwrap().contains(&Country::MW) { - map.insert(Country::MW, mw::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::MW)) { + map.insert(Country::MW, data::mw::build(years)?); } #[cfg(feature = "MT")] - if countries.is_none() || countries.unwrap().contains(&Country::MT) { - map.insert(Country::MT, mt::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::MT)) { + map.insert(Country::MT, data::mt::build(years)?); } #[cfg(feature = "MX")] - if countries.is_none() || countries.unwrap().contains(&Country::MX) { - map.insert(Country::MX, mx::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::MX)) { + map.insert(Country::MX, data::mx::build(years)?); } #[cfg(feature = "MD")] - if countries.is_none() || countries.unwrap().contains(&Country::MD) { - map.insert(Country::MD, md::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::MD)) { + map.insert(Country::MD, data::md::build(years)?); } #[cfg(feature = "MA")] - if countries.is_none() || countries.unwrap().contains(&Country::MA) { - map.insert(Country::MA, ma::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::MA)) { + map.insert(Country::MA, data::ma::build(years)?); } #[cfg(feature = "MZ")] - if countries.is_none() || countries.unwrap().contains(&Country::MZ) { - map.insert(Country::MZ, mz::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::MZ)) { + map.insert(Country::MZ, data::mz::build(years)?); } #[cfg(feature = "NL")] - if countries.is_none() || countries.unwrap().contains(&Country::NL) { - map.insert(Country::NL, nl::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::NL)) { + map.insert(Country::NL, data::nl::build(years)?); } #[cfg(feature = "NA")] - if countries.is_none() || countries.unwrap().contains(&Country::NA) { - map.insert(Country::NA, na::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::NA)) { + map.insert(Country::NA, data::na::build(years)?); } #[cfg(feature = "NZ")] - if countries.is_none() || countries.unwrap().contains(&Country::NZ) { - map.insert(Country::NZ, nz::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::NZ)) { + map.insert(Country::NZ, data::nz::build(years)?); } #[cfg(feature = "NI")] - if countries.is_none() || countries.unwrap().contains(&Country::NI) { - map.insert(Country::NI, ni::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::NI)) { + map.insert(Country::NI, data::ni::build(years)?); } #[cfg(feature = "NG")] - if countries.is_none() || countries.unwrap().contains(&Country::NG) { - map.insert(Country::NG, ng::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::NG)) { + map.insert(Country::NG, data::ng::build(years)?); } #[cfg(feature = "MK")] - if countries.is_none() || countries.unwrap().contains(&Country::MK) { - map.insert(Country::MK, mk::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::MK)) { + map.insert(Country::MK, data::mk::build(years)?); } #[cfg(feature = "NO")] - if countries.is_none() || countries.unwrap().contains(&Country::NO) { - map.insert(Country::NO, no::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::NO)) { + map.insert(Country::NO, data::no::build(years)?); } #[cfg(feature = "PK")] - if countries.is_none() || countries.unwrap().contains(&Country::PK) { - map.insert(Country::PK, pk::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::PK)) { + map.insert(Country::PK, data::pk::build(years)?); } #[cfg(feature = "PY")] - if countries.is_none() || countries.unwrap().contains(&Country::PY) { - map.insert(Country::PY, py::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::PY)) { + map.insert(Country::PY, data::py::build(years)?); } #[cfg(feature = "PE")] - if countries.is_none() || countries.unwrap().contains(&Country::PE) { - map.insert(Country::PE, pe::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::PE)) { + map.insert(Country::PE, data::pe::build(years)?); } #[cfg(feature = "PL")] - if countries.is_none() || countries.unwrap().contains(&Country::PL) { - map.insert(Country::PL, pl::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::PL)) { + map.insert(Country::PL, data::pl::build(years)?); } #[cfg(feature = "PT")] - if countries.is_none() || countries.unwrap().contains(&Country::PT) { - map.insert(Country::PT, pt::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::PT)) { + map.insert(Country::PT, data::pt::build(years)?); } #[cfg(feature = "RO")] - if countries.is_none() || countries.unwrap().contains(&Country::RO) { - map.insert(Country::RO, ro::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::RO)) { + map.insert(Country::RO, data::ro::build(years)?); } #[cfg(feature = "RU")] - if countries.is_none() || countries.unwrap().contains(&Country::RU) { - map.insert(Country::RU, ru::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::RU)) { + map.insert(Country::RU, data::ru::build(years)?); } #[cfg(feature = "SA")] - if countries.is_none() || countries.unwrap().contains(&Country::SA) { - map.insert(Country::SA, sa::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::SA)) { + map.insert(Country::SA, data::sa::build(years)?); } #[cfg(feature = "RS")] - if countries.is_none() || countries.unwrap().contains(&Country::RS) { - map.insert(Country::RS, rs::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::RS)) { + map.insert(Country::RS, data::rs::build(years)?); } #[cfg(feature = "SG")] - if countries.is_none() || countries.unwrap().contains(&Country::SG) { - map.insert(Country::SG, sg::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::SG)) { + map.insert(Country::SG, data::sg::build(years)?); } #[cfg(feature = "SK")] - if countries.is_none() || countries.unwrap().contains(&Country::SK) { - map.insert(Country::SK, sk::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::SK)) { + map.insert(Country::SK, data::sk::build(years)?); } #[cfg(feature = "SI")] - if countries.is_none() || countries.unwrap().contains(&Country::SI) { - map.insert(Country::SI, si::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::SI)) { + map.insert(Country::SI, data::si::build(years)?); } #[cfg(feature = "ZA")] - if countries.is_none() || countries.unwrap().contains(&Country::ZA) { - map.insert(Country::ZA, za::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::ZA)) { + map.insert(Country::ZA, data::za::build(years)?); } #[cfg(feature = "KR")] - if countries.is_none() || countries.unwrap().contains(&Country::KR) { - map.insert(Country::KR, kr::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::KR)) { + map.insert(Country::KR, data::kr::build(years)?); } #[cfg(feature = "ES")] - if countries.is_none() || countries.unwrap().contains(&Country::ES) { - map.insert(Country::ES, es::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::ES)) { + map.insert(Country::ES, data::es::build(years)?); } #[cfg(feature = "SZ")] - if countries.is_none() || countries.unwrap().contains(&Country::SZ) { - map.insert(Country::SZ, sz::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::SZ)) { + map.insert(Country::SZ, data::sz::build(years)?); } #[cfg(feature = "SE")] - if countries.is_none() || countries.unwrap().contains(&Country::SE) { - map.insert(Country::SE, se::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::SE)) { + map.insert(Country::SE, data::se::build(years)?); } #[cfg(feature = "CH")] - if countries.is_none() || countries.unwrap().contains(&Country::CH) { - map.insert(Country::CH, ch::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::CH)) { + map.insert(Country::CH, data::ch::build(years)?); } #[cfg(feature = "TW")] - if countries.is_none() || countries.unwrap().contains(&Country::TW) { - map.insert(Country::TW, tw::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::TW)) { + map.insert(Country::TW, data::tw::build(years)?); } #[cfg(feature = "TR")] - if countries.is_none() || countries.unwrap().contains(&Country::TR) { - map.insert(Country::TR, tr::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::TR)) { + map.insert(Country::TR, data::tr::build(years)?); } #[cfg(feature = "TN")] - if countries.is_none() || countries.unwrap().contains(&Country::TN) { - map.insert(Country::TN, tn::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::TN)) { + map.insert(Country::TN, data::tn::build(years)?); } #[cfg(feature = "UA")] - if countries.is_none() || countries.unwrap().contains(&Country::UA) { - map.insert(Country::UA, ua::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::UA)) { + map.insert(Country::UA, data::ua::build(years)?); } #[cfg(feature = "AE")] - if countries.is_none() || countries.unwrap().contains(&Country::AE) { - map.insert(Country::AE, ae::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::AE)) { + map.insert(Country::AE, data::ae::build(years)?); } #[cfg(feature = "GB")] - if countries.is_none() || countries.unwrap().contains(&Country::GB) { - map.insert(Country::GB, gb::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::GB)) { + map.insert(Country::GB, data::gb::build(years)?); + } + + #[cfg(feature = "US")] + if countries.map_or(true, |c| c.contains(&Country::US)) { + map.insert(Country::US, data::us::build(years)?); + } + + #[cfg(feature = "US")] + if countries.map_or(true, |c| c.contains(&Country::US_AK)) { + map.insert(Country::US_AK, data::us_ak::build(years)?); + } + + #[cfg(feature = "US")] + if countries.map_or(true, |c| c.contains(&Country::US_AL)) { + map.insert(Country::US_AL, data::us_al::build(years)?); + } + + #[cfg(feature = "US")] + if countries.map_or(true, |c| c.contains(&Country::US_AR)) { + map.insert(Country::US_AR, data::us_ar::build(years)?); + } + + #[cfg(feature = "US")] + if countries.map_or(true, |c| c.contains(&Country::US_AS)) { + map.insert(Country::US_AS, data::us_as::build(years)?); + } + + #[cfg(feature = "US")] + if countries.map_or(true, |c| c.contains(&Country::US_AZ)) { + map.insert(Country::US_AZ, data::us_az::build(years)?); + } + + #[cfg(feature = "US")] + if countries.map_or(true, |c| c.contains(&Country::US_CA)) { + map.insert(Country::US_CA, data::us_ca::build(years)?); + } + + #[cfg(feature = "US")] + if countries.map_or(true, |c| c.contains(&Country::US_CO)) { + map.insert(Country::US_CO, data::us_co::build(years)?); + } + + #[cfg(feature = "US")] + if countries.map_or(true, |c| c.contains(&Country::US_CT)) { + map.insert(Country::US_CT, data::us_ct::build(years)?); + } + + #[cfg(feature = "US")] + if countries.map_or(true, |c| c.contains(&Country::US_DC)) { + map.insert(Country::US_DC, data::us_dc::build(years)?); + } + + #[cfg(feature = "US")] + if countries.map_or(true, |c| c.contains(&Country::US_DE)) { + map.insert(Country::US_DE, data::us_de::build(years)?); + } + + #[cfg(feature = "US")] + if countries.map_or(true, |c| c.contains(&Country::US_FL)) { + map.insert(Country::US_FL, data::us_fl::build(years)?); + } + + #[cfg(feature = "US")] + if countries.map_or(true, |c| c.contains(&Country::US_GA)) { + map.insert(Country::US_GA, data::us_ga::build(years)?); + } + + #[cfg(feature = "US")] + if countries.map_or(true, |c| c.contains(&Country::US_GU)) { + map.insert(Country::US_GU, data::us_gu::build(years)?); + } + + #[cfg(feature = "US")] + if countries.map_or(true, |c| c.contains(&Country::US_HI)) { + map.insert(Country::US_HI, data::us_hi::build(years)?); + } + + #[cfg(feature = "US")] + if countries.map_or(true, |c| c.contains(&Country::US_IA)) { + map.insert(Country::US_IA, data::us_ia::build(years)?); + } + + #[cfg(feature = "US")] + if countries.map_or(true, |c| c.contains(&Country::US_ID)) { + map.insert(Country::US_ID, data::us_id::build(years)?); + } + + #[cfg(feature = "US")] + if countries.map_or(true, |c| c.contains(&Country::US_IL)) { + map.insert(Country::US_IL, data::us_il::build(years)?); + } + + #[cfg(feature = "US")] + if countries.map_or(true, |c| c.contains(&Country::US_IN)) { + map.insert(Country::US_IN, data::us_in::build(years)?); + } + + #[cfg(feature = "US")] + if countries.map_or(true, |c| c.contains(&Country::US_KS)) { + map.insert(Country::US_KS, data::us_ks::build(years)?); + } + + #[cfg(feature = "US")] + if countries.map_or(true, |c| c.contains(&Country::US_KY)) { + map.insert(Country::US_KY, data::us_ky::build(years)?); + } + + #[cfg(feature = "US")] + if countries.map_or(true, |c| c.contains(&Country::US_LA)) { + map.insert(Country::US_LA, data::us_la::build(years)?); + } + + #[cfg(feature = "US")] + if countries.map_or(true, |c| c.contains(&Country::US_MA)) { + map.insert(Country::US_MA, data::us_ma::build(years)?); + } + + #[cfg(feature = "US")] + if countries.map_or(true, |c| c.contains(&Country::US_MD)) { + map.insert(Country::US_MD, data::us_md::build(years)?); + } + + #[cfg(feature = "US")] + if countries.map_or(true, |c| c.contains(&Country::US_ME)) { + map.insert(Country::US_ME, data::us_me::build(years)?); + } + + #[cfg(feature = "US")] + if countries.map_or(true, |c| c.contains(&Country::US_MI)) { + map.insert(Country::US_MI, data::us_mi::build(years)?); + } + + #[cfg(feature = "US")] + if countries.map_or(true, |c| c.contains(&Country::US_MN)) { + map.insert(Country::US_MN, data::us_mn::build(years)?); + } + + #[cfg(feature = "US")] + if countries.map_or(true, |c| c.contains(&Country::US_MO)) { + map.insert(Country::US_MO, data::us_mo::build(years)?); + } + + #[cfg(feature = "US")] + if countries.map_or(true, |c| c.contains(&Country::US_MP)) { + map.insert(Country::US_MP, data::us_mp::build(years)?); + } + + #[cfg(feature = "US")] + if countries.map_or(true, |c| c.contains(&Country::US_MS)) { + map.insert(Country::US_MS, data::us_ms::build(years)?); + } + + #[cfg(feature = "US")] + if countries.map_or(true, |c| c.contains(&Country::US_MT)) { + map.insert(Country::US_MT, data::us_mt::build(years)?); + } + + #[cfg(feature = "US")] + if countries.map_or(true, |c| c.contains(&Country::US_NC)) { + map.insert(Country::US_NC, data::us_nc::build(years)?); + } + + #[cfg(feature = "US")] + if countries.map_or(true, |c| c.contains(&Country::US_ND)) { + map.insert(Country::US_ND, data::us_nd::build(years)?); + } + + #[cfg(feature = "US")] + if countries.map_or(true, |c| c.contains(&Country::US_NE)) { + map.insert(Country::US_NE, data::us_ne::build(years)?); + } + + #[cfg(feature = "US")] + if countries.map_or(true, |c| c.contains(&Country::US_NH)) { + map.insert(Country::US_NH, data::us_nh::build(years)?); + } + + #[cfg(feature = "US")] + if countries.map_or(true, |c| c.contains(&Country::US_NJ)) { + map.insert(Country::US_NJ, data::us_nj::build(years)?); + } + + #[cfg(feature = "US")] + if countries.map_or(true, |c| c.contains(&Country::US_NM)) { + map.insert(Country::US_NM, data::us_nm::build(years)?); + } + + #[cfg(feature = "US")] + if countries.map_or(true, |c| c.contains(&Country::US_NV)) { + map.insert(Country::US_NV, data::us_nv::build(years)?); + } + + #[cfg(feature = "US")] + if countries.map_or(true, |c| c.contains(&Country::US_NY)) { + map.insert(Country::US_NY, data::us_ny::build(years)?); + } + + #[cfg(feature = "US")] + if countries.map_or(true, |c| c.contains(&Country::US_OH)) { + map.insert(Country::US_OH, data::us_oh::build(years)?); + } + + #[cfg(feature = "US")] + if countries.map_or(true, |c| c.contains(&Country::US_OK)) { + map.insert(Country::US_OK, data::us_ok::build(years)?); + } + + #[cfg(feature = "US")] + if countries.map_or(true, |c| c.contains(&Country::US_OR)) { + map.insert(Country::US_OR, data::us_or::build(years)?); + } + + #[cfg(feature = "US")] + if countries.map_or(true, |c| c.contains(&Country::US_PA)) { + map.insert(Country::US_PA, data::us_pa::build(years)?); + } + + #[cfg(feature = "US")] + if countries.map_or(true, |c| c.contains(&Country::US_PR)) { + map.insert(Country::US_PR, data::us_pr::build(years)?); + } + + #[cfg(feature = "US")] + if countries.map_or(true, |c| c.contains(&Country::US_RI)) { + map.insert(Country::US_RI, data::us_ri::build(years)?); + } + + #[cfg(feature = "US")] + if countries.map_or(true, |c| c.contains(&Country::US_SC)) { + map.insert(Country::US_SC, data::us_sc::build(years)?); + } + + #[cfg(feature = "US")] + if countries.map_or(true, |c| c.contains(&Country::US_SD)) { + map.insert(Country::US_SD, data::us_sd::build(years)?); + } + + #[cfg(feature = "US")] + if countries.map_or(true, |c| c.contains(&Country::US_TN)) { + map.insert(Country::US_TN, data::us_tn::build(years)?); + } + + #[cfg(feature = "US")] + if countries.map_or(true, |c| c.contains(&Country::US_TX)) { + map.insert(Country::US_TX, data::us_tx::build(years)?); + } + + #[cfg(feature = "US")] + if countries.map_or(true, |c| c.contains(&Country::US_UM)) { + map.insert(Country::US_UM, data::us_um::build(years)?); + } + + #[cfg(feature = "US")] + if countries.map_or(true, |c| c.contains(&Country::US_UT)) { + map.insert(Country::US_UT, data::us_ut::build(years)?); + } + + #[cfg(feature = "US")] + if countries.map_or(true, |c| c.contains(&Country::US_VA)) { + map.insert(Country::US_VA, data::us_va::build(years)?); + } + + #[cfg(feature = "US")] + if countries.map_or(true, |c| c.contains(&Country::US_VI)) { + map.insert(Country::US_VI, data::us_vi::build(years)?); + } + + #[cfg(feature = "US")] + if countries.map_or(true, |c| c.contains(&Country::US_VT)) { + map.insert(Country::US_VT, data::us_vt::build(years)?); + } + + #[cfg(feature = "US")] + if countries.map_or(true, |c| c.contains(&Country::US_WA)) { + map.insert(Country::US_WA, data::us_wa::build(years)?); + } + + #[cfg(feature = "US")] + if countries.map_or(true, |c| c.contains(&Country::US_WI)) { + map.insert(Country::US_WI, data::us_wi::build(years)?); + } + + #[cfg(feature = "US")] + if countries.map_or(true, |c| c.contains(&Country::US_WV)) { + map.insert(Country::US_WV, data::us_wv::build(years)?); } #[cfg(feature = "US")] - if countries.is_none() || countries.unwrap().contains(&Country::US) { - map.insert(Country::US, us::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::US_WY)) { + map.insert(Country::US_WY, data::us_wy::build(years)?); } #[cfg(feature = "UY")] - if countries.is_none() || countries.unwrap().contains(&Country::UY) { - map.insert(Country::UY, uy::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::UY)) { + map.insert(Country::UY, data::uy::build(years)?); } #[cfg(feature = "UZ")] - if countries.is_none() || countries.unwrap().contains(&Country::UZ) { - map.insert(Country::UZ, uz::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::UZ)) { + map.insert(Country::UZ, data::uz::build(years)?); } #[cfg(feature = "VE")] - if countries.is_none() || countries.unwrap().contains(&Country::VE) { - map.insert(Country::VE, ve::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::VE)) { + map.insert(Country::VE, data::ve::build(years)?); } #[cfg(feature = "VN")] - if countries.is_none() || countries.unwrap().contains(&Country::VN) { - map.insert(Country::VN, vn::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::VN)) { + map.insert(Country::VN, data::vn::build(years)?); } #[cfg(feature = "ZM")] - if countries.is_none() || countries.unwrap().contains(&Country::ZM) { - map.insert(Country::ZM, zm::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::ZM)) { + map.insert(Country::ZM, data::zm::build(years)?); } #[cfg(feature = "ZW")] - if countries.is_none() || countries.unwrap().contains(&Country::ZW) { - map.insert(Country::ZW, zw::build(&years)?); + if countries.map_or(true, |c| c.contains(&Country::ZW)) { + map.insert(Country::ZW, data::zw::build(years)?); } Ok(map) diff --git a/src/builder.rs b/src/builder.rs index 50ac7a1..3157412 100644 --- a/src/builder.rs +++ b/src/builder.rs @@ -3,6 +3,7 @@ use std::{collections::HashSet, ops::Range}; /// Holiday database builder. #[derive(Default)] +#[must_use] pub struct Builder { countries: Option>, years: Option>, @@ -15,13 +16,13 @@ impl Builder { /// 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.countries.replace(countries.iter().copied().collect()); self } /// Specify range of years to load. pub fn years(mut self, years: Range) -> Self { - self.years = Some(years); + self.years.replace(years); self } @@ -33,8 +34,7 @@ impl Builder { /// Build and initialize holiday database. pub fn init(self) -> Result<()> { - let Builder { countries, years } = self; - let map = build(countries.as_ref(), years.as_ref())?; + let map = self.build()?; init_holiday(map) } } diff --git a/src/country.rs b/src/country.rs index c5b9d63..4a9f740 100644 --- a/src/country.rs +++ b/src/country.rs @@ -2,6 +2,7 @@ use crate::Error; /// Two-letter country codes defined in ISO 3166-1 alpha-2 . #[allow(dead_code)] +#[allow(non_camel_case_types)] #[derive(Debug, Clone, Copy, Eq, PartialEq, Hash, PartialOrd, Ord)] pub enum Country { #[cfg(feature = "AO")] @@ -109,6 +110,57 @@ pub enum Country { #[cfg(feature = "DE")] /// Germany DE, + #[cfg(feature = "DE")] + /// Germany (Brandenburg) + DE_BB, + #[cfg(feature = "DE")] + /// Germany (Berlin) + DE_BE, + #[cfg(feature = "DE")] + /// Germany (Baden-Württemberg) + DE_BW, + #[cfg(feature = "DE")] + /// Germany (Bavaria (Bayern)) + DE_BY, + #[cfg(feature = "DE")] + /// Germany (Bavaria (Bayern) with more protestants) + DE_BYP, + #[cfg(feature = "DE")] + /// Germany (Bremen) + DE_HB, + #[cfg(feature = "DE")] + /// Germany (Hesse (Hessen)) + DE_HE, + #[cfg(feature = "DE")] + /// Germany (Hamburg) + DE_HH, + #[cfg(feature = "DE")] + /// Germany (Mecklenburg-Vorpommern) + DE_MV, + #[cfg(feature = "DE")] + /// Germany (Lower Saxony (Niedersachsen)) + DE_NI, + #[cfg(feature = "DE")] + /// Germany (North Rhine-Westphalia (Nordrhein-Westfalen)) + DE_NW, + #[cfg(feature = "DE")] + /// Germany (Rhineland-Palatinate (Rheinland-Pfalz)) + DE_RP, + #[cfg(feature = "DE")] + /// Germany (Schleswig-Holstein) + DE_SH, + #[cfg(feature = "DE")] + /// Germany (Saarland) + DE_SL, + #[cfg(feature = "DE")] + /// Germany (Saxony (Sachsen)) + DE_SN, + #[cfg(feature = "DE")] + /// Germany (Saxony-Anhalt (Sachsen-Anhalt)) + DE_ST, + #[cfg(feature = "DE")] + /// Germany (Thuringia (Thüringen)) + DE_TH, #[cfg(feature = "GR")] /// Greece GR, @@ -289,6 +341,177 @@ pub enum Country { #[cfg(feature = "US")] /// United States US, + #[cfg(feature = "US")] + /// United States (Alaska) + US_AK, + #[cfg(feature = "US")] + /// United States (Alabama) + US_AL, + #[cfg(feature = "US")] + /// United States (Arkansas) + US_AR, + #[cfg(feature = "US")] + /// United States (American Samoa) + US_AS, + #[cfg(feature = "US")] + /// United States (Arizona) + US_AZ, + #[cfg(feature = "US")] + /// United States (California) + US_CA, + #[cfg(feature = "US")] + /// United States (Colorado) + US_CO, + #[cfg(feature = "US")] + /// United States (Connecticut) + US_CT, + #[cfg(feature = "US")] + /// United States (District of Columbia) + US_DC, + #[cfg(feature = "US")] + /// United States (Delaware) + US_DE, + #[cfg(feature = "US")] + /// United States (Florida) + US_FL, + #[cfg(feature = "US")] + /// United States (Georgia) + US_GA, + #[cfg(feature = "US")] + /// United States (Guam) + US_GU, + #[cfg(feature = "US")] + /// United States (Hawaii) + US_HI, + #[cfg(feature = "US")] + /// United States (Iowa) + US_IA, + #[cfg(feature = "US")] + /// United States (Idaho) + US_ID, + #[cfg(feature = "US")] + /// United States (Illinois) + US_IL, + #[cfg(feature = "US")] + /// United States (Indiana) + US_IN, + #[cfg(feature = "US")] + /// United States (Kansas) + US_KS, + #[cfg(feature = "US")] + /// United States (Kentucky) + US_KY, + #[cfg(feature = "US")] + /// United States (Louisiana) + US_LA, + #[cfg(feature = "US")] + /// United States (Massachusetts) + US_MA, + #[cfg(feature = "US")] + /// United States (Maryland) + US_MD, + #[cfg(feature = "US")] + /// United States (Maine) + US_ME, + #[cfg(feature = "US")] + /// United States (Michigan) + US_MI, + #[cfg(feature = "US")] + /// United States (Minnesota) + US_MN, + #[cfg(feature = "US")] + /// United States (Missouri) + US_MO, + #[cfg(feature = "US")] + /// United States (Northern Mariana Islands) + US_MP, + #[cfg(feature = "US")] + /// United States (Mississippi) + US_MS, + #[cfg(feature = "US")] + /// United States (Montana) + US_MT, + #[cfg(feature = "US")] + /// United States (North Carolina) + US_NC, + #[cfg(feature = "US")] + /// United States (North Dakota) + US_ND, + #[cfg(feature = "US")] + /// United States (Nebraska) + US_NE, + #[cfg(feature = "US")] + /// United States (New Hampshire) + US_NH, + #[cfg(feature = "US")] + /// United States (New Jersey) + US_NJ, + #[cfg(feature = "US")] + /// United States (New Mexico) + US_NM, + #[cfg(feature = "US")] + /// United States (Nevada) + US_NV, + #[cfg(feature = "US")] + /// United States (New York) + US_NY, + #[cfg(feature = "US")] + /// United States (Ohio) + US_OH, + #[cfg(feature = "US")] + /// United States (Oklahoma) + US_OK, + #[cfg(feature = "US")] + /// United States (Oregon) + US_OR, + #[cfg(feature = "US")] + /// United States (Pennsylvania) + US_PA, + #[cfg(feature = "US")] + /// United States (Puerto Rico) + US_PR, + #[cfg(feature = "US")] + /// United States (Rhode Island) + US_RI, + #[cfg(feature = "US")] + /// United States (South Carolina) + US_SC, + #[cfg(feature = "US")] + /// United States (South Dakota) + US_SD, + #[cfg(feature = "US")] + /// United States (Tennessee) + US_TN, + #[cfg(feature = "US")] + /// United States (Texas) + US_TX, + #[cfg(feature = "US")] + /// United States (United States Minor Outlying Islands) + US_UM, + #[cfg(feature = "US")] + /// United States (Utah) + US_UT, + #[cfg(feature = "US")] + /// United States (Virginia) + US_VA, + #[cfg(feature = "US")] + /// United States (Virgin Islands, U.S..) + US_VI, + #[cfg(feature = "US")] + /// United States (Vermont) + US_VT, + #[cfg(feature = "US")] + /// United States (Washington) + US_WA, + #[cfg(feature = "US")] + /// United States (Wisconsin) + US_WI, + #[cfg(feature = "US")] + /// United States (West Virginia) + US_WV, + #[cfg(feature = "US")] + /// United States (Wyoming) + US_WY, #[cfg(feature = "UY")] /// Uruguay UY, @@ -388,6 +611,40 @@ impl AsRef for Country { Country::GE => "GE", #[cfg(feature = "DE")] Country::DE => "DE", + #[cfg(feature = "DE")] + Country::DE_BB => "DE_BB", + #[cfg(feature = "DE")] + Country::DE_BE => "DE_BE", + #[cfg(feature = "DE")] + Country::DE_BW => "DE_BW", + #[cfg(feature = "DE")] + Country::DE_BY => "DE_BY", + #[cfg(feature = "DE")] + Country::DE_BYP => "DE_BYP", + #[cfg(feature = "DE")] + Country::DE_HB => "DE_HB", + #[cfg(feature = "DE")] + Country::DE_HE => "DE_HE", + #[cfg(feature = "DE")] + Country::DE_HH => "DE_HH", + #[cfg(feature = "DE")] + Country::DE_MV => "DE_MV", + #[cfg(feature = "DE")] + Country::DE_NI => "DE_NI", + #[cfg(feature = "DE")] + Country::DE_NW => "DE_NW", + #[cfg(feature = "DE")] + Country::DE_RP => "DE_RP", + #[cfg(feature = "DE")] + Country::DE_SH => "DE_SH", + #[cfg(feature = "DE")] + Country::DE_SL => "DE_SL", + #[cfg(feature = "DE")] + Country::DE_SN => "DE_SN", + #[cfg(feature = "DE")] + Country::DE_ST => "DE_ST", + #[cfg(feature = "DE")] + Country::DE_TH => "DE_TH", #[cfg(feature = "GR")] Country::GR => "GR", #[cfg(feature = "HN")] @@ -508,6 +765,120 @@ impl AsRef for Country { Country::GB => "GB", #[cfg(feature = "US")] Country::US => "US", + #[cfg(feature = "US")] + Country::US_AK => "US_AK", + #[cfg(feature = "US")] + Country::US_AL => "US_AL", + #[cfg(feature = "US")] + Country::US_AR => "US_AR", + #[cfg(feature = "US")] + Country::US_AS => "US_AS", + #[cfg(feature = "US")] + Country::US_AZ => "US_AZ", + #[cfg(feature = "US")] + Country::US_CA => "US_CA", + #[cfg(feature = "US")] + Country::US_CO => "US_CO", + #[cfg(feature = "US")] + Country::US_CT => "US_CT", + #[cfg(feature = "US")] + Country::US_DC => "US_DC", + #[cfg(feature = "US")] + Country::US_DE => "US_DE", + #[cfg(feature = "US")] + Country::US_FL => "US_FL", + #[cfg(feature = "US")] + Country::US_GA => "US_GA", + #[cfg(feature = "US")] + Country::US_GU => "US_GU", + #[cfg(feature = "US")] + Country::US_HI => "US_HI", + #[cfg(feature = "US")] + Country::US_IA => "US_IA", + #[cfg(feature = "US")] + Country::US_ID => "US_ID", + #[cfg(feature = "US")] + Country::US_IL => "US_IL", + #[cfg(feature = "US")] + Country::US_IN => "US_IN", + #[cfg(feature = "US")] + Country::US_KS => "US_KS", + #[cfg(feature = "US")] + Country::US_KY => "US_KY", + #[cfg(feature = "US")] + Country::US_LA => "US_LA", + #[cfg(feature = "US")] + Country::US_MA => "US_MA", + #[cfg(feature = "US")] + Country::US_MD => "US_MD", + #[cfg(feature = "US")] + Country::US_ME => "US_ME", + #[cfg(feature = "US")] + Country::US_MI => "US_MI", + #[cfg(feature = "US")] + Country::US_MN => "US_MN", + #[cfg(feature = "US")] + Country::US_MO => "US_MO", + #[cfg(feature = "US")] + Country::US_MP => "US_MP", + #[cfg(feature = "US")] + Country::US_MS => "US_MS", + #[cfg(feature = "US")] + Country::US_MT => "US_MT", + #[cfg(feature = "US")] + Country::US_NC => "US_NC", + #[cfg(feature = "US")] + Country::US_ND => "US_ND", + #[cfg(feature = "US")] + Country::US_NE => "US_NE", + #[cfg(feature = "US")] + Country::US_NH => "US_NH", + #[cfg(feature = "US")] + Country::US_NJ => "US_NJ", + #[cfg(feature = "US")] + Country::US_NM => "US_NM", + #[cfg(feature = "US")] + Country::US_NV => "US_NV", + #[cfg(feature = "US")] + Country::US_NY => "US_NY", + #[cfg(feature = "US")] + Country::US_OH => "US_OH", + #[cfg(feature = "US")] + Country::US_OK => "US_OK", + #[cfg(feature = "US")] + Country::US_OR => "US_OR", + #[cfg(feature = "US")] + Country::US_PA => "US_PA", + #[cfg(feature = "US")] + Country::US_PR => "US_PR", + #[cfg(feature = "US")] + Country::US_RI => "US_RI", + #[cfg(feature = "US")] + Country::US_SC => "US_SC", + #[cfg(feature = "US")] + Country::US_SD => "US_SD", + #[cfg(feature = "US")] + Country::US_TN => "US_TN", + #[cfg(feature = "US")] + Country::US_TX => "US_TX", + #[cfg(feature = "US")] + Country::US_UM => "US_UM", + #[cfg(feature = "US")] + Country::US_UT => "US_UT", + #[cfg(feature = "US")] + Country::US_VA => "US_VA", + #[cfg(feature = "US")] + Country::US_VI => "US_VI", + #[cfg(feature = "US")] + Country::US_VT => "US_VT", + #[cfg(feature = "US")] + Country::US_WA => "US_WA", + #[cfg(feature = "US")] + Country::US_WI => "US_WI", + #[cfg(feature = "US")] + Country::US_WV => "US_WV", + #[cfg(feature = "US")] + Country::US_WY => "US_WY", #[cfg(feature = "UY")] Country::UY => "UY", #[cfg(feature = "UZ")] @@ -599,6 +970,40 @@ impl std::str::FromStr for Country { "GE" => Country::GE, #[cfg(feature = "DE")] "DE" => Country::DE, + #[cfg(feature = "DE")] + "DE_BB" => Country::DE_BB, + #[cfg(feature = "DE")] + "DE_BE" => Country::DE_BE, + #[cfg(feature = "DE")] + "DE_BW" => Country::DE_BW, + #[cfg(feature = "DE")] + "DE_BY" => Country::DE_BY, + #[cfg(feature = "DE")] + "DE_BYP" => Country::DE_BYP, + #[cfg(feature = "DE")] + "DE_HB" => Country::DE_HB, + #[cfg(feature = "DE")] + "DE_HE" => Country::DE_HE, + #[cfg(feature = "DE")] + "DE_HH" => Country::DE_HH, + #[cfg(feature = "DE")] + "DE_MV" => Country::DE_MV, + #[cfg(feature = "DE")] + "DE_NI" => Country::DE_NI, + #[cfg(feature = "DE")] + "DE_NW" => Country::DE_NW, + #[cfg(feature = "DE")] + "DE_RP" => Country::DE_RP, + #[cfg(feature = "DE")] + "DE_SH" => Country::DE_SH, + #[cfg(feature = "DE")] + "DE_SL" => Country::DE_SL, + #[cfg(feature = "DE")] + "DE_SN" => Country::DE_SN, + #[cfg(feature = "DE")] + "DE_ST" => Country::DE_ST, + #[cfg(feature = "DE")] + "DE_TH" => Country::DE_TH, #[cfg(feature = "GR")] "GR" => Country::GR, #[cfg(feature = "HN")] @@ -719,6 +1124,120 @@ impl std::str::FromStr for Country { "GB" => Country::GB, #[cfg(feature = "US")] "US" => Country::US, + #[cfg(feature = "US")] + "US_AK" => Country::US_AK, + #[cfg(feature = "US")] + "US_AL" => Country::US_AL, + #[cfg(feature = "US")] + "US_AR" => Country::US_AR, + #[cfg(feature = "US")] + "US_AS" => Country::US_AS, + #[cfg(feature = "US")] + "US_AZ" => Country::US_AZ, + #[cfg(feature = "US")] + "US_CA" => Country::US_CA, + #[cfg(feature = "US")] + "US_CO" => Country::US_CO, + #[cfg(feature = "US")] + "US_CT" => Country::US_CT, + #[cfg(feature = "US")] + "US_DC" => Country::US_DC, + #[cfg(feature = "US")] + "US_DE" => Country::US_DE, + #[cfg(feature = "US")] + "US_FL" => Country::US_FL, + #[cfg(feature = "US")] + "US_GA" => Country::US_GA, + #[cfg(feature = "US")] + "US_GU" => Country::US_GU, + #[cfg(feature = "US")] + "US_HI" => Country::US_HI, + #[cfg(feature = "US")] + "US_IA" => Country::US_IA, + #[cfg(feature = "US")] + "US_ID" => Country::US_ID, + #[cfg(feature = "US")] + "US_IL" => Country::US_IL, + #[cfg(feature = "US")] + "US_IN" => Country::US_IN, + #[cfg(feature = "US")] + "US_KS" => Country::US_KS, + #[cfg(feature = "US")] + "US_KY" => Country::US_KY, + #[cfg(feature = "US")] + "US_LA" => Country::US_LA, + #[cfg(feature = "US")] + "US_MA" => Country::US_MA, + #[cfg(feature = "US")] + "US_MD" => Country::US_MD, + #[cfg(feature = "US")] + "US_ME" => Country::US_ME, + #[cfg(feature = "US")] + "US_MI" => Country::US_MI, + #[cfg(feature = "US")] + "US_MN" => Country::US_MN, + #[cfg(feature = "US")] + "US_MO" => Country::US_MO, + #[cfg(feature = "US")] + "US_MP" => Country::US_MP, + #[cfg(feature = "US")] + "US_MS" => Country::US_MS, + #[cfg(feature = "US")] + "US_MT" => Country::US_MT, + #[cfg(feature = "US")] + "US_NC" => Country::US_NC, + #[cfg(feature = "US")] + "US_ND" => Country::US_ND, + #[cfg(feature = "US")] + "US_NE" => Country::US_NE, + #[cfg(feature = "US")] + "US_NH" => Country::US_NH, + #[cfg(feature = "US")] + "US_NJ" => Country::US_NJ, + #[cfg(feature = "US")] + "US_NM" => Country::US_NM, + #[cfg(feature = "US")] + "US_NV" => Country::US_NV, + #[cfg(feature = "US")] + "US_NY" => Country::US_NY, + #[cfg(feature = "US")] + "US_OH" => Country::US_OH, + #[cfg(feature = "US")] + "US_OK" => Country::US_OK, + #[cfg(feature = "US")] + "US_OR" => Country::US_OR, + #[cfg(feature = "US")] + "US_PA" => Country::US_PA, + #[cfg(feature = "US")] + "US_PR" => Country::US_PR, + #[cfg(feature = "US")] + "US_RI" => Country::US_RI, + #[cfg(feature = "US")] + "US_SC" => Country::US_SC, + #[cfg(feature = "US")] + "US_SD" => Country::US_SD, + #[cfg(feature = "US")] + "US_TN" => Country::US_TN, + #[cfg(feature = "US")] + "US_TX" => Country::US_TX, + #[cfg(feature = "US")] + "US_UM" => Country::US_UM, + #[cfg(feature = "US")] + "US_UT" => Country::US_UT, + #[cfg(feature = "US")] + "US_VA" => Country::US_VA, + #[cfg(feature = "US")] + "US_VI" => Country::US_VI, + #[cfg(feature = "US")] + "US_VT" => Country::US_VT, + #[cfg(feature = "US")] + "US_WA" => Country::US_WA, + #[cfg(feature = "US")] + "US_WI" => Country::US_WI, + #[cfg(feature = "US")] + "US_WV" => Country::US_WV, + #[cfg(feature = "US")] + "US_WY" => Country::US_WY, #[cfg(feature = "UY")] "UY" => Country::UY, #[cfg(feature = "UZ")] diff --git a/src/data/ae.rs b/src/data/ae.rs index 5f64582..c8097bd 100644 --- a/src/data/ae.rs +++ b/src/data/ae.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for United Arab Emirates. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/am.rs b/src/data/am.rs index e864820..23ad739 100644 --- a/src/data/am.rs +++ b/src/data/am.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Armenia. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/ao.rs b/src/data/ao.rs index 5206bfb..3120ab2 100644 --- a/src/data/ao.rs +++ b/src/data/ao.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Angola. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/ar.rs b/src/data/ar.rs index b366805..6400a45 100644 --- a/src/data/ar.rs +++ b/src/data/ar.rs @@ -4,32 +4,32 @@ use super::*; /// Generate holiday map for Argentina. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); build_year( - years, - 2000, - vec![ + 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", - ); + (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, @@ -576,34 +576,34 @@ pub fn build( ); build_year( - years, - 2013, - vec![ + 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", - ); + (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, diff --git a/src/data/at.rs b/src/data/at.rs index 634af80..20a92fd 100644 --- a/src/data/at.rs +++ b/src/data/at.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Austria. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/au.rs b/src/data/au.rs index 30f284e..bec4c99 100644 --- a/src/data/au.rs +++ b/src/data/au.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Australia. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/aw.rs b/src/data/aw.rs index c83cc14..8376aba 100644 --- a/src/data/aw.rs +++ b/src/data/aw.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Aruba. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/az.rs b/src/data/az.rs index 4a2f9d2..e28eb42 100644 --- a/src/data/az.rs +++ b/src/data/az.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Azerbaijan. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); @@ -301,37 +301,37 @@ pub fn build( ); build_year( - years, - 2007, - vec![ + 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", - ); + (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, diff --git a/src/data/ba.rs b/src/data/ba.rs index 3c6fae2..994fcbc 100644 --- a/src/data/ba.rs +++ b/src/data/ba.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Bosnia and Herzegovina. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/bd.rs b/src/data/bd.rs index 23f7981..54c87a0 100644 --- a/src/data/bd.rs +++ b/src/data/bd.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Bangladesh. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/be.rs b/src/data/be.rs index ddb3d55..5aa6028 100644 --- a/src/data/be.rs +++ b/src/data/be.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Belgium. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/bg.rs b/src/data/bg.rs index c0460bb..cfb727f 100644 --- a/src/data/bg.rs +++ b/src/data/bg.rs @@ -4,815 +4,815 @@ use super::*; /// Generate holiday map for Bulgaria. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + 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", - ); + 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", - ); + 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", - ); + 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", - ); + 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", - ); + 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", - ); + 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", - ); + 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", - ); + 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", - ); + 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", - ); + 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", - ); + 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", - ); + 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", - ); + 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", - ); + 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", - ); + 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", - ); + 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", - ); + 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", - ); + 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", - ); + 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", - ); + 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", - ); + 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", - ); + 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", - ); + 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", - ); + 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", - ); + 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", - ); + 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", - ); + 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", - ); + 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", - ); + 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", - ); + 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", - ); + 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 index 026d0a1..b80860f 100644 --- a/src/data/bi.rs +++ b/src/data/bi.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Burundi. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/bo.rs b/src/data/bo.rs index 3b35487..e10d7be 100644 --- a/src/data/bo.rs +++ b/src/data/bo.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Bolivia. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/br.rs b/src/data/br.rs index 2a03bae..d30c4d8 100644 --- a/src/data/br.rs +++ b/src/data/br.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Brazil. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/bw.rs b/src/data/bw.rs index 7358f8d..699e957 100644 --- a/src/data/bw.rs +++ b/src/data/bw.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Botswana. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/by.rs b/src/data/by.rs index 7b211a8..311e43e 100644 --- a/src/data/by.rs +++ b/src/data/by.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Belarus. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/ca.rs b/src/data/ca.rs index fc429ab..20dede4 100644 --- a/src/data/ca.rs +++ b/src/data/ca.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Canada. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/ch.rs b/src/data/ch.rs index eea9fb0..0042a6d 100644 --- a/src/data/ch.rs +++ b/src/data/ch.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Switzerland. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/cl.rs b/src/data/cl.rs index 4ea7b0b..23959be 100644 --- a/src/data/cl.rs +++ b/src/data/cl.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Chile. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/cn.rs b/src/data/cn.rs index c155583..b75d4f3 100644 --- a/src/data/cn.rs +++ b/src/data/cn.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for China. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/co.rs b/src/data/co.rs index e5416cd..f058714 100644 --- a/src/data/co.rs +++ b/src/data/co.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Colombia. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/cu.rs b/src/data/cu.rs index 62c8c1b..aa38d2c 100644 --- a/src/data/cu.rs +++ b/src/data/cu.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Cuba. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/cw.rs b/src/data/cw.rs index 825b4b1..d1d7874 100644 --- a/src/data/cw.rs +++ b/src/data/cw.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Curaçao. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/cy.rs b/src/data/cy.rs index 565358e..8edd85d 100644 --- a/src/data/cy.rs +++ b/src/data/cy.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Cyprus. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/cz.rs b/src/data/cz.rs index 3c9d059..092681a 100644 --- a/src/data/cz.rs +++ b/src/data/cz.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Czechia. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/de.rs b/src/data/de.rs index 09fc116..8f73282 100644 --- a/src/data/de.rs +++ b/src/data/de.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Germany. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/de_bb.rs b/src/data/de_bb.rs new file mode 100644 index 0000000..8f96664 --- /dev/null +++ b/src/data/de_bb.rs @@ -0,0 +1,975 @@ +//! Germany (Brandenburg) +use super::*; + +/// Generate holiday map for Germany (Brandenburg). +#[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", + ), + (NaiveDate::from_ymd_res(2000, 4, 23)?, "Ostersonntag"), + (NaiveDate::from_ymd_res(2000, 6, 11)?, "Pfingstsonntag"), + (NaiveDate::from_ymd_res(2000, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_BB, + "Germany (Brandenburg)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2001, 4, 15)?, "Ostersonntag"), + (NaiveDate::from_ymd_res(2001, 6, 3)?, "Pfingstsonntag"), + (NaiveDate::from_ymd_res(2001, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_BB, + "Germany (Brandenburg)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2002, 3, 31)?, "Ostersonntag"), + (NaiveDate::from_ymd_res(2002, 5, 19)?, "Pfingstsonntag"), + (NaiveDate::from_ymd_res(2002, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_BB, + "Germany (Brandenburg)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2003, 4, 20)?, "Ostersonntag"), + (NaiveDate::from_ymd_res(2003, 6, 8)?, "Pfingstsonntag"), + (NaiveDate::from_ymd_res(2003, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_BB, + "Germany (Brandenburg)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2004, 4, 11)?, "Ostersonntag"), + (NaiveDate::from_ymd_res(2004, 5, 30)?, "Pfingstsonntag"), + (NaiveDate::from_ymd_res(2004, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_BB, + "Germany (Brandenburg)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2005, 3, 27)?, "Ostersonntag"), + (NaiveDate::from_ymd_res(2005, 5, 15)?, "Pfingstsonntag"), + (NaiveDate::from_ymd_res(2005, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_BB, + "Germany (Brandenburg)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2006, 4, 16)?, "Ostersonntag"), + (NaiveDate::from_ymd_res(2006, 6, 4)?, "Pfingstsonntag"), + (NaiveDate::from_ymd_res(2006, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_BB, + "Germany (Brandenburg)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2007, 4, 8)?, "Ostersonntag"), + (NaiveDate::from_ymd_res(2007, 5, 27)?, "Pfingstsonntag"), + (NaiveDate::from_ymd_res(2007, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_BB, + "Germany (Brandenburg)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2008, 3, 23)?, "Ostersonntag"), + (NaiveDate::from_ymd_res(2008, 5, 11)?, "Pfingstsonntag"), + (NaiveDate::from_ymd_res(2008, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_BB, + "Germany (Brandenburg)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2009, 4, 12)?, "Ostersonntag"), + (NaiveDate::from_ymd_res(2009, 5, 31)?, "Pfingstsonntag"), + (NaiveDate::from_ymd_res(2009, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_BB, + "Germany (Brandenburg)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2010, 4, 4)?, "Ostersonntag"), + (NaiveDate::from_ymd_res(2010, 5, 23)?, "Pfingstsonntag"), + (NaiveDate::from_ymd_res(2010, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_BB, + "Germany (Brandenburg)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2011, 4, 24)?, "Ostersonntag"), + (NaiveDate::from_ymd_res(2011, 6, 12)?, "Pfingstsonntag"), + (NaiveDate::from_ymd_res(2011, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_BB, + "Germany (Brandenburg)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2012, 4, 8)?, "Ostersonntag"), + (NaiveDate::from_ymd_res(2012, 5, 27)?, "Pfingstsonntag"), + (NaiveDate::from_ymd_res(2012, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_BB, + "Germany (Brandenburg)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2013, 3, 31)?, "Ostersonntag"), + (NaiveDate::from_ymd_res(2013, 5, 19)?, "Pfingstsonntag"), + (NaiveDate::from_ymd_res(2013, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_BB, + "Germany (Brandenburg)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2014, 4, 20)?, "Ostersonntag"), + (NaiveDate::from_ymd_res(2014, 6, 8)?, "Pfingstsonntag"), + (NaiveDate::from_ymd_res(2014, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_BB, + "Germany (Brandenburg)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2015, 4, 5)?, "Ostersonntag"), + (NaiveDate::from_ymd_res(2015, 5, 24)?, "Pfingstsonntag"), + (NaiveDate::from_ymd_res(2015, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_BB, + "Germany (Brandenburg)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2016, 3, 27)?, "Ostersonntag"), + (NaiveDate::from_ymd_res(2016, 5, 15)?, "Pfingstsonntag"), + (NaiveDate::from_ymd_res(2016, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_BB, + "Germany (Brandenburg)", + ); + + 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"), + (NaiveDate::from_ymd_res(2017, 4, 16)?, "Ostersonntag"), + (NaiveDate::from_ymd_res(2017, 6, 4)?, "Pfingstsonntag"), + ], + &mut map, + Country::DE_BB, + "Germany (Brandenburg)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2018, 4, 1)?, "Ostersonntag"), + (NaiveDate::from_ymd_res(2018, 5, 20)?, "Pfingstsonntag"), + (NaiveDate::from_ymd_res(2018, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_BB, + "Germany (Brandenburg)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2019, 4, 21)?, "Ostersonntag"), + (NaiveDate::from_ymd_res(2019, 6, 9)?, "Pfingstsonntag"), + (NaiveDate::from_ymd_res(2019, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_BB, + "Germany (Brandenburg)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2020, 4, 12)?, "Ostersonntag"), + (NaiveDate::from_ymd_res(2020, 5, 31)?, "Pfingstsonntag"), + (NaiveDate::from_ymd_res(2020, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_BB, + "Germany (Brandenburg)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2021, 4, 4)?, "Ostersonntag"), + (NaiveDate::from_ymd_res(2021, 5, 23)?, "Pfingstsonntag"), + (NaiveDate::from_ymd_res(2021, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_BB, + "Germany (Brandenburg)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2022, 4, 17)?, "Ostersonntag"), + (NaiveDate::from_ymd_res(2022, 6, 5)?, "Pfingstsonntag"), + (NaiveDate::from_ymd_res(2022, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_BB, + "Germany (Brandenburg)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2023, 4, 9)?, "Ostersonntag"), + (NaiveDate::from_ymd_res(2023, 5, 28)?, "Pfingstsonntag"), + (NaiveDate::from_ymd_res(2023, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_BB, + "Germany (Brandenburg)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2024, 3, 31)?, "Ostersonntag"), + (NaiveDate::from_ymd_res(2024, 5, 19)?, "Pfingstsonntag"), + (NaiveDate::from_ymd_res(2024, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_BB, + "Germany (Brandenburg)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2025, 4, 20)?, "Ostersonntag"), + (NaiveDate::from_ymd_res(2025, 6, 8)?, "Pfingstsonntag"), + (NaiveDate::from_ymd_res(2025, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_BB, + "Germany (Brandenburg)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2026, 4, 5)?, "Ostersonntag"), + (NaiveDate::from_ymd_res(2026, 5, 24)?, "Pfingstsonntag"), + (NaiveDate::from_ymd_res(2026, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_BB, + "Germany (Brandenburg)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2027, 3, 28)?, "Ostersonntag"), + (NaiveDate::from_ymd_res(2027, 5, 16)?, "Pfingstsonntag"), + (NaiveDate::from_ymd_res(2027, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_BB, + "Germany (Brandenburg)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2028, 4, 16)?, "Ostersonntag"), + (NaiveDate::from_ymd_res(2028, 6, 4)?, "Pfingstsonntag"), + (NaiveDate::from_ymd_res(2028, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_BB, + "Germany (Brandenburg)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2029, 4, 1)?, "Ostersonntag"), + (NaiveDate::from_ymd_res(2029, 5, 20)?, "Pfingstsonntag"), + (NaiveDate::from_ymd_res(2029, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_BB, + "Germany (Brandenburg)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2030, 4, 21)?, "Ostersonntag"), + (NaiveDate::from_ymd_res(2030, 6, 9)?, "Pfingstsonntag"), + (NaiveDate::from_ymd_res(2030, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_BB, + "Germany (Brandenburg)", + ); + + Ok(map) +} diff --git a/src/data/de_be.rs b/src/data/de_be.rs new file mode 100644 index 0000000..dae7f0a --- /dev/null +++ b/src/data/de_be.rs @@ -0,0 +1,921 @@ +//! Germany (Berlin) +use super::*; + +/// Generate holiday map for Germany (Berlin). +#[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_BE, + "Germany (Berlin)", + ); + + 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_BE, + "Germany (Berlin)", + ); + + 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_BE, + "Germany (Berlin)", + ); + + 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_BE, + "Germany (Berlin)", + ); + + 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_BE, + "Germany (Berlin)", + ); + + 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_BE, + "Germany (Berlin)", + ); + + 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_BE, + "Germany (Berlin)", + ); + + 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_BE, + "Germany (Berlin)", + ); + + 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_BE, + "Germany (Berlin)", + ); + + 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_BE, + "Germany (Berlin)", + ); + + 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_BE, + "Germany (Berlin)", + ); + + 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_BE, + "Germany (Berlin)", + ); + + 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_BE, + "Germany (Berlin)", + ); + + 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_BE, + "Germany (Berlin)", + ); + + 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_BE, + "Germany (Berlin)", + ); + + 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_BE, + "Germany (Berlin)", + ); + + 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_BE, + "Germany (Berlin)", + ); + + 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_BE, + "Germany (Berlin)", + ); + + 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_BE, + "Germany (Berlin)", + ); + + 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", + ), + ( + NaiveDate::from_ymd_res(2019, 3, 8)?, + "Internationaler Frauentag", + ), + ], + &mut map, + Country::DE_BE, + "Germany (Berlin)", + ); + + 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"), + (NaiveDate::from_ymd_res(2020, 3, 8)?, "Internationaler Frauentag"), + (NaiveDate::from_ymd_res(2020, 5, 8)?, "75. Jahrestag der Befreiung vom Nationalsozialismus und der Beendigung des Zweiten Weltkriegs in Europa"), + ], + &mut map, + Country::DE_BE, + "Germany (Berlin)", + ); + + 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", + ), + ( + NaiveDate::from_ymd_res(2021, 3, 8)?, + "Internationaler Frauentag", + ), + ], + &mut map, + Country::DE_BE, + "Germany (Berlin)", + ); + + 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", + ), + ( + NaiveDate::from_ymd_res(2022, 3, 8)?, + "Internationaler Frauentag", + ), + ], + &mut map, + Country::DE_BE, + "Germany (Berlin)", + ); + + 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", + ), + ( + NaiveDate::from_ymd_res(2023, 3, 8)?, + "Internationaler Frauentag", + ), + ], + &mut map, + Country::DE_BE, + "Germany (Berlin)", + ); + + 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", + ), + ( + NaiveDate::from_ymd_res(2024, 3, 8)?, + "Internationaler Frauentag", + ), + ], + &mut map, + Country::DE_BE, + "Germany (Berlin)", + ); + + 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", + ), + ( + NaiveDate::from_ymd_res(2025, 3, 8)?, + "Internationaler Frauentag", + ), + ], + &mut map, + Country::DE_BE, + "Germany (Berlin)", + ); + + 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", + ), + ( + NaiveDate::from_ymd_res(2026, 3, 8)?, + "Internationaler Frauentag", + ), + ], + &mut map, + Country::DE_BE, + "Germany (Berlin)", + ); + + 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", + ), + ( + NaiveDate::from_ymd_res(2027, 3, 8)?, + "Internationaler Frauentag", + ), + ], + &mut map, + Country::DE_BE, + "Germany (Berlin)", + ); + + 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", + ), + ( + NaiveDate::from_ymd_res(2028, 3, 8)?, + "Internationaler Frauentag", + ), + ], + &mut map, + Country::DE_BE, + "Germany (Berlin)", + ); + + 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", + ), + ( + NaiveDate::from_ymd_res(2029, 3, 8)?, + "Internationaler Frauentag", + ), + ], + &mut map, + Country::DE_BE, + "Germany (Berlin)", + ); + + 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", + ), + ( + NaiveDate::from_ymd_res(2030, 3, 8)?, + "Internationaler Frauentag", + ), + ], + &mut map, + Country::DE_BE, + "Germany (Berlin)", + ); + + Ok(map) +} diff --git a/src/data/de_bw.rs b/src/data/de_bw.rs new file mode 100644 index 0000000..ca543cc --- /dev/null +++ b/src/data/de_bw.rs @@ -0,0 +1,976 @@ +//! Germany (Baden-Württemberg) +use super::*; + +/// Generate holiday map for Germany (Baden-Württemberg). +#[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", + ), + (NaiveDate::from_ymd_res(2000, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2000, 6, 22)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2000, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BW, + "Germany (Baden-Württemberg)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2001, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2001, 6, 14)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2001, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BW, + "Germany (Baden-Württemberg)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2002, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2002, 5, 30)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2002, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BW, + "Germany (Baden-Württemberg)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2003, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2003, 6, 19)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2003, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BW, + "Germany (Baden-Württemberg)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2004, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2004, 6, 10)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2004, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BW, + "Germany (Baden-Württemberg)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2005, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2005, 5, 26)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2005, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BW, + "Germany (Baden-Württemberg)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2006, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2006, 6, 15)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2006, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BW, + "Germany (Baden-Württemberg)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2007, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2007, 6, 7)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2007, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BW, + "Germany (Baden-Württemberg)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2008, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2008, 5, 22)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2008, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BW, + "Germany (Baden-Württemberg)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2009, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2009, 6, 11)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2009, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BW, + "Germany (Baden-Württemberg)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2010, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2010, 6, 3)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2010, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BW, + "Germany (Baden-Württemberg)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2011, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2011, 6, 23)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2011, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BW, + "Germany (Baden-Württemberg)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2012, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2012, 6, 7)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2012, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BW, + "Germany (Baden-Württemberg)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2013, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2013, 5, 30)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2013, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BW, + "Germany (Baden-Württemberg)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2014, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2014, 6, 19)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2014, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BW, + "Germany (Baden-Württemberg)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2015, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2015, 6, 4)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2015, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BW, + "Germany (Baden-Württemberg)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2016, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2016, 5, 26)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2016, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BW, + "Germany (Baden-Württemberg)", + ); + + 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"), + (NaiveDate::from_ymd_res(2017, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2017, 6, 15)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2017, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BW, + "Germany (Baden-Württemberg)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2018, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2018, 5, 31)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2018, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BW, + "Germany (Baden-Württemberg)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2019, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2019, 6, 20)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2019, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BW, + "Germany (Baden-Württemberg)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2020, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2020, 6, 11)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2020, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BW, + "Germany (Baden-Württemberg)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2021, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2021, 6, 3)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2021, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BW, + "Germany (Baden-Württemberg)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2022, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2022, 6, 16)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2022, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BW, + "Germany (Baden-Württemberg)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2023, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2023, 6, 8)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2023, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BW, + "Germany (Baden-Württemberg)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2024, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2024, 5, 30)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2024, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BW, + "Germany (Baden-Württemberg)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2025, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2025, 6, 19)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2025, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BW, + "Germany (Baden-Württemberg)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2026, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2026, 6, 4)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2026, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BW, + "Germany (Baden-Württemberg)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2027, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2027, 5, 27)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2027, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BW, + "Germany (Baden-Württemberg)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2028, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2028, 6, 15)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2028, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BW, + "Germany (Baden-Württemberg)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2029, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2029, 5, 31)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2029, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BW, + "Germany (Baden-Württemberg)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2030, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2030, 6, 20)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2030, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BW, + "Germany (Baden-Württemberg)", + ); + + Ok(map) +} diff --git a/src/data/de_by.rs b/src/data/de_by.rs new file mode 100644 index 0000000..d72e274 --- /dev/null +++ b/src/data/de_by.rs @@ -0,0 +1,1007 @@ +//! Germany (Bavaria (Bayern)) +use super::*; + +/// Generate holiday map for Germany (Bavaria (Bayern)). +#[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", + ), + (NaiveDate::from_ymd_res(2000, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2000, 6, 22)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2000, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2000, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BY, + "Germany (Bavaria (Bayern))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2001, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2001, 6, 14)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2001, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2001, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BY, + "Germany (Bavaria (Bayern))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2002, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2002, 5, 30)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2002, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2002, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BY, + "Germany (Bavaria (Bayern))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2003, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2003, 6, 19)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2003, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2003, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BY, + "Germany (Bavaria (Bayern))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2004, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2004, 6, 10)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2004, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2004, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BY, + "Germany (Bavaria (Bayern))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2005, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2005, 5, 26)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2005, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2005, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BY, + "Germany (Bavaria (Bayern))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2006, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2006, 6, 15)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2006, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2006, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BY, + "Germany (Bavaria (Bayern))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2007, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2007, 6, 7)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2007, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2007, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BY, + "Germany (Bavaria (Bayern))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2008, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2008, 5, 22)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2008, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2008, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BY, + "Germany (Bavaria (Bayern))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2009, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2009, 6, 11)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2009, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2009, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BY, + "Germany (Bavaria (Bayern))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2010, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2010, 6, 3)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2010, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2010, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BY, + "Germany (Bavaria (Bayern))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2011, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2011, 6, 23)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2011, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2011, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BY, + "Germany (Bavaria (Bayern))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2012, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2012, 6, 7)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2012, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2012, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BY, + "Germany (Bavaria (Bayern))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2013, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2013, 5, 30)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2013, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2013, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BY, + "Germany (Bavaria (Bayern))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2014, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2014, 6, 19)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2014, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2014, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BY, + "Germany (Bavaria (Bayern))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2015, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2015, 6, 4)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2015, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2015, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BY, + "Germany (Bavaria (Bayern))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2016, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2016, 5, 26)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2016, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2016, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BY, + "Germany (Bavaria (Bayern))", + ); + + 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"), + (NaiveDate::from_ymd_res(2017, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2017, 6, 15)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2017, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2017, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BY, + "Germany (Bavaria (Bayern))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2018, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2018, 5, 31)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2018, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2018, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BY, + "Germany (Bavaria (Bayern))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2019, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2019, 6, 20)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2019, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2019, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BY, + "Germany (Bavaria (Bayern))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2020, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2020, 6, 11)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2020, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2020, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BY, + "Germany (Bavaria (Bayern))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2021, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2021, 6, 3)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2021, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2021, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BY, + "Germany (Bavaria (Bayern))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2022, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2022, 6, 16)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2022, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2022, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BY, + "Germany (Bavaria (Bayern))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2023, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2023, 6, 8)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2023, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2023, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BY, + "Germany (Bavaria (Bayern))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2024, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2024, 5, 30)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2024, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2024, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BY, + "Germany (Bavaria (Bayern))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2025, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2025, 6, 19)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2025, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2025, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BY, + "Germany (Bavaria (Bayern))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2026, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2026, 6, 4)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2026, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2026, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BY, + "Germany (Bavaria (Bayern))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2027, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2027, 5, 27)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2027, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2027, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BY, + "Germany (Bavaria (Bayern))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2028, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2028, 6, 15)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2028, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2028, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BY, + "Germany (Bavaria (Bayern))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2029, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2029, 5, 31)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2029, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2029, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BY, + "Germany (Bavaria (Bayern))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2030, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2030, 6, 20)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2030, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2030, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BY, + "Germany (Bavaria (Bayern))", + ); + + Ok(map) +} diff --git a/src/data/de_byp.rs b/src/data/de_byp.rs new file mode 100644 index 0000000..727f674 --- /dev/null +++ b/src/data/de_byp.rs @@ -0,0 +1,976 @@ +//! Germany (Bavaria (Bayern) with more protestants) +use super::*; + +/// Generate holiday map for Germany (Bavaria (Bayern) with more protestants). +#[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", + ), + (NaiveDate::from_ymd_res(2000, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2000, 6, 22)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2000, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BYP, + "Germany (Bavaria (Bayern) with more protestants)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2001, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2001, 6, 14)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2001, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BYP, + "Germany (Bavaria (Bayern) with more protestants)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2002, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2002, 5, 30)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2002, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BYP, + "Germany (Bavaria (Bayern) with more protestants)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2003, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2003, 6, 19)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2003, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BYP, + "Germany (Bavaria (Bayern) with more protestants)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2004, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2004, 6, 10)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2004, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BYP, + "Germany (Bavaria (Bayern) with more protestants)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2005, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2005, 5, 26)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2005, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BYP, + "Germany (Bavaria (Bayern) with more protestants)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2006, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2006, 6, 15)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2006, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BYP, + "Germany (Bavaria (Bayern) with more protestants)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2007, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2007, 6, 7)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2007, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BYP, + "Germany (Bavaria (Bayern) with more protestants)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2008, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2008, 5, 22)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2008, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BYP, + "Germany (Bavaria (Bayern) with more protestants)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2009, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2009, 6, 11)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2009, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BYP, + "Germany (Bavaria (Bayern) with more protestants)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2010, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2010, 6, 3)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2010, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BYP, + "Germany (Bavaria (Bayern) with more protestants)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2011, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2011, 6, 23)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2011, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BYP, + "Germany (Bavaria (Bayern) with more protestants)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2012, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2012, 6, 7)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2012, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BYP, + "Germany (Bavaria (Bayern) with more protestants)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2013, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2013, 5, 30)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2013, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BYP, + "Germany (Bavaria (Bayern) with more protestants)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2014, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2014, 6, 19)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2014, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BYP, + "Germany (Bavaria (Bayern) with more protestants)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2015, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2015, 6, 4)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2015, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BYP, + "Germany (Bavaria (Bayern) with more protestants)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2016, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2016, 5, 26)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2016, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BYP, + "Germany (Bavaria (Bayern) with more protestants)", + ); + + 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"), + (NaiveDate::from_ymd_res(2017, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2017, 6, 15)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2017, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BYP, + "Germany (Bavaria (Bayern) with more protestants)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2018, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2018, 5, 31)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2018, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BYP, + "Germany (Bavaria (Bayern) with more protestants)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2019, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2019, 6, 20)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2019, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BYP, + "Germany (Bavaria (Bayern) with more protestants)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2020, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2020, 6, 11)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2020, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BYP, + "Germany (Bavaria (Bayern) with more protestants)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2021, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2021, 6, 3)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2021, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BYP, + "Germany (Bavaria (Bayern) with more protestants)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2022, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2022, 6, 16)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2022, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BYP, + "Germany (Bavaria (Bayern) with more protestants)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2023, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2023, 6, 8)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2023, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BYP, + "Germany (Bavaria (Bayern) with more protestants)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2024, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2024, 5, 30)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2024, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BYP, + "Germany (Bavaria (Bayern) with more protestants)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2025, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2025, 6, 19)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2025, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BYP, + "Germany (Bavaria (Bayern) with more protestants)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2026, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2026, 6, 4)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2026, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BYP, + "Germany (Bavaria (Bayern) with more protestants)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2027, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2027, 5, 27)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2027, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BYP, + "Germany (Bavaria (Bayern) with more protestants)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2028, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2028, 6, 15)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2028, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BYP, + "Germany (Bavaria (Bayern) with more protestants)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2029, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2029, 5, 31)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2029, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BYP, + "Germany (Bavaria (Bayern) with more protestants)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2030, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2030, 6, 20)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2030, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_BYP, + "Germany (Bavaria (Bayern) with more protestants)", + ); + + Ok(map) +} diff --git a/src/data/de_hb.rs b/src/data/de_hb.rs new file mode 100644 index 0000000..756b4a0 --- /dev/null +++ b/src/data/de_hb.rs @@ -0,0 +1,896 @@ +//! Germany (Bremen) +use super::*; + +/// Generate holiday map for Germany (Bremen). +#[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_HB, + "Germany (Bremen)", + ); + + 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_HB, + "Germany (Bremen)", + ); + + 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_HB, + "Germany (Bremen)", + ); + + 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_HB, + "Germany (Bremen)", + ); + + 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_HB, + "Germany (Bremen)", + ); + + 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_HB, + "Germany (Bremen)", + ); + + 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_HB, + "Germany (Bremen)", + ); + + 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_HB, + "Germany (Bremen)", + ); + + 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_HB, + "Germany (Bremen)", + ); + + 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_HB, + "Germany (Bremen)", + ); + + 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_HB, + "Germany (Bremen)", + ); + + 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_HB, + "Germany (Bremen)", + ); + + 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_HB, + "Germany (Bremen)", + ); + + 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_HB, + "Germany (Bremen)", + ); + + 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_HB, + "Germany (Bremen)", + ); + + 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_HB, + "Germany (Bremen)", + ); + + 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_HB, + "Germany (Bremen)", + ); + + 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_HB, + "Germany (Bremen)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2018, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_HB, + "Germany (Bremen)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2019, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_HB, + "Germany (Bremen)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2020, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_HB, + "Germany (Bremen)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2021, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_HB, + "Germany (Bremen)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2022, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_HB, + "Germany (Bremen)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2023, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_HB, + "Germany (Bremen)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2024, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_HB, + "Germany (Bremen)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2025, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_HB, + "Germany (Bremen)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2026, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_HB, + "Germany (Bremen)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2027, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_HB, + "Germany (Bremen)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2028, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_HB, + "Germany (Bremen)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2029, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_HB, + "Germany (Bremen)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2030, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_HB, + "Germany (Bremen)", + ); + + Ok(map) +} diff --git a/src/data/de_he.rs b/src/data/de_he.rs new file mode 100644 index 0000000..0e0f2ee --- /dev/null +++ b/src/data/de_he.rs @@ -0,0 +1,914 @@ +//! Germany (Hesse (Hessen)) +use super::*; + +/// Generate holiday map for Germany (Hesse (Hessen)). +#[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", + ), + (NaiveDate::from_ymd_res(2000, 6, 22)?, "Fronleichnam"), + ], + &mut map, + Country::DE_HE, + "Germany (Hesse (Hessen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2001, 6, 14)?, "Fronleichnam"), + ], + &mut map, + Country::DE_HE, + "Germany (Hesse (Hessen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2002, 5, 30)?, "Fronleichnam"), + ], + &mut map, + Country::DE_HE, + "Germany (Hesse (Hessen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2003, 6, 19)?, "Fronleichnam"), + ], + &mut map, + Country::DE_HE, + "Germany (Hesse (Hessen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2004, 6, 10)?, "Fronleichnam"), + ], + &mut map, + Country::DE_HE, + "Germany (Hesse (Hessen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2005, 5, 26)?, "Fronleichnam"), + ], + &mut map, + Country::DE_HE, + "Germany (Hesse (Hessen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2006, 6, 15)?, "Fronleichnam"), + ], + &mut map, + Country::DE_HE, + "Germany (Hesse (Hessen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2007, 6, 7)?, "Fronleichnam"), + ], + &mut map, + Country::DE_HE, + "Germany (Hesse (Hessen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2008, 5, 22)?, "Fronleichnam"), + ], + &mut map, + Country::DE_HE, + "Germany (Hesse (Hessen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2009, 6, 11)?, "Fronleichnam"), + ], + &mut map, + Country::DE_HE, + "Germany (Hesse (Hessen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2010, 6, 3)?, "Fronleichnam"), + ], + &mut map, + Country::DE_HE, + "Germany (Hesse (Hessen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2011, 6, 23)?, "Fronleichnam"), + ], + &mut map, + Country::DE_HE, + "Germany (Hesse (Hessen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2012, 6, 7)?, "Fronleichnam"), + ], + &mut map, + Country::DE_HE, + "Germany (Hesse (Hessen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2013, 5, 30)?, "Fronleichnam"), + ], + &mut map, + Country::DE_HE, + "Germany (Hesse (Hessen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2014, 6, 19)?, "Fronleichnam"), + ], + &mut map, + Country::DE_HE, + "Germany (Hesse (Hessen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2015, 6, 4)?, "Fronleichnam"), + ], + &mut map, + Country::DE_HE, + "Germany (Hesse (Hessen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2016, 5, 26)?, "Fronleichnam"), + ], + &mut map, + Country::DE_HE, + "Germany (Hesse (Hessen))", + ); + + 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"), + (NaiveDate::from_ymd_res(2017, 6, 15)?, "Fronleichnam"), + ], + &mut map, + Country::DE_HE, + "Germany (Hesse (Hessen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2018, 5, 31)?, "Fronleichnam"), + ], + &mut map, + Country::DE_HE, + "Germany (Hesse (Hessen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2019, 6, 20)?, "Fronleichnam"), + ], + &mut map, + Country::DE_HE, + "Germany (Hesse (Hessen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2020, 6, 11)?, "Fronleichnam"), + ], + &mut map, + Country::DE_HE, + "Germany (Hesse (Hessen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2021, 6, 3)?, "Fronleichnam"), + ], + &mut map, + Country::DE_HE, + "Germany (Hesse (Hessen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2022, 6, 16)?, "Fronleichnam"), + ], + &mut map, + Country::DE_HE, + "Germany (Hesse (Hessen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2023, 6, 8)?, "Fronleichnam"), + ], + &mut map, + Country::DE_HE, + "Germany (Hesse (Hessen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2024, 5, 30)?, "Fronleichnam"), + ], + &mut map, + Country::DE_HE, + "Germany (Hesse (Hessen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2025, 6, 19)?, "Fronleichnam"), + ], + &mut map, + Country::DE_HE, + "Germany (Hesse (Hessen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2026, 6, 4)?, "Fronleichnam"), + ], + &mut map, + Country::DE_HE, + "Germany (Hesse (Hessen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2027, 5, 27)?, "Fronleichnam"), + ], + &mut map, + Country::DE_HE, + "Germany (Hesse (Hessen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2028, 6, 15)?, "Fronleichnam"), + ], + &mut map, + Country::DE_HE, + "Germany (Hesse (Hessen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2029, 5, 31)?, "Fronleichnam"), + ], + &mut map, + Country::DE_HE, + "Germany (Hesse (Hessen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2030, 6, 20)?, "Fronleichnam"), + ], + &mut map, + Country::DE_HE, + "Germany (Hesse (Hessen))", + ); + + Ok(map) +} diff --git a/src/data/de_hh.rs b/src/data/de_hh.rs new file mode 100644 index 0000000..b6c28ad --- /dev/null +++ b/src/data/de_hh.rs @@ -0,0 +1,896 @@ +//! Germany (Hamburg) +use super::*; + +/// Generate holiday map for Germany (Hamburg). +#[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_HH, + "Germany (Hamburg)", + ); + + 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_HH, + "Germany (Hamburg)", + ); + + 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_HH, + "Germany (Hamburg)", + ); + + 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_HH, + "Germany (Hamburg)", + ); + + 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_HH, + "Germany (Hamburg)", + ); + + 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_HH, + "Germany (Hamburg)", + ); + + 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_HH, + "Germany (Hamburg)", + ); + + 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_HH, + "Germany (Hamburg)", + ); + + 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_HH, + "Germany (Hamburg)", + ); + + 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_HH, + "Germany (Hamburg)", + ); + + 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_HH, + "Germany (Hamburg)", + ); + + 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_HH, + "Germany (Hamburg)", + ); + + 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_HH, + "Germany (Hamburg)", + ); + + 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_HH, + "Germany (Hamburg)", + ); + + 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_HH, + "Germany (Hamburg)", + ); + + 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_HH, + "Germany (Hamburg)", + ); + + 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_HH, + "Germany (Hamburg)", + ); + + 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_HH, + "Germany (Hamburg)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2018, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_HH, + "Germany (Hamburg)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2019, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_HH, + "Germany (Hamburg)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2020, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_HH, + "Germany (Hamburg)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2021, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_HH, + "Germany (Hamburg)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2022, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_HH, + "Germany (Hamburg)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2023, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_HH, + "Germany (Hamburg)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2024, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_HH, + "Germany (Hamburg)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2025, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_HH, + "Germany (Hamburg)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2026, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_HH, + "Germany (Hamburg)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2027, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_HH, + "Germany (Hamburg)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2028, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_HH, + "Germany (Hamburg)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2029, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_HH, + "Germany (Hamburg)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2030, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_HH, + "Germany (Hamburg)", + ); + + Ok(map) +} diff --git a/src/data/de_mv.rs b/src/data/de_mv.rs new file mode 100644 index 0000000..3ab05f6 --- /dev/null +++ b/src/data/de_mv.rs @@ -0,0 +1,945 @@ +//! Germany (Mecklenburg-Vorpommern) +use super::*; + +/// Generate holiday map for Germany (Mecklenburg-Vorpommern). +#[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", + ), + (NaiveDate::from_ymd_res(2000, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_MV, + "Germany (Mecklenburg-Vorpommern)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2001, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_MV, + "Germany (Mecklenburg-Vorpommern)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2002, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_MV, + "Germany (Mecklenburg-Vorpommern)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2003, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_MV, + "Germany (Mecklenburg-Vorpommern)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2004, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_MV, + "Germany (Mecklenburg-Vorpommern)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2005, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_MV, + "Germany (Mecklenburg-Vorpommern)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2006, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_MV, + "Germany (Mecklenburg-Vorpommern)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2007, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_MV, + "Germany (Mecklenburg-Vorpommern)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2008, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_MV, + "Germany (Mecklenburg-Vorpommern)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2009, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_MV, + "Germany (Mecklenburg-Vorpommern)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2010, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_MV, + "Germany (Mecklenburg-Vorpommern)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2011, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_MV, + "Germany (Mecklenburg-Vorpommern)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2012, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_MV, + "Germany (Mecklenburg-Vorpommern)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2013, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_MV, + "Germany (Mecklenburg-Vorpommern)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2014, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_MV, + "Germany (Mecklenburg-Vorpommern)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2015, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_MV, + "Germany (Mecklenburg-Vorpommern)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2016, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_MV, + "Germany (Mecklenburg-Vorpommern)", + ); + + 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_MV, + "Germany (Mecklenburg-Vorpommern)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2018, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_MV, + "Germany (Mecklenburg-Vorpommern)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2019, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_MV, + "Germany (Mecklenburg-Vorpommern)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2020, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_MV, + "Germany (Mecklenburg-Vorpommern)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2021, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_MV, + "Germany (Mecklenburg-Vorpommern)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2022, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_MV, + "Germany (Mecklenburg-Vorpommern)", + ); + + 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", + ), + ( + NaiveDate::from_ymd_res(2023, 3, 8)?, + "Internationaler Frauentag", + ), + (NaiveDate::from_ymd_res(2023, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_MV, + "Germany (Mecklenburg-Vorpommern)", + ); + + 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", + ), + ( + NaiveDate::from_ymd_res(2024, 3, 8)?, + "Internationaler Frauentag", + ), + (NaiveDate::from_ymd_res(2024, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_MV, + "Germany (Mecklenburg-Vorpommern)", + ); + + 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", + ), + ( + NaiveDate::from_ymd_res(2025, 3, 8)?, + "Internationaler Frauentag", + ), + (NaiveDate::from_ymd_res(2025, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_MV, + "Germany (Mecklenburg-Vorpommern)", + ); + + 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", + ), + ( + NaiveDate::from_ymd_res(2026, 3, 8)?, + "Internationaler Frauentag", + ), + (NaiveDate::from_ymd_res(2026, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_MV, + "Germany (Mecklenburg-Vorpommern)", + ); + + 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", + ), + ( + NaiveDate::from_ymd_res(2027, 3, 8)?, + "Internationaler Frauentag", + ), + (NaiveDate::from_ymd_res(2027, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_MV, + "Germany (Mecklenburg-Vorpommern)", + ); + + 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", + ), + ( + NaiveDate::from_ymd_res(2028, 3, 8)?, + "Internationaler Frauentag", + ), + (NaiveDate::from_ymd_res(2028, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_MV, + "Germany (Mecklenburg-Vorpommern)", + ); + + 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", + ), + ( + NaiveDate::from_ymd_res(2029, 3, 8)?, + "Internationaler Frauentag", + ), + (NaiveDate::from_ymd_res(2029, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_MV, + "Germany (Mecklenburg-Vorpommern)", + ); + + 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", + ), + ( + NaiveDate::from_ymd_res(2030, 3, 8)?, + "Internationaler Frauentag", + ), + (NaiveDate::from_ymd_res(2030, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_MV, + "Germany (Mecklenburg-Vorpommern)", + ); + + Ok(map) +} diff --git a/src/data/de_ni.rs b/src/data/de_ni.rs new file mode 100644 index 0000000..4af2097 --- /dev/null +++ b/src/data/de_ni.rs @@ -0,0 +1,896 @@ +//! Germany (Lower Saxony (Niedersachsen)) +use super::*; + +/// Generate holiday map for Germany (Lower Saxony (Niedersachsen)). +#[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_NI, + "Germany (Lower Saxony (Niedersachsen))", + ); + + 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_NI, + "Germany (Lower Saxony (Niedersachsen))", + ); + + 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_NI, + "Germany (Lower Saxony (Niedersachsen))", + ); + + 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_NI, + "Germany (Lower Saxony (Niedersachsen))", + ); + + 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_NI, + "Germany (Lower Saxony (Niedersachsen))", + ); + + 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_NI, + "Germany (Lower Saxony (Niedersachsen))", + ); + + 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_NI, + "Germany (Lower Saxony (Niedersachsen))", + ); + + 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_NI, + "Germany (Lower Saxony (Niedersachsen))", + ); + + 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_NI, + "Germany (Lower Saxony (Niedersachsen))", + ); + + 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_NI, + "Germany (Lower Saxony (Niedersachsen))", + ); + + 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_NI, + "Germany (Lower Saxony (Niedersachsen))", + ); + + 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_NI, + "Germany (Lower Saxony (Niedersachsen))", + ); + + 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_NI, + "Germany (Lower Saxony (Niedersachsen))", + ); + + 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_NI, + "Germany (Lower Saxony (Niedersachsen))", + ); + + 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_NI, + "Germany (Lower Saxony (Niedersachsen))", + ); + + 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_NI, + "Germany (Lower Saxony (Niedersachsen))", + ); + + 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_NI, + "Germany (Lower Saxony (Niedersachsen))", + ); + + 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_NI, + "Germany (Lower Saxony (Niedersachsen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2018, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_NI, + "Germany (Lower Saxony (Niedersachsen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2019, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_NI, + "Germany (Lower Saxony (Niedersachsen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2020, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_NI, + "Germany (Lower Saxony (Niedersachsen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2021, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_NI, + "Germany (Lower Saxony (Niedersachsen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2022, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_NI, + "Germany (Lower Saxony (Niedersachsen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2023, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_NI, + "Germany (Lower Saxony (Niedersachsen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2024, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_NI, + "Germany (Lower Saxony (Niedersachsen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2025, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_NI, + "Germany (Lower Saxony (Niedersachsen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2026, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_NI, + "Germany (Lower Saxony (Niedersachsen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2027, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_NI, + "Germany (Lower Saxony (Niedersachsen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2028, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_NI, + "Germany (Lower Saxony (Niedersachsen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2029, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_NI, + "Germany (Lower Saxony (Niedersachsen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2030, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_NI, + "Germany (Lower Saxony (Niedersachsen))", + ); + + Ok(map) +} diff --git a/src/data/de_nw.rs b/src/data/de_nw.rs new file mode 100644 index 0000000..d239337 --- /dev/null +++ b/src/data/de_nw.rs @@ -0,0 +1,945 @@ +//! Germany (North Rhine-Westphalia (Nordrhein-Westfalen)) +use super::*; + +/// Generate holiday map for Germany (North Rhine-Westphalia (Nordrhein-Westfalen)). +#[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", + ), + (NaiveDate::from_ymd_res(2000, 6, 22)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2000, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_NW, + "Germany (North Rhine-Westphalia (Nordrhein-Westfalen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2001, 6, 14)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2001, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_NW, + "Germany (North Rhine-Westphalia (Nordrhein-Westfalen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2002, 5, 30)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2002, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_NW, + "Germany (North Rhine-Westphalia (Nordrhein-Westfalen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2003, 6, 19)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2003, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_NW, + "Germany (North Rhine-Westphalia (Nordrhein-Westfalen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2004, 6, 10)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2004, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_NW, + "Germany (North Rhine-Westphalia (Nordrhein-Westfalen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2005, 5, 26)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2005, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_NW, + "Germany (North Rhine-Westphalia (Nordrhein-Westfalen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2006, 6, 15)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2006, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_NW, + "Germany (North Rhine-Westphalia (Nordrhein-Westfalen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2007, 6, 7)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2007, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_NW, + "Germany (North Rhine-Westphalia (Nordrhein-Westfalen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2008, 5, 22)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2008, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_NW, + "Germany (North Rhine-Westphalia (Nordrhein-Westfalen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2009, 6, 11)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2009, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_NW, + "Germany (North Rhine-Westphalia (Nordrhein-Westfalen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2010, 6, 3)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2010, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_NW, + "Germany (North Rhine-Westphalia (Nordrhein-Westfalen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2011, 6, 23)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2011, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_NW, + "Germany (North Rhine-Westphalia (Nordrhein-Westfalen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2012, 6, 7)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2012, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_NW, + "Germany (North Rhine-Westphalia (Nordrhein-Westfalen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2013, 5, 30)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2013, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_NW, + "Germany (North Rhine-Westphalia (Nordrhein-Westfalen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2014, 6, 19)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2014, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_NW, + "Germany (North Rhine-Westphalia (Nordrhein-Westfalen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2015, 6, 4)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2015, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_NW, + "Germany (North Rhine-Westphalia (Nordrhein-Westfalen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2016, 5, 26)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2016, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_NW, + "Germany (North Rhine-Westphalia (Nordrhein-Westfalen))", + ); + + 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"), + (NaiveDate::from_ymd_res(2017, 6, 15)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2017, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_NW, + "Germany (North Rhine-Westphalia (Nordrhein-Westfalen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2018, 5, 31)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2018, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_NW, + "Germany (North Rhine-Westphalia (Nordrhein-Westfalen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2019, 6, 20)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2019, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_NW, + "Germany (North Rhine-Westphalia (Nordrhein-Westfalen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2020, 6, 11)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2020, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_NW, + "Germany (North Rhine-Westphalia (Nordrhein-Westfalen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2021, 6, 3)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2021, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_NW, + "Germany (North Rhine-Westphalia (Nordrhein-Westfalen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2022, 6, 16)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2022, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_NW, + "Germany (North Rhine-Westphalia (Nordrhein-Westfalen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2023, 6, 8)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2023, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_NW, + "Germany (North Rhine-Westphalia (Nordrhein-Westfalen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2024, 5, 30)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2024, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_NW, + "Germany (North Rhine-Westphalia (Nordrhein-Westfalen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2025, 6, 19)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2025, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_NW, + "Germany (North Rhine-Westphalia (Nordrhein-Westfalen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2026, 6, 4)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2026, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_NW, + "Germany (North Rhine-Westphalia (Nordrhein-Westfalen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2027, 5, 27)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2027, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_NW, + "Germany (North Rhine-Westphalia (Nordrhein-Westfalen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2028, 6, 15)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2028, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_NW, + "Germany (North Rhine-Westphalia (Nordrhein-Westfalen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2029, 5, 31)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2029, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_NW, + "Germany (North Rhine-Westphalia (Nordrhein-Westfalen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2030, 6, 20)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2030, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_NW, + "Germany (North Rhine-Westphalia (Nordrhein-Westfalen))", + ); + + Ok(map) +} diff --git a/src/data/de_rp.rs b/src/data/de_rp.rs new file mode 100644 index 0000000..393cd88 --- /dev/null +++ b/src/data/de_rp.rs @@ -0,0 +1,945 @@ +//! Germany (Rhineland-Palatinate (Rheinland-Pfalz)) +use super::*; + +/// Generate holiday map for Germany (Rhineland-Palatinate (Rheinland-Pfalz)). +#[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", + ), + (NaiveDate::from_ymd_res(2000, 6, 22)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2000, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_RP, + "Germany (Rhineland-Palatinate (Rheinland-Pfalz))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2001, 6, 14)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2001, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_RP, + "Germany (Rhineland-Palatinate (Rheinland-Pfalz))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2002, 5, 30)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2002, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_RP, + "Germany (Rhineland-Palatinate (Rheinland-Pfalz))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2003, 6, 19)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2003, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_RP, + "Germany (Rhineland-Palatinate (Rheinland-Pfalz))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2004, 6, 10)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2004, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_RP, + "Germany (Rhineland-Palatinate (Rheinland-Pfalz))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2005, 5, 26)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2005, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_RP, + "Germany (Rhineland-Palatinate (Rheinland-Pfalz))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2006, 6, 15)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2006, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_RP, + "Germany (Rhineland-Palatinate (Rheinland-Pfalz))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2007, 6, 7)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2007, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_RP, + "Germany (Rhineland-Palatinate (Rheinland-Pfalz))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2008, 5, 22)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2008, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_RP, + "Germany (Rhineland-Palatinate (Rheinland-Pfalz))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2009, 6, 11)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2009, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_RP, + "Germany (Rhineland-Palatinate (Rheinland-Pfalz))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2010, 6, 3)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2010, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_RP, + "Germany (Rhineland-Palatinate (Rheinland-Pfalz))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2011, 6, 23)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2011, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_RP, + "Germany (Rhineland-Palatinate (Rheinland-Pfalz))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2012, 6, 7)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2012, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_RP, + "Germany (Rhineland-Palatinate (Rheinland-Pfalz))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2013, 5, 30)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2013, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_RP, + "Germany (Rhineland-Palatinate (Rheinland-Pfalz))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2014, 6, 19)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2014, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_RP, + "Germany (Rhineland-Palatinate (Rheinland-Pfalz))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2015, 6, 4)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2015, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_RP, + "Germany (Rhineland-Palatinate (Rheinland-Pfalz))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2016, 5, 26)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2016, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_RP, + "Germany (Rhineland-Palatinate (Rheinland-Pfalz))", + ); + + 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"), + (NaiveDate::from_ymd_res(2017, 6, 15)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2017, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_RP, + "Germany (Rhineland-Palatinate (Rheinland-Pfalz))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2018, 5, 31)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2018, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_RP, + "Germany (Rhineland-Palatinate (Rheinland-Pfalz))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2019, 6, 20)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2019, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_RP, + "Germany (Rhineland-Palatinate (Rheinland-Pfalz))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2020, 6, 11)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2020, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_RP, + "Germany (Rhineland-Palatinate (Rheinland-Pfalz))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2021, 6, 3)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2021, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_RP, + "Germany (Rhineland-Palatinate (Rheinland-Pfalz))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2022, 6, 16)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2022, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_RP, + "Germany (Rhineland-Palatinate (Rheinland-Pfalz))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2023, 6, 8)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2023, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_RP, + "Germany (Rhineland-Palatinate (Rheinland-Pfalz))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2024, 5, 30)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2024, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_RP, + "Germany (Rhineland-Palatinate (Rheinland-Pfalz))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2025, 6, 19)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2025, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_RP, + "Germany (Rhineland-Palatinate (Rheinland-Pfalz))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2026, 6, 4)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2026, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_RP, + "Germany (Rhineland-Palatinate (Rheinland-Pfalz))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2027, 5, 27)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2027, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_RP, + "Germany (Rhineland-Palatinate (Rheinland-Pfalz))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2028, 6, 15)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2028, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_RP, + "Germany (Rhineland-Palatinate (Rheinland-Pfalz))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2029, 5, 31)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2029, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_RP, + "Germany (Rhineland-Palatinate (Rheinland-Pfalz))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2030, 6, 20)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2030, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_RP, + "Germany (Rhineland-Palatinate (Rheinland-Pfalz))", + ); + + Ok(map) +} diff --git a/src/data/de_sh.rs b/src/data/de_sh.rs new file mode 100644 index 0000000..8dc672d --- /dev/null +++ b/src/data/de_sh.rs @@ -0,0 +1,896 @@ +//! Germany (Schleswig-Holstein) +use super::*; + +/// Generate holiday map for Germany (Schleswig-Holstein). +#[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_SH, + "Germany (Schleswig-Holstein)", + ); + + 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_SH, + "Germany (Schleswig-Holstein)", + ); + + 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_SH, + "Germany (Schleswig-Holstein)", + ); + + 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_SH, + "Germany (Schleswig-Holstein)", + ); + + 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_SH, + "Germany (Schleswig-Holstein)", + ); + + 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_SH, + "Germany (Schleswig-Holstein)", + ); + + 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_SH, + "Germany (Schleswig-Holstein)", + ); + + 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_SH, + "Germany (Schleswig-Holstein)", + ); + + 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_SH, + "Germany (Schleswig-Holstein)", + ); + + 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_SH, + "Germany (Schleswig-Holstein)", + ); + + 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_SH, + "Germany (Schleswig-Holstein)", + ); + + 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_SH, + "Germany (Schleswig-Holstein)", + ); + + 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_SH, + "Germany (Schleswig-Holstein)", + ); + + 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_SH, + "Germany (Schleswig-Holstein)", + ); + + 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_SH, + "Germany (Schleswig-Holstein)", + ); + + 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_SH, + "Germany (Schleswig-Holstein)", + ); + + 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_SH, + "Germany (Schleswig-Holstein)", + ); + + 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_SH, + "Germany (Schleswig-Holstein)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2018, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_SH, + "Germany (Schleswig-Holstein)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2019, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_SH, + "Germany (Schleswig-Holstein)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2020, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_SH, + "Germany (Schleswig-Holstein)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2021, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_SH, + "Germany (Schleswig-Holstein)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2022, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_SH, + "Germany (Schleswig-Holstein)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2023, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_SH, + "Germany (Schleswig-Holstein)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2024, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_SH, + "Germany (Schleswig-Holstein)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2025, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_SH, + "Germany (Schleswig-Holstein)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2026, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_SH, + "Germany (Schleswig-Holstein)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2027, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_SH, + "Germany (Schleswig-Holstein)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2028, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_SH, + "Germany (Schleswig-Holstein)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2029, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_SH, + "Germany (Schleswig-Holstein)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2030, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_SH, + "Germany (Schleswig-Holstein)", + ); + + Ok(map) +} diff --git a/src/data/de_sl.rs b/src/data/de_sl.rs new file mode 100644 index 0000000..845322b --- /dev/null +++ b/src/data/de_sl.rs @@ -0,0 +1,976 @@ +//! Germany (Saarland) +use super::*; + +/// Generate holiday map for Germany (Saarland). +#[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", + ), + (NaiveDate::from_ymd_res(2000, 6, 22)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2000, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2000, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_SL, + "Germany (Saarland)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2001, 6, 14)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2001, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2001, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_SL, + "Germany (Saarland)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2002, 5, 30)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2002, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2002, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_SL, + "Germany (Saarland)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2003, 6, 19)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2003, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2003, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_SL, + "Germany (Saarland)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2004, 6, 10)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2004, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2004, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_SL, + "Germany (Saarland)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2005, 5, 26)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2005, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2005, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_SL, + "Germany (Saarland)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2006, 6, 15)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2006, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2006, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_SL, + "Germany (Saarland)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2007, 6, 7)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2007, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2007, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_SL, + "Germany (Saarland)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2008, 5, 22)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2008, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2008, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_SL, + "Germany (Saarland)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2009, 6, 11)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2009, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2009, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_SL, + "Germany (Saarland)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2010, 6, 3)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2010, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2010, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_SL, + "Germany (Saarland)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2011, 6, 23)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2011, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2011, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_SL, + "Germany (Saarland)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2012, 6, 7)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2012, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2012, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_SL, + "Germany (Saarland)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2013, 5, 30)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2013, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2013, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_SL, + "Germany (Saarland)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2014, 6, 19)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2014, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2014, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_SL, + "Germany (Saarland)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2015, 6, 4)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2015, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2015, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_SL, + "Germany (Saarland)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2016, 5, 26)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2016, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2016, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_SL, + "Germany (Saarland)", + ); + + 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"), + (NaiveDate::from_ymd_res(2017, 6, 15)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2017, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2017, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_SL, + "Germany (Saarland)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2018, 5, 31)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2018, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2018, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_SL, + "Germany (Saarland)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2019, 6, 20)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2019, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2019, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_SL, + "Germany (Saarland)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2020, 6, 11)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2020, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2020, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_SL, + "Germany (Saarland)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2021, 6, 3)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2021, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2021, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_SL, + "Germany (Saarland)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2022, 6, 16)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2022, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2022, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_SL, + "Germany (Saarland)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2023, 6, 8)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2023, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2023, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_SL, + "Germany (Saarland)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2024, 5, 30)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2024, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2024, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_SL, + "Germany (Saarland)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2025, 6, 19)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2025, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2025, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_SL, + "Germany (Saarland)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2026, 6, 4)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2026, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2026, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_SL, + "Germany (Saarland)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2027, 5, 27)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2027, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2027, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_SL, + "Germany (Saarland)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2028, 6, 15)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2028, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2028, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_SL, + "Germany (Saarland)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2029, 5, 31)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2029, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2029, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_SL, + "Germany (Saarland)", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2030, 6, 20)?, "Fronleichnam"), + (NaiveDate::from_ymd_res(2030, 8, 15)?, "Mariä Himmelfahrt"), + (NaiveDate::from_ymd_res(2030, 11, 1)?, "Allerheiligen"), + ], + &mut map, + Country::DE_SL, + "Germany (Saarland)", + ); + + Ok(map) +} diff --git a/src/data/de_sn.rs b/src/data/de_sn.rs new file mode 100644 index 0000000..ce21ec8 --- /dev/null +++ b/src/data/de_sn.rs @@ -0,0 +1,944 @@ +//! Germany (Saxony (Sachsen)) +use super::*; + +/// Generate holiday map for Germany (Saxony (Sachsen)). +#[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", + ), + (NaiveDate::from_ymd_res(2000, 10, 31)?, "Reformationstag"), + (NaiveDate::from_ymd_res(2000, 11, 22)?, "Buß- und Bettag"), + ], + &mut map, + Country::DE_SN, + "Germany (Saxony (Sachsen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2001, 10, 31)?, "Reformationstag"), + (NaiveDate::from_ymd_res(2001, 11, 21)?, "Buß- und Bettag"), + ], + &mut map, + Country::DE_SN, + "Germany (Saxony (Sachsen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2002, 10, 31)?, "Reformationstag"), + (NaiveDate::from_ymd_res(2002, 11, 20)?, "Buß- und Bettag"), + ], + &mut map, + Country::DE_SN, + "Germany (Saxony (Sachsen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2003, 10, 31)?, "Reformationstag"), + (NaiveDate::from_ymd_res(2003, 11, 19)?, "Buß- und Bettag"), + ], + &mut map, + Country::DE_SN, + "Germany (Saxony (Sachsen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2004, 10, 31)?, "Reformationstag"), + (NaiveDate::from_ymd_res(2004, 11, 17)?, "Buß- und Bettag"), + ], + &mut map, + Country::DE_SN, + "Germany (Saxony (Sachsen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2005, 10, 31)?, "Reformationstag"), + (NaiveDate::from_ymd_res(2005, 11, 16)?, "Buß- und Bettag"), + ], + &mut map, + Country::DE_SN, + "Germany (Saxony (Sachsen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2006, 10, 31)?, "Reformationstag"), + (NaiveDate::from_ymd_res(2006, 11, 22)?, "Buß- und Bettag"), + ], + &mut map, + Country::DE_SN, + "Germany (Saxony (Sachsen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2007, 10, 31)?, "Reformationstag"), + (NaiveDate::from_ymd_res(2007, 11, 21)?, "Buß- und Bettag"), + ], + &mut map, + Country::DE_SN, + "Germany (Saxony (Sachsen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2008, 10, 31)?, "Reformationstag"), + (NaiveDate::from_ymd_res(2008, 11, 19)?, "Buß- und Bettag"), + ], + &mut map, + Country::DE_SN, + "Germany (Saxony (Sachsen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2009, 10, 31)?, "Reformationstag"), + (NaiveDate::from_ymd_res(2009, 11, 18)?, "Buß- und Bettag"), + ], + &mut map, + Country::DE_SN, + "Germany (Saxony (Sachsen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2010, 10, 31)?, "Reformationstag"), + (NaiveDate::from_ymd_res(2010, 11, 17)?, "Buß- und Bettag"), + ], + &mut map, + Country::DE_SN, + "Germany (Saxony (Sachsen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2011, 10, 31)?, "Reformationstag"), + (NaiveDate::from_ymd_res(2011, 11, 16)?, "Buß- und Bettag"), + ], + &mut map, + Country::DE_SN, + "Germany (Saxony (Sachsen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2012, 10, 31)?, "Reformationstag"), + (NaiveDate::from_ymd_res(2012, 11, 21)?, "Buß- und Bettag"), + ], + &mut map, + Country::DE_SN, + "Germany (Saxony (Sachsen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2013, 10, 31)?, "Reformationstag"), + (NaiveDate::from_ymd_res(2013, 11, 20)?, "Buß- und Bettag"), + ], + &mut map, + Country::DE_SN, + "Germany (Saxony (Sachsen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2014, 10, 31)?, "Reformationstag"), + (NaiveDate::from_ymd_res(2014, 11, 19)?, "Buß- und Bettag"), + ], + &mut map, + Country::DE_SN, + "Germany (Saxony (Sachsen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2015, 10, 31)?, "Reformationstag"), + (NaiveDate::from_ymd_res(2015, 11, 18)?, "Buß- und Bettag"), + ], + &mut map, + Country::DE_SN, + "Germany (Saxony (Sachsen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2016, 10, 31)?, "Reformationstag"), + (NaiveDate::from_ymd_res(2016, 11, 16)?, "Buß- und Bettag"), + ], + &mut map, + Country::DE_SN, + "Germany (Saxony (Sachsen))", + ); + + 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"), + (NaiveDate::from_ymd_res(2017, 11, 22)?, "Buß- und Bettag"), + ], + &mut map, + Country::DE_SN, + "Germany (Saxony (Sachsen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2018, 10, 31)?, "Reformationstag"), + (NaiveDate::from_ymd_res(2018, 11, 21)?, "Buß- und Bettag"), + ], + &mut map, + Country::DE_SN, + "Germany (Saxony (Sachsen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2019, 10, 31)?, "Reformationstag"), + (NaiveDate::from_ymd_res(2019, 11, 20)?, "Buß- und Bettag"), + ], + &mut map, + Country::DE_SN, + "Germany (Saxony (Sachsen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2020, 10, 31)?, "Reformationstag"), + (NaiveDate::from_ymd_res(2020, 11, 18)?, "Buß- und Bettag"), + ], + &mut map, + Country::DE_SN, + "Germany (Saxony (Sachsen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2021, 10, 31)?, "Reformationstag"), + (NaiveDate::from_ymd_res(2021, 11, 17)?, "Buß- und Bettag"), + ], + &mut map, + Country::DE_SN, + "Germany (Saxony (Sachsen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2022, 10, 31)?, "Reformationstag"), + (NaiveDate::from_ymd_res(2022, 11, 16)?, "Buß- und Bettag"), + ], + &mut map, + Country::DE_SN, + "Germany (Saxony (Sachsen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2023, 10, 31)?, "Reformationstag"), + (NaiveDate::from_ymd_res(2023, 11, 22)?, "Buß- und Bettag"), + ], + &mut map, + Country::DE_SN, + "Germany (Saxony (Sachsen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2024, 10, 31)?, "Reformationstag"), + (NaiveDate::from_ymd_res(2024, 11, 20)?, "Buß- und Bettag"), + ], + &mut map, + Country::DE_SN, + "Germany (Saxony (Sachsen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2025, 10, 31)?, "Reformationstag"), + (NaiveDate::from_ymd_res(2025, 11, 19)?, "Buß- und Bettag"), + ], + &mut map, + Country::DE_SN, + "Germany (Saxony (Sachsen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2026, 10, 31)?, "Reformationstag"), + (NaiveDate::from_ymd_res(2026, 11, 18)?, "Buß- und Bettag"), + ], + &mut map, + Country::DE_SN, + "Germany (Saxony (Sachsen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2027, 10, 31)?, "Reformationstag"), + (NaiveDate::from_ymd_res(2027, 11, 17)?, "Buß- und Bettag"), + ], + &mut map, + Country::DE_SN, + "Germany (Saxony (Sachsen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2028, 10, 31)?, "Reformationstag"), + (NaiveDate::from_ymd_res(2028, 11, 22)?, "Buß- und Bettag"), + ], + &mut map, + Country::DE_SN, + "Germany (Saxony (Sachsen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2029, 10, 31)?, "Reformationstag"), + (NaiveDate::from_ymd_res(2029, 11, 21)?, "Buß- und Bettag"), + ], + &mut map, + Country::DE_SN, + "Germany (Saxony (Sachsen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2030, 10, 31)?, "Reformationstag"), + (NaiveDate::from_ymd_res(2030, 11, 20)?, "Buß- und Bettag"), + ], + &mut map, + Country::DE_SN, + "Germany (Saxony (Sachsen))", + ); + + Ok(map) +} diff --git a/src/data/de_st.rs b/src/data/de_st.rs new file mode 100644 index 0000000..d292024 --- /dev/null +++ b/src/data/de_st.rs @@ -0,0 +1,944 @@ +//! Germany (Saxony-Anhalt (Sachsen-Anhalt)) +use super::*; + +/// Generate holiday map for Germany (Saxony-Anhalt (Sachsen-Anhalt)). +#[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", + ), + (NaiveDate::from_ymd_res(2000, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2000, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_ST, + "Germany (Saxony-Anhalt (Sachsen-Anhalt))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2001, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2001, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_ST, + "Germany (Saxony-Anhalt (Sachsen-Anhalt))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2002, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2002, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_ST, + "Germany (Saxony-Anhalt (Sachsen-Anhalt))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2003, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2003, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_ST, + "Germany (Saxony-Anhalt (Sachsen-Anhalt))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2004, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2004, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_ST, + "Germany (Saxony-Anhalt (Sachsen-Anhalt))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2005, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2005, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_ST, + "Germany (Saxony-Anhalt (Sachsen-Anhalt))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2006, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2006, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_ST, + "Germany (Saxony-Anhalt (Sachsen-Anhalt))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2007, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2007, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_ST, + "Germany (Saxony-Anhalt (Sachsen-Anhalt))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2008, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2008, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_ST, + "Germany (Saxony-Anhalt (Sachsen-Anhalt))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2009, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2009, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_ST, + "Germany (Saxony-Anhalt (Sachsen-Anhalt))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2010, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2010, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_ST, + "Germany (Saxony-Anhalt (Sachsen-Anhalt))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2011, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2011, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_ST, + "Germany (Saxony-Anhalt (Sachsen-Anhalt))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2012, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2012, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_ST, + "Germany (Saxony-Anhalt (Sachsen-Anhalt))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2013, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2013, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_ST, + "Germany (Saxony-Anhalt (Sachsen-Anhalt))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2014, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2014, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_ST, + "Germany (Saxony-Anhalt (Sachsen-Anhalt))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2015, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2015, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_ST, + "Germany (Saxony-Anhalt (Sachsen-Anhalt))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2016, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2016, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_ST, + "Germany (Saxony-Anhalt (Sachsen-Anhalt))", + ); + + 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"), + (NaiveDate::from_ymd_res(2017, 1, 6)?, "Heilige Drei Könige"), + ], + &mut map, + Country::DE_ST, + "Germany (Saxony-Anhalt (Sachsen-Anhalt))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2018, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2018, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_ST, + "Germany (Saxony-Anhalt (Sachsen-Anhalt))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2019, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2019, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_ST, + "Germany (Saxony-Anhalt (Sachsen-Anhalt))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2020, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2020, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_ST, + "Germany (Saxony-Anhalt (Sachsen-Anhalt))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2021, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2021, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_ST, + "Germany (Saxony-Anhalt (Sachsen-Anhalt))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2022, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2022, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_ST, + "Germany (Saxony-Anhalt (Sachsen-Anhalt))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2023, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2023, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_ST, + "Germany (Saxony-Anhalt (Sachsen-Anhalt))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2024, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2024, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_ST, + "Germany (Saxony-Anhalt (Sachsen-Anhalt))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2025, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2025, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_ST, + "Germany (Saxony-Anhalt (Sachsen-Anhalt))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2026, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2026, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_ST, + "Germany (Saxony-Anhalt (Sachsen-Anhalt))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2027, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2027, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_ST, + "Germany (Saxony-Anhalt (Sachsen-Anhalt))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2028, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2028, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_ST, + "Germany (Saxony-Anhalt (Sachsen-Anhalt))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2029, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2029, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_ST, + "Germany (Saxony-Anhalt (Sachsen-Anhalt))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2030, 1, 6)?, "Heilige Drei Könige"), + (NaiveDate::from_ymd_res(2030, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_ST, + "Germany (Saxony-Anhalt (Sachsen-Anhalt))", + ); + + Ok(map) +} diff --git a/src/data/de_th.rs b/src/data/de_th.rs new file mode 100644 index 0000000..4fcea72 --- /dev/null +++ b/src/data/de_th.rs @@ -0,0 +1,925 @@ +//! Germany (Thuringia (Thüringen)) +use super::*; + +/// Generate holiday map for Germany (Thuringia (Thüringen)). +#[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", + ), + (NaiveDate::from_ymd_res(2000, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_TH, + "Germany (Thuringia (Thüringen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2001, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_TH, + "Germany (Thuringia (Thüringen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2002, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_TH, + "Germany (Thuringia (Thüringen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2003, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_TH, + "Germany (Thuringia (Thüringen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2004, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_TH, + "Germany (Thuringia (Thüringen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2005, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_TH, + "Germany (Thuringia (Thüringen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2006, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_TH, + "Germany (Thuringia (Thüringen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2007, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_TH, + "Germany (Thuringia (Thüringen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2008, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_TH, + "Germany (Thuringia (Thüringen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2009, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_TH, + "Germany (Thuringia (Thüringen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2010, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_TH, + "Germany (Thuringia (Thüringen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2011, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_TH, + "Germany (Thuringia (Thüringen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2012, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_TH, + "Germany (Thuringia (Thüringen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2013, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_TH, + "Germany (Thuringia (Thüringen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2014, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_TH, + "Germany (Thuringia (Thüringen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2015, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_TH, + "Germany (Thuringia (Thüringen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2016, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_TH, + "Germany (Thuringia (Thüringen))", + ); + + 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_TH, + "Germany (Thuringia (Thüringen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2018, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_TH, + "Germany (Thuringia (Thüringen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2019, 9, 20)?, "Weltkindertag"), + (NaiveDate::from_ymd_res(2019, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_TH, + "Germany (Thuringia (Thüringen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2020, 9, 20)?, "Weltkindertag"), + (NaiveDate::from_ymd_res(2020, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_TH, + "Germany (Thuringia (Thüringen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2021, 9, 20)?, "Weltkindertag"), + (NaiveDate::from_ymd_res(2021, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_TH, + "Germany (Thuringia (Thüringen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2022, 9, 20)?, "Weltkindertag"), + (NaiveDate::from_ymd_res(2022, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_TH, + "Germany (Thuringia (Thüringen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2023, 9, 20)?, "Weltkindertag"), + (NaiveDate::from_ymd_res(2023, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_TH, + "Germany (Thuringia (Thüringen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2024, 9, 20)?, "Weltkindertag"), + (NaiveDate::from_ymd_res(2024, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_TH, + "Germany (Thuringia (Thüringen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2025, 9, 20)?, "Weltkindertag"), + (NaiveDate::from_ymd_res(2025, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_TH, + "Germany (Thuringia (Thüringen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2026, 9, 20)?, "Weltkindertag"), + (NaiveDate::from_ymd_res(2026, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_TH, + "Germany (Thuringia (Thüringen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2027, 9, 20)?, "Weltkindertag"), + (NaiveDate::from_ymd_res(2027, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_TH, + "Germany (Thuringia (Thüringen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2028, 9, 20)?, "Weltkindertag"), + (NaiveDate::from_ymd_res(2028, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_TH, + "Germany (Thuringia (Thüringen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2029, 9, 20)?, "Weltkindertag"), + (NaiveDate::from_ymd_res(2029, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_TH, + "Germany (Thuringia (Thüringen))", + ); + + 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", + ), + (NaiveDate::from_ymd_res(2030, 9, 20)?, "Weltkindertag"), + (NaiveDate::from_ymd_res(2030, 10, 31)?, "Reformationstag"), + ], + &mut map, + Country::DE_TH, + "Germany (Thuringia (Thüringen))", + ); + + Ok(map) +} diff --git a/src/data/dj.rs b/src/data/dj.rs index 7e2972e..7d06c57 100644 --- a/src/data/dj.rs +++ b/src/data/dj.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Djibouti. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/dk.rs b/src/data/dk.rs index b35b2fb..071852d 100644 --- a/src/data/dk.rs +++ b/src/data/dk.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Denmark. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/do.rs b/src/data/do.rs index 239eb40..61a30a9 100644 --- a/src/data/do.rs +++ b/src/data/do.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Dominican Republic. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/ee.rs b/src/data/ee.rs index d38c884..38d6236 100644 --- a/src/data/ee.rs +++ b/src/data/ee.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Estonia. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/eg.rs b/src/data/eg.rs index 05b8840..7b7a279 100644 --- a/src/data/eg.rs +++ b/src/data/eg.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Egypt. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/es.rs b/src/data/es.rs index 0af5838..ec3c870 100644 --- a/src/data/es.rs +++ b/src/data/es.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Spain. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/et.rs b/src/data/et.rs index e689951..498704e 100644 --- a/src/data/et.rs +++ b/src/data/et.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Ethiopia. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/fi.rs b/src/data/fi.rs index 3a0c930..78d6965 100644 --- a/src/data/fi.rs +++ b/src/data/fi.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Finland. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/fr.rs b/src/data/fr.rs index 26d5ff6..6994eef 100644 --- a/src/data/fr.rs +++ b/src/data/fr.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for France. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/gb.rs b/src/data/gb.rs index 84ec560..0986db0 100644 --- a/src/data/gb.rs +++ b/src/data/gb.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for United Kingdom. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/ge.rs b/src/data/ge.rs index 7507b80..6454078 100644 --- a/src/data/ge.rs +++ b/src/data/ge.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Georgia. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/gr.rs b/src/data/gr.rs index 100dbc5..4e3b7ef 100644 --- a/src/data/gr.rs +++ b/src/data/gr.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Greece. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/helper.rs b/src/data/helper.rs index 1a706a4..e1327d7 100644 --- a/src/data/helper.rs +++ b/src/data/helper.rs @@ -2,17 +2,18 @@ use chrono::NaiveDate; use crate::{prelude::*, Holiday, HolidayPerCountryMap, Year}; -pub fn should_build_year(years: &Option<&std::ops::Range>, year: Year) -> bool { +pub fn should_build_year(years: Option<&std::ops::Range>, year: Year) -> bool { years.map_or(true, |r| r.contains(&year)) } +#[allow(clippy::needless_pass_by_value)] pub fn build_year( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, year: Year, holidays: impl IntoIterator, map: &mut HolidayPerCountryMap, country: Country, - county_name: impl ToString, + county_name: &(impl ToString + ?Sized), ) { if !should_build_year(years, year) { return; diff --git a/src/data/hk.rs b/src/data/hk.rs index 532b67e..1d5b752 100644 --- a/src/data/hk.rs +++ b/src/data/hk.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Hong Kong. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); @@ -698,29 +698,29 @@ pub fn build( ); build_year( - years, - 2015, - vec![ + 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", - ); + (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, diff --git a/src/data/hn.rs b/src/data/hn.rs index 3b3f6e2..4aa75e0 100644 --- a/src/data/hn.rs +++ b/src/data/hn.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Honduras. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/hr.rs b/src/data/hr.rs index d5c1f65..f867dc9 100644 --- a/src/data/hr.rs +++ b/src/data/hr.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Croatia. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); @@ -652,278 +652,278 @@ pub fn build( ); 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", - ); + 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", - ); + 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", - ); + 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", - ); + 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", - ); + 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", - ); + 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", - ); + 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", - ); + 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", - ); + 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", - ); + 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", - ); + 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 index c998f0d..8643a93 100644 --- a/src/data/hu.rs +++ b/src/data/hu.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Hungary. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/id.rs b/src/data/id.rs index 748b340..a002ad4 100644 --- a/src/data/id.rs +++ b/src/data/id.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Indonesia. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/ie.rs b/src/data/ie.rs index 0f2b877..c43e80f 100644 --- a/src/data/ie.rs +++ b/src/data/ie.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Ireland. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/il.rs b/src/data/il.rs index 4237432..ba5c6d1 100644 --- a/src/data/il.rs +++ b/src/data/il.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Israel. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/im.rs b/src/data/im.rs index 5966b81..c8a3fd0 100644 --- a/src/data/im.rs +++ b/src/data/im.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Isle of Man. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/in.rs b/src/data/in.rs index 21751e2..cbc2d8f 100644 --- a/src/data/in.rs +++ b/src/data/in.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for India. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/is.rs b/src/data/is.rs index 218c772..1abc13a 100644 --- a/src/data/is.rs +++ b/src/data/is.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Iceland. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/it.rs b/src/data/it.rs index fca352b..b2c68db 100644 --- a/src/data/it.rs +++ b/src/data/it.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Italy. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/jm.rs b/src/data/jm.rs index 91e5d73..f079a80 100644 --- a/src/data/jm.rs +++ b/src/data/jm.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Jamaica. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/jp.rs b/src/data/jp.rs index e754300..c4b75d3 100644 --- a/src/data/jp.rs +++ b/src/data/jp.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Japan. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/ke.rs b/src/data/ke.rs index 1ac145a..56d80c9 100644 --- a/src/data/ke.rs +++ b/src/data/ke.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Kenya. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/kr.rs b/src/data/kr.rs index 1973a70..3d1f1ee 100644 --- a/src/data/kr.rs +++ b/src/data/kr.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for South Korea. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/kz.rs b/src/data/kz.rs index 735d14d..ce388c1 100644 --- a/src/data/kz.rs +++ b/src/data/kz.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Kazakhstan. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/li.rs b/src/data/li.rs index 9662d00..a5e3a65 100644 --- a/src/data/li.rs +++ b/src/data/li.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Liechtenstein. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/ls.rs b/src/data/ls.rs index 55bece2..2c293f8 100644 --- a/src/data/ls.rs +++ b/src/data/ls.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Lesotho. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/lt.rs b/src/data/lt.rs index 4f207ba..a4d6cc6 100644 --- a/src/data/lt.rs +++ b/src/data/lt.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Lithuania. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/lu.rs b/src/data/lu.rs index 2e0452d..5503876 100644 --- a/src/data/lu.rs +++ b/src/data/lu.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Luxembourg. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/lv.rs b/src/data/lv.rs index f8ecb2a..7f7fcdc 100644 --- a/src/data/lv.rs +++ b/src/data/lv.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Latvia. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); @@ -772,32 +772,32 @@ pub fn build( ); build_year( - years, - 2023, - vec![ + 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", - ); + (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, diff --git a/src/data/ma.rs b/src/data/ma.rs index 0cde4d9..95356ad 100644 --- a/src/data/ma.rs +++ b/src/data/ma.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Morocco. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/md.rs b/src/data/md.rs index ad9e037..9806acc 100644 --- a/src/data/md.rs +++ b/src/data/md.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Moldova. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); @@ -203,24 +203,24 @@ pub fn build( ); 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", - ); + 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, @@ -624,362 +624,362 @@ pub fn build( ); 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", - ); + 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", - ); + 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", - ); + 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", - ); + 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", - ); + 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", - ); + 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", - ); + 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", - ); + 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", - ); + 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", - ); + 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", - ); + 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", - ); + 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", - ); + 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", - ); + 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", - ); + 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 index c2c87e7..be2d7fb 100644 --- a/src/data/mg.rs +++ b/src/data/mg.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Madagascar. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/mk.rs b/src/data/mk.rs index e3d2238..d6d0ff2 100644 --- a/src/data/mk.rs +++ b/src/data/mk.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for North Macedonia. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/mod.rs b/src/data/mod.rs index 409a065..bc1c450 100644 --- a/src/data/mod.rs +++ b/src/data/mod.rs @@ -112,6 +112,57 @@ pub mod ge; #[cfg(feature = "DE")] pub mod de; +#[cfg(feature = "DE")] +pub mod de_bb; + +#[cfg(feature = "DE")] +pub mod de_be; + +#[cfg(feature = "DE")] +pub mod de_bw; + +#[cfg(feature = "DE")] +pub mod de_by; + +#[cfg(feature = "DE")] +pub mod de_byp; + +#[cfg(feature = "DE")] +pub mod de_hb; + +#[cfg(feature = "DE")] +pub mod de_he; + +#[cfg(feature = "DE")] +pub mod de_hh; + +#[cfg(feature = "DE")] +pub mod de_mv; + +#[cfg(feature = "DE")] +pub mod de_ni; + +#[cfg(feature = "DE")] +pub mod de_nw; + +#[cfg(feature = "DE")] +pub mod de_rp; + +#[cfg(feature = "DE")] +pub mod de_sh; + +#[cfg(feature = "DE")] +pub mod de_sl; + +#[cfg(feature = "DE")] +pub mod de_sn; + +#[cfg(feature = "DE")] +pub mod de_st; + +#[cfg(feature = "DE")] +pub mod de_th; + #[cfg(feature = "GR")] pub mod gr; @@ -292,6 +343,177 @@ pub mod gb; #[cfg(feature = "US")] pub mod us; +#[cfg(feature = "US")] +pub mod us_ak; + +#[cfg(feature = "US")] +pub mod us_al; + +#[cfg(feature = "US")] +pub mod us_ar; + +#[cfg(feature = "US")] +pub mod us_as; + +#[cfg(feature = "US")] +pub mod us_az; + +#[cfg(feature = "US")] +pub mod us_ca; + +#[cfg(feature = "US")] +pub mod us_co; + +#[cfg(feature = "US")] +pub mod us_ct; + +#[cfg(feature = "US")] +pub mod us_dc; + +#[cfg(feature = "US")] +pub mod us_de; + +#[cfg(feature = "US")] +pub mod us_fl; + +#[cfg(feature = "US")] +pub mod us_ga; + +#[cfg(feature = "US")] +pub mod us_gu; + +#[cfg(feature = "US")] +pub mod us_hi; + +#[cfg(feature = "US")] +pub mod us_ia; + +#[cfg(feature = "US")] +pub mod us_id; + +#[cfg(feature = "US")] +pub mod us_il; + +#[cfg(feature = "US")] +pub mod us_in; + +#[cfg(feature = "US")] +pub mod us_ks; + +#[cfg(feature = "US")] +pub mod us_ky; + +#[cfg(feature = "US")] +pub mod us_la; + +#[cfg(feature = "US")] +pub mod us_ma; + +#[cfg(feature = "US")] +pub mod us_md; + +#[cfg(feature = "US")] +pub mod us_me; + +#[cfg(feature = "US")] +pub mod us_mi; + +#[cfg(feature = "US")] +pub mod us_mn; + +#[cfg(feature = "US")] +pub mod us_mo; + +#[cfg(feature = "US")] +pub mod us_mp; + +#[cfg(feature = "US")] +pub mod us_ms; + +#[cfg(feature = "US")] +pub mod us_mt; + +#[cfg(feature = "US")] +pub mod us_nc; + +#[cfg(feature = "US")] +pub mod us_nd; + +#[cfg(feature = "US")] +pub mod us_ne; + +#[cfg(feature = "US")] +pub mod us_nh; + +#[cfg(feature = "US")] +pub mod us_nj; + +#[cfg(feature = "US")] +pub mod us_nm; + +#[cfg(feature = "US")] +pub mod us_nv; + +#[cfg(feature = "US")] +pub mod us_ny; + +#[cfg(feature = "US")] +pub mod us_oh; + +#[cfg(feature = "US")] +pub mod us_ok; + +#[cfg(feature = "US")] +pub mod us_or; + +#[cfg(feature = "US")] +pub mod us_pa; + +#[cfg(feature = "US")] +pub mod us_pr; + +#[cfg(feature = "US")] +pub mod us_ri; + +#[cfg(feature = "US")] +pub mod us_sc; + +#[cfg(feature = "US")] +pub mod us_sd; + +#[cfg(feature = "US")] +pub mod us_tn; + +#[cfg(feature = "US")] +pub mod us_tx; + +#[cfg(feature = "US")] +pub mod us_um; + +#[cfg(feature = "US")] +pub mod us_ut; + +#[cfg(feature = "US")] +pub mod us_va; + +#[cfg(feature = "US")] +pub mod us_vi; + +#[cfg(feature = "US")] +pub mod us_vt; + +#[cfg(feature = "US")] +pub mod us_wa; + +#[cfg(feature = "US")] +pub mod us_wi; + +#[cfg(feature = "US")] +pub mod us_wv; + +#[cfg(feature = "US")] +pub mod us_wy; + #[cfg(feature = "UY")] pub mod uy; diff --git a/src/data/mt.rs b/src/data/mt.rs index ab6660c..a6ddfd2 100644 --- a/src/data/mt.rs +++ b/src/data/mt.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Malta. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/mw.rs b/src/data/mw.rs index f7c23cf..eeae613 100644 --- a/src/data/mw.rs +++ b/src/data/mw.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Malawi. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/mx.rs b/src/data/mx.rs index 8791f33..c8c3cc8 100644 --- a/src/data/mx.rs +++ b/src/data/mx.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Mexico. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/my.rs b/src/data/my.rs index 3684812..19a5350 100644 --- a/src/data/my.rs +++ b/src/data/my.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Malaysia. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/mz.rs b/src/data/mz.rs index 6947640..85cfe33 100644 --- a/src/data/mz.rs +++ b/src/data/mz.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Mozambique. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/na.rs b/src/data/na.rs index 2f943fd..d473bca 100644 --- a/src/data/na.rs +++ b/src/data/na.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Namibia. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/ng.rs b/src/data/ng.rs index 0627379..63a39d2 100644 --- a/src/data/ng.rs +++ b/src/data/ng.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Nigeria. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/ni.rs b/src/data/ni.rs index ab837ac..d5871a7 100644 --- a/src/data/ni.rs +++ b/src/data/ni.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Nicaragua. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/nl.rs b/src/data/nl.rs index 17ab687..2713d97 100644 --- a/src/data/nl.rs +++ b/src/data/nl.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Netherlands. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/no.rs b/src/data/no.rs index baf5d73..5823670 100644 --- a/src/data/no.rs +++ b/src/data/no.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Norway. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/nz.rs b/src/data/nz.rs index 82e41d6..5dde3e6 100644 --- a/src/data/nz.rs +++ b/src/data/nz.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for New Zealand. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/pe.rs b/src/data/pe.rs index c6b37ce..b93a093 100644 --- a/src/data/pe.rs +++ b/src/data/pe.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Peru. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/pk.rs b/src/data/pk.rs index e54bf3e..4e915dc 100644 --- a/src/data/pk.rs +++ b/src/data/pk.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Pakistan. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/pl.rs b/src/data/pl.rs index 853f7bc..ae8906c 100644 --- a/src/data/pl.rs +++ b/src/data/pl.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Poland. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/pt.rs b/src/data/pt.rs index 6836937..8bcc1e5 100644 --- a/src/data/pt.rs +++ b/src/data/pt.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Portugal. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/py.rs b/src/data/py.rs index 3db8bda..0fb6e95 100644 --- a/src/data/py.rs +++ b/src/data/py.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Paraguay. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/ro.rs b/src/data/ro.rs index 51163f1..bdb1ede 100644 --- a/src/data/ro.rs +++ b/src/data/ro.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Romania. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/rs.rs b/src/data/rs.rs index e8e8e86..bd28a7f 100644 --- a/src/data/rs.rs +++ b/src/data/rs.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Serbia. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/ru.rs b/src/data/ru.rs index 9f1d376..c7213fe 100644 --- a/src/data/ru.rs +++ b/src/data/ru.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Russia. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/sa.rs b/src/data/sa.rs index 7963fad..9588e8a 100644 --- a/src/data/sa.rs +++ b/src/data/sa.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Saudi Arabia. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/se.rs b/src/data/se.rs index 3cc02e4..b21a368 100644 --- a/src/data/se.rs +++ b/src/data/se.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Sweden. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/sg.rs b/src/data/sg.rs index ab5ffd8..1b7b1f7 100644 --- a/src/data/sg.rs +++ b/src/data/sg.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Singapore. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/si.rs b/src/data/si.rs index 8c5fea2..fe5b221 100644 --- a/src/data/si.rs +++ b/src/data/si.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Slovenia. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/sk.rs b/src/data/sk.rs index 42abba8..1bb3c7c 100644 --- a/src/data/sk.rs +++ b/src/data/sk.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Slovakia. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/sz.rs b/src/data/sz.rs index 7397e7d..9dea3d9 100644 --- a/src/data/sz.rs +++ b/src/data/sz.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Swaziland. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/tn.rs b/src/data/tn.rs index 97f4a3f..6d65db0 100644 --- a/src/data/tn.rs +++ b/src/data/tn.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Tunisia. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/tr.rs b/src/data/tr.rs index e9fab0b..5440332 100644 --- a/src/data/tr.rs +++ b/src/data/tr.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Turkey. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/tw.rs b/src/data/tw.rs index 230b82e..1709ad6 100644 --- a/src/data/tw.rs +++ b/src/data/tw.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Taiwan. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/ua.rs b/src/data/ua.rs index d13ebc5..fa90e5b 100644 --- a/src/data/ua.rs +++ b/src/data/ua.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Ukraine. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/us.rs b/src/data/us.rs index 69be77f..665b456 100644 --- a/src/data/us.rs +++ b/src/data/us.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for United States. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/us_ak.rs b/src/data/us_ak.rs new file mode 100644 index 0000000..e83eafa --- /dev/null +++ b/src/data/us_ak.rs @@ -0,0 +1,1148 @@ +//! United States (Alaska) +use super::*; + +/// Generate holiday map for United States (Alaska). +#[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, 3, 27)?, "Seward's Day"), + (NaiveDate::from_ymd_res(2000, 10, 9)?, "Columbus Day"), + (NaiveDate::from_ymd_res(2000, 10, 18)?, "Alaska Day"), + ], + &mut map, + Country::US_AK, + "United States (Alaska)", + ); + + 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, 3, 26)?, "Seward's Day"), + (NaiveDate::from_ymd_res(2001, 10, 8)?, "Columbus Day"), + (NaiveDate::from_ymd_res(2001, 10, 18)?, "Alaska Day"), + ], + &mut map, + Country::US_AK, + "United States (Alaska)", + ); + + 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, 3, 25)?, "Seward's Day"), + (NaiveDate::from_ymd_res(2002, 10, 14)?, "Columbus Day"), + (NaiveDate::from_ymd_res(2002, 10, 18)?, "Alaska Day"), + ], + &mut map, + Country::US_AK, + "United States (Alaska)", + ); + + 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, 3, 31)?, "Seward's Day"), + (NaiveDate::from_ymd_res(2003, 10, 13)?, "Columbus Day"), + (NaiveDate::from_ymd_res(2003, 10, 18)?, "Alaska Day"), + ( + NaiveDate::from_ymd_res(2003, 10, 17)?, + "Alaska Day (observed)", + ), + ], + &mut map, + Country::US_AK, + "United States (Alaska)", + ); + + 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, 3, 29)?, "Seward's Day"), + (NaiveDate::from_ymd_res(2004, 10, 11)?, "Columbus Day"), + (NaiveDate::from_ymd_res(2004, 10, 18)?, "Alaska Day"), + ], + &mut map, + Country::US_AK, + "United States (Alaska)", + ); + + 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, 3, 28)?, "Seward's Day"), + (NaiveDate::from_ymd_res(2005, 10, 10)?, "Columbus Day"), + (NaiveDate::from_ymd_res(2005, 10, 18)?, "Alaska Day"), + ], + &mut map, + Country::US_AK, + "United States (Alaska)", + ); + + 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, 3, 27)?, "Seward's Day"), + (NaiveDate::from_ymd_res(2006, 10, 9)?, "Columbus Day"), + (NaiveDate::from_ymd_res(2006, 10, 18)?, "Alaska Day"), + ], + &mut map, + Country::US_AK, + "United States (Alaska)", + ); + + 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, 3, 26)?, "Seward's Day"), + (NaiveDate::from_ymd_res(2007, 10, 8)?, "Columbus Day"), + (NaiveDate::from_ymd_res(2007, 10, 18)?, "Alaska Day"), + ], + &mut map, + Country::US_AK, + "United States (Alaska)", + ); + + 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, 3, 31)?, "Seward's Day"), + (NaiveDate::from_ymd_res(2008, 10, 13)?, "Columbus Day"), + (NaiveDate::from_ymd_res(2008, 10, 18)?, "Alaska Day"), + ( + NaiveDate::from_ymd_res(2008, 10, 17)?, + "Alaska Day (observed)", + ), + ], + &mut map, + Country::US_AK, + "United States (Alaska)", + ); + + 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, 3, 30)?, "Seward's Day"), + (NaiveDate::from_ymd_res(2009, 10, 12)?, "Columbus Day"), + (NaiveDate::from_ymd_res(2009, 10, 18)?, "Alaska Day"), + ( + NaiveDate::from_ymd_res(2009, 10, 19)?, + "Alaska Day (observed)", + ), + ], + &mut map, + Country::US_AK, + "United States (Alaska)", + ); + + 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, 3, 29)?, "Seward's Day"), + (NaiveDate::from_ymd_res(2010, 10, 11)?, "Columbus Day"), + (NaiveDate::from_ymd_res(2010, 10, 18)?, "Alaska Day"), + ], + &mut map, + Country::US_AK, + "United States (Alaska)", + ); + + 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, 3, 28)?, "Seward's Day"), + (NaiveDate::from_ymd_res(2011, 10, 10)?, "Columbus Day"), + (NaiveDate::from_ymd_res(2011, 10, 18)?, "Alaska Day"), + ], + &mut map, + Country::US_AK, + "United States (Alaska)", + ); + + 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, 3, 26)?, "Seward's Day"), + (NaiveDate::from_ymd_res(2012, 10, 8)?, "Columbus Day"), + (NaiveDate::from_ymd_res(2012, 10, 18)?, "Alaska Day"), + ], + &mut map, + Country::US_AK, + "United States (Alaska)", + ); + + 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, 3, 25)?, "Seward's Day"), + (NaiveDate::from_ymd_res(2013, 10, 14)?, "Columbus Day"), + (NaiveDate::from_ymd_res(2013, 10, 18)?, "Alaska Day"), + ], + &mut map, + Country::US_AK, + "United States (Alaska)", + ); + + 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, 3, 31)?, "Seward's Day"), + (NaiveDate::from_ymd_res(2014, 10, 13)?, "Columbus Day"), + (NaiveDate::from_ymd_res(2014, 10, 18)?, "Alaska Day"), + ( + NaiveDate::from_ymd_res(2014, 10, 17)?, + "Alaska Day (observed)", + ), + ], + &mut map, + Country::US_AK, + "United States (Alaska)", + ); + + 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, 3, 30)?, "Seward's Day"), + ( + NaiveDate::from_ymd_res(2015, 10, 12)?, + "Indigenous Peoples' Day", + ), + (NaiveDate::from_ymd_res(2015, 10, 18)?, "Alaska Day"), + ( + NaiveDate::from_ymd_res(2015, 10, 19)?, + "Alaska Day (observed)", + ), + ], + &mut map, + Country::US_AK, + "United States (Alaska)", + ); + + 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, 3, 28)?, "Seward's Day"), + ( + NaiveDate::from_ymd_res(2016, 10, 10)?, + "Indigenous Peoples' Day", + ), + (NaiveDate::from_ymd_res(2016, 10, 18)?, "Alaska Day"), + ], + &mut map, + Country::US_AK, + "United States (Alaska)", + ); + + 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, 3, 27)?, "Seward's Day"), + ( + NaiveDate::from_ymd_res(2017, 10, 9)?, + "Indigenous Peoples' Day", + ), + (NaiveDate::from_ymd_res(2017, 10, 18)?, "Alaska Day"), + ], + &mut map, + Country::US_AK, + "United States (Alaska)", + ); + + 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, 3, 26)?, "Seward's Day"), + ( + NaiveDate::from_ymd_res(2018, 10, 8)?, + "Indigenous Peoples' Day", + ), + (NaiveDate::from_ymd_res(2018, 10, 18)?, "Alaska Day"), + ], + &mut map, + Country::US_AK, + "United States (Alaska)", + ); + + 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, 3, 25)?, "Seward's Day"), + ( + NaiveDate::from_ymd_res(2019, 10, 14)?, + "Indigenous Peoples' Day", + ), + (NaiveDate::from_ymd_res(2019, 10, 18)?, "Alaska Day"), + ], + &mut map, + Country::US_AK, + "United States (Alaska)", + ); + + 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, 3, 30)?, "Seward's Day"), + ( + NaiveDate::from_ymd_res(2020, 10, 12)?, + "Indigenous Peoples' Day", + ), + (NaiveDate::from_ymd_res(2020, 10, 18)?, "Alaska Day"), + ( + NaiveDate::from_ymd_res(2020, 10, 19)?, + "Alaska Day (observed)", + ), + ], + &mut map, + Country::US_AK, + "United States (Alaska)", + ); + + 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, 3, 29)?, "Seward's Day"), + ( + NaiveDate::from_ymd_res(2021, 10, 11)?, + "Indigenous Peoples' Day", + ), + (NaiveDate::from_ymd_res(2021, 10, 18)?, "Alaska Day"), + ], + &mut map, + Country::US_AK, + "United States (Alaska)", + ); + + 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, 3, 28)?, "Seward's Day"), + ( + NaiveDate::from_ymd_res(2022, 10, 10)?, + "Indigenous Peoples' Day", + ), + (NaiveDate::from_ymd_res(2022, 10, 18)?, "Alaska Day"), + ], + &mut map, + Country::US_AK, + "United States (Alaska)", + ); + + 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, 3, 27)?, "Seward's Day"), + ( + NaiveDate::from_ymd_res(2023, 10, 9)?, + "Indigenous Peoples' Day", + ), + (NaiveDate::from_ymd_res(2023, 10, 18)?, "Alaska Day"), + ], + &mut map, + Country::US_AK, + "United States (Alaska)", + ); + + 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, 3, 25)?, "Seward's Day"), + ( + NaiveDate::from_ymd_res(2024, 10, 14)?, + "Indigenous Peoples' Day", + ), + (NaiveDate::from_ymd_res(2024, 10, 18)?, "Alaska Day"), + ], + &mut map, + Country::US_AK, + "United States (Alaska)", + ); + + 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, 3, 31)?, "Seward's Day"), + ( + NaiveDate::from_ymd_res(2025, 10, 13)?, + "Indigenous Peoples' Day", + ), + (NaiveDate::from_ymd_res(2025, 10, 18)?, "Alaska Day"), + ( + NaiveDate::from_ymd_res(2025, 10, 17)?, + "Alaska Day (observed)", + ), + ], + &mut map, + Country::US_AK, + "United States (Alaska)", + ); + + 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, 3, 30)?, "Seward's Day"), + ( + NaiveDate::from_ymd_res(2026, 10, 12)?, + "Indigenous Peoples' Day", + ), + (NaiveDate::from_ymd_res(2026, 10, 18)?, "Alaska Day"), + ( + NaiveDate::from_ymd_res(2026, 10, 19)?, + "Alaska Day (observed)", + ), + ], + &mut map, + Country::US_AK, + "United States (Alaska)", + ); + + 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, 3, 29)?, "Seward's Day"), + ( + NaiveDate::from_ymd_res(2027, 10, 11)?, + "Indigenous Peoples' Day", + ), + (NaiveDate::from_ymd_res(2027, 10, 18)?, "Alaska Day"), + ], + &mut map, + Country::US_AK, + "United States (Alaska)", + ); + + 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, 3, 27)?, "Seward's Day"), + ( + NaiveDate::from_ymd_res(2028, 10, 9)?, + "Indigenous Peoples' Day", + ), + (NaiveDate::from_ymd_res(2028, 10, 18)?, "Alaska Day"), + ], + &mut map, + Country::US_AK, + "United States (Alaska)", + ); + + 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, 3, 26)?, "Seward's Day"), + ( + NaiveDate::from_ymd_res(2029, 10, 8)?, + "Indigenous Peoples' Day", + ), + (NaiveDate::from_ymd_res(2029, 10, 18)?, "Alaska Day"), + ], + &mut map, + Country::US_AK, + "United States (Alaska)", + ); + + 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, 3, 25)?, "Seward's Day"), + ( + NaiveDate::from_ymd_res(2030, 10, 14)?, + "Indigenous Peoples' Day", + ), + (NaiveDate::from_ymd_res(2030, 10, 18)?, "Alaska Day"), + ], + &mut map, + Country::US_AK, + "United States (Alaska)", + ); + + Ok(map) +} diff --git a/src/data/us_al.rs b/src/data/us_al.rs new file mode 100644 index 0000000..389c445 --- /dev/null +++ b/src/data/us_al.rs @@ -0,0 +1,1347 @@ +//! United States (Alabama) +use super::*; + +/// Generate holiday map for United States (Alabama). +#[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 & Robert E. Lee's Birthday", + ), + ( + NaiveDate::from_ymd_res(2000, 2, 21)?, + "George Washington & Thomas Jefferson's Birthday", + ), + ( + NaiveDate::from_ymd_res(2000, 4, 24)?, + "Confederate Memorial Day", + ), + ( + NaiveDate::from_ymd_res(2000, 6, 5)?, + "Jefferson Davis Birthday", + ), + ( + NaiveDate::from_ymd_res(2000, 10, 9)?, + "Columbus Day / American Indian Heritage Day / Fraternal Day", + ), + ], + &mut map, + Country::US_AL, + "United States (Alabama)", + ); + + 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 & Robert E. Lee's Birthday", + ), + ( + NaiveDate::from_ymd_res(2001, 2, 19)?, + "George Washington & Thomas Jefferson's Birthday", + ), + ( + NaiveDate::from_ymd_res(2001, 4, 23)?, + "Confederate Memorial Day", + ), + ( + NaiveDate::from_ymd_res(2001, 6, 4)?, + "Jefferson Davis Birthday", + ), + ( + NaiveDate::from_ymd_res(2001, 10, 8)?, + "Columbus Day / American Indian Heritage Day / Fraternal Day", + ), + ], + &mut map, + Country::US_AL, + "United States (Alabama)", + ); + + 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 & Robert E. Lee's Birthday", + ), + ( + NaiveDate::from_ymd_res(2002, 2, 18)?, + "George Washington & Thomas Jefferson's Birthday", + ), + ( + NaiveDate::from_ymd_res(2002, 4, 22)?, + "Confederate Memorial Day", + ), + ( + NaiveDate::from_ymd_res(2002, 6, 3)?, + "Jefferson Davis Birthday", + ), + ( + NaiveDate::from_ymd_res(2002, 10, 14)?, + "Columbus Day / American Indian Heritage Day / Fraternal Day", + ), + ], + &mut map, + Country::US_AL, + "United States (Alabama)", + ); + + 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 & Robert E. Lee's Birthday", + ), + ( + NaiveDate::from_ymd_res(2003, 2, 17)?, + "George Washington & Thomas Jefferson's Birthday", + ), + ( + NaiveDate::from_ymd_res(2003, 4, 28)?, + "Confederate Memorial Day", + ), + ( + NaiveDate::from_ymd_res(2003, 6, 2)?, + "Jefferson Davis Birthday", + ), + ( + NaiveDate::from_ymd_res(2003, 10, 13)?, + "Columbus Day / American Indian Heritage Day / Fraternal Day", + ), + ], + &mut map, + Country::US_AL, + "United States (Alabama)", + ); + + 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 & Robert E. Lee's Birthday", + ), + ( + NaiveDate::from_ymd_res(2004, 2, 16)?, + "George Washington & Thomas Jefferson's Birthday", + ), + ( + NaiveDate::from_ymd_res(2004, 4, 26)?, + "Confederate Memorial Day", + ), + ( + NaiveDate::from_ymd_res(2004, 6, 7)?, + "Jefferson Davis Birthday", + ), + ( + NaiveDate::from_ymd_res(2004, 10, 11)?, + "Columbus Day / American Indian Heritage Day / Fraternal Day", + ), + ], + &mut map, + Country::US_AL, + "United States (Alabama)", + ); + + 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 & Robert E. Lee's Birthday", + ), + ( + NaiveDate::from_ymd_res(2005, 2, 21)?, + "George Washington & Thomas Jefferson's Birthday", + ), + ( + NaiveDate::from_ymd_res(2005, 4, 25)?, + "Confederate Memorial Day", + ), + ( + NaiveDate::from_ymd_res(2005, 6, 6)?, + "Jefferson Davis Birthday", + ), + ( + NaiveDate::from_ymd_res(2005, 10, 10)?, + "Columbus Day / American Indian Heritage Day / Fraternal Day", + ), + ], + &mut map, + Country::US_AL, + "United States (Alabama)", + ); + + 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 & Robert E. Lee's Birthday", + ), + ( + NaiveDate::from_ymd_res(2006, 2, 20)?, + "George Washington & Thomas Jefferson's Birthday", + ), + ( + NaiveDate::from_ymd_res(2006, 4, 24)?, + "Confederate Memorial Day", + ), + ( + NaiveDate::from_ymd_res(2006, 6, 5)?, + "Jefferson Davis Birthday", + ), + ( + NaiveDate::from_ymd_res(2006, 10, 9)?, + "Columbus Day / American Indian Heritage Day / Fraternal Day", + ), + ], + &mut map, + Country::US_AL, + "United States (Alabama)", + ); + + 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 & Robert E. Lee's Birthday", + ), + ( + NaiveDate::from_ymd_res(2007, 2, 19)?, + "George Washington & Thomas Jefferson's Birthday", + ), + ( + NaiveDate::from_ymd_res(2007, 4, 23)?, + "Confederate Memorial Day", + ), + ( + NaiveDate::from_ymd_res(2007, 6, 4)?, + "Jefferson Davis Birthday", + ), + ( + NaiveDate::from_ymd_res(2007, 10, 8)?, + "Columbus Day / American Indian Heritage Day / Fraternal Day", + ), + ], + &mut map, + Country::US_AL, + "United States (Alabama)", + ); + + 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 & Robert E. Lee's Birthday", + ), + ( + NaiveDate::from_ymd_res(2008, 2, 18)?, + "George Washington & Thomas Jefferson's Birthday", + ), + ( + NaiveDate::from_ymd_res(2008, 4, 28)?, + "Confederate Memorial Day", + ), + ( + NaiveDate::from_ymd_res(2008, 6, 2)?, + "Jefferson Davis Birthday", + ), + ( + NaiveDate::from_ymd_res(2008, 10, 13)?, + "Columbus Day / American Indian Heritage Day / Fraternal Day", + ), + ], + &mut map, + Country::US_AL, + "United States (Alabama)", + ); + + 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 & Robert E. Lee's Birthday", + ), + ( + NaiveDate::from_ymd_res(2009, 2, 16)?, + "George Washington & Thomas Jefferson's Birthday", + ), + ( + NaiveDate::from_ymd_res(2009, 4, 27)?, + "Confederate Memorial Day", + ), + ( + NaiveDate::from_ymd_res(2009, 6, 1)?, + "Jefferson Davis Birthday", + ), + ( + NaiveDate::from_ymd_res(2009, 10, 12)?, + "Columbus Day / American Indian Heritage Day / Fraternal Day", + ), + ], + &mut map, + Country::US_AL, + "United States (Alabama)", + ); + + 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 & Robert E. Lee's Birthday", + ), + ( + NaiveDate::from_ymd_res(2010, 2, 15)?, + "George Washington & Thomas Jefferson's Birthday", + ), + ( + NaiveDate::from_ymd_res(2010, 4, 26)?, + "Confederate Memorial Day", + ), + ( + NaiveDate::from_ymd_res(2010, 6, 7)?, + "Jefferson Davis Birthday", + ), + ( + NaiveDate::from_ymd_res(2010, 10, 11)?, + "Columbus Day / American Indian Heritage Day / Fraternal Day", + ), + ], + &mut map, + Country::US_AL, + "United States (Alabama)", + ); + + 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 & Robert E. Lee's Birthday", + ), + ( + NaiveDate::from_ymd_res(2011, 2, 21)?, + "George Washington & Thomas Jefferson's Birthday", + ), + ( + NaiveDate::from_ymd_res(2011, 4, 25)?, + "Confederate Memorial Day", + ), + ( + NaiveDate::from_ymd_res(2011, 6, 6)?, + "Jefferson Davis Birthday", + ), + ( + NaiveDate::from_ymd_res(2011, 10, 10)?, + "Columbus Day / American Indian Heritage Day / Fraternal Day", + ), + ], + &mut map, + Country::US_AL, + "United States (Alabama)", + ); + + 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 & Robert E. Lee's Birthday", + ), + ( + NaiveDate::from_ymd_res(2012, 2, 20)?, + "George Washington & Thomas Jefferson's Birthday", + ), + ( + NaiveDate::from_ymd_res(2012, 4, 23)?, + "Confederate Memorial Day", + ), + ( + NaiveDate::from_ymd_res(2012, 6, 4)?, + "Jefferson Davis Birthday", + ), + ( + NaiveDate::from_ymd_res(2012, 10, 8)?, + "Columbus Day / American Indian Heritage Day / Fraternal Day", + ), + ], + &mut map, + Country::US_AL, + "United States (Alabama)", + ); + + 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 & Robert E. Lee's Birthday", + ), + ( + NaiveDate::from_ymd_res(2013, 2, 18)?, + "George Washington & Thomas Jefferson's Birthday", + ), + ( + NaiveDate::from_ymd_res(2013, 4, 22)?, + "Confederate Memorial Day", + ), + ( + NaiveDate::from_ymd_res(2013, 6, 3)?, + "Jefferson Davis Birthday", + ), + ( + NaiveDate::from_ymd_res(2013, 10, 14)?, + "Columbus Day / American Indian Heritage Day / Fraternal Day", + ), + ], + &mut map, + Country::US_AL, + "United States (Alabama)", + ); + + 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 & Robert E. Lee's Birthday", + ), + ( + NaiveDate::from_ymd_res(2014, 2, 17)?, + "George Washington & Thomas Jefferson's Birthday", + ), + ( + NaiveDate::from_ymd_res(2014, 4, 28)?, + "Confederate Memorial Day", + ), + ( + NaiveDate::from_ymd_res(2014, 6, 2)?, + "Jefferson Davis Birthday", + ), + ( + NaiveDate::from_ymd_res(2014, 10, 13)?, + "Columbus Day / American Indian Heritage Day / Fraternal Day", + ), + ], + &mut map, + Country::US_AL, + "United States (Alabama)", + ); + + 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 & Robert E. Lee's Birthday", + ), + ( + NaiveDate::from_ymd_res(2015, 2, 16)?, + "George Washington & Thomas Jefferson's Birthday", + ), + ( + NaiveDate::from_ymd_res(2015, 4, 27)?, + "Confederate Memorial Day", + ), + ( + NaiveDate::from_ymd_res(2015, 6, 1)?, + "Jefferson Davis Birthday", + ), + ( + NaiveDate::from_ymd_res(2015, 10, 12)?, + "Columbus Day / American Indian Heritage Day / Fraternal Day", + ), + ], + &mut map, + Country::US_AL, + "United States (Alabama)", + ); + + 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 & Robert E. Lee's Birthday", + ), + ( + NaiveDate::from_ymd_res(2016, 2, 15)?, + "George Washington & Thomas Jefferson's Birthday", + ), + ( + NaiveDate::from_ymd_res(2016, 4, 25)?, + "Confederate Memorial Day", + ), + ( + NaiveDate::from_ymd_res(2016, 6, 6)?, + "Jefferson Davis Birthday", + ), + ( + NaiveDate::from_ymd_res(2016, 10, 10)?, + "Columbus Day / American Indian Heritage Day / Fraternal Day", + ), + ], + &mut map, + Country::US_AL, + "United States (Alabama)", + ); + + 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 & Robert E. Lee's Birthday", + ), + ( + NaiveDate::from_ymd_res(2017, 2, 20)?, + "George Washington & Thomas Jefferson's Birthday", + ), + ( + NaiveDate::from_ymd_res(2017, 4, 24)?, + "Confederate Memorial Day", + ), + ( + NaiveDate::from_ymd_res(2017, 6, 5)?, + "Jefferson Davis Birthday", + ), + ( + NaiveDate::from_ymd_res(2017, 10, 9)?, + "Columbus Day / American Indian Heritage Day / Fraternal Day", + ), + ], + &mut map, + Country::US_AL, + "United States (Alabama)", + ); + + 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 & Robert E. Lee's Birthday", + ), + ( + NaiveDate::from_ymd_res(2018, 2, 19)?, + "George Washington & Thomas Jefferson's Birthday", + ), + ( + NaiveDate::from_ymd_res(2018, 4, 23)?, + "Confederate Memorial Day", + ), + ( + NaiveDate::from_ymd_res(2018, 6, 4)?, + "Jefferson Davis Birthday", + ), + ( + NaiveDate::from_ymd_res(2018, 10, 8)?, + "Columbus Day / American Indian Heritage Day / Fraternal Day", + ), + ], + &mut map, + Country::US_AL, + "United States (Alabama)", + ); + + 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 & Robert E. Lee's Birthday", + ), + ( + NaiveDate::from_ymd_res(2019, 2, 18)?, + "George Washington & Thomas Jefferson's Birthday", + ), + ( + NaiveDate::from_ymd_res(2019, 4, 22)?, + "Confederate Memorial Day", + ), + ( + NaiveDate::from_ymd_res(2019, 6, 3)?, + "Jefferson Davis Birthday", + ), + ( + NaiveDate::from_ymd_res(2019, 10, 14)?, + "Columbus Day / American Indian Heritage Day / Fraternal Day", + ), + ], + &mut map, + Country::US_AL, + "United States (Alabama)", + ); + + 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 & Robert E. Lee's Birthday", + ), + ( + NaiveDate::from_ymd_res(2020, 2, 17)?, + "George Washington & Thomas Jefferson's Birthday", + ), + ( + NaiveDate::from_ymd_res(2020, 4, 27)?, + "Confederate Memorial Day", + ), + ( + NaiveDate::from_ymd_res(2020, 6, 1)?, + "Jefferson Davis Birthday", + ), + ( + NaiveDate::from_ymd_res(2020, 10, 12)?, + "Columbus Day / American Indian Heritage Day / Fraternal Day", + ), + ], + &mut map, + Country::US_AL, + "United States (Alabama)", + ); + + 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 & Robert E. Lee's Birthday", + ), + ( + NaiveDate::from_ymd_res(2021, 2, 15)?, + "George Washington & Thomas Jefferson's Birthday", + ), + ( + NaiveDate::from_ymd_res(2021, 4, 26)?, + "Confederate Memorial Day", + ), + ( + NaiveDate::from_ymd_res(2021, 6, 7)?, + "Jefferson Davis Birthday", + ), + ( + NaiveDate::from_ymd_res(2021, 10, 11)?, + "Columbus Day / American Indian Heritage Day / Fraternal Day", + ), + ], + &mut map, + Country::US_AL, + "United States (Alabama)", + ); + + 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 & Robert E. Lee's Birthday", + ), + ( + NaiveDate::from_ymd_res(2022, 2, 21)?, + "George Washington & Thomas Jefferson's Birthday", + ), + ( + NaiveDate::from_ymd_res(2022, 4, 25)?, + "Confederate Memorial Day", + ), + ( + NaiveDate::from_ymd_res(2022, 6, 6)?, + "Jefferson Davis Birthday", + ), + ( + NaiveDate::from_ymd_res(2022, 10, 10)?, + "Columbus Day / American Indian Heritage Day / Fraternal Day", + ), + ], + &mut map, + Country::US_AL, + "United States (Alabama)", + ); + + 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 & Robert E. Lee's Birthday", + ), + ( + NaiveDate::from_ymd_res(2023, 2, 20)?, + "George Washington & Thomas Jefferson's Birthday", + ), + ( + NaiveDate::from_ymd_res(2023, 4, 24)?, + "Confederate Memorial Day", + ), + ( + NaiveDate::from_ymd_res(2023, 6, 5)?, + "Jefferson Davis Birthday", + ), + ( + NaiveDate::from_ymd_res(2023, 10, 9)?, + "Columbus Day / American Indian Heritage Day / Fraternal Day", + ), + ], + &mut map, + Country::US_AL, + "United States (Alabama)", + ); + + 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 & Robert E. Lee's Birthday", + ), + ( + NaiveDate::from_ymd_res(2024, 2, 19)?, + "George Washington & Thomas Jefferson's Birthday", + ), + ( + NaiveDate::from_ymd_res(2024, 4, 22)?, + "Confederate Memorial Day", + ), + ( + NaiveDate::from_ymd_res(2024, 6, 3)?, + "Jefferson Davis Birthday", + ), + ( + NaiveDate::from_ymd_res(2024, 10, 14)?, + "Columbus Day / American Indian Heritage Day / Fraternal Day", + ), + ], + &mut map, + Country::US_AL, + "United States (Alabama)", + ); + + 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 & Robert E. Lee's Birthday", + ), + ( + NaiveDate::from_ymd_res(2025, 2, 17)?, + "George Washington & Thomas Jefferson's Birthday", + ), + ( + NaiveDate::from_ymd_res(2025, 4, 28)?, + "Confederate Memorial Day", + ), + ( + NaiveDate::from_ymd_res(2025, 6, 2)?, + "Jefferson Davis Birthday", + ), + ( + NaiveDate::from_ymd_res(2025, 10, 13)?, + "Columbus Day / American Indian Heritage Day / Fraternal Day", + ), + ], + &mut map, + Country::US_AL, + "United States (Alabama)", + ); + + 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 & Robert E. Lee's Birthday", + ), + ( + NaiveDate::from_ymd_res(2026, 2, 16)?, + "George Washington & Thomas Jefferson's Birthday", + ), + ( + NaiveDate::from_ymd_res(2026, 4, 27)?, + "Confederate Memorial Day", + ), + ( + NaiveDate::from_ymd_res(2026, 6, 1)?, + "Jefferson Davis Birthday", + ), + ( + NaiveDate::from_ymd_res(2026, 10, 12)?, + "Columbus Day / American Indian Heritage Day / Fraternal Day", + ), + ], + &mut map, + Country::US_AL, + "United States (Alabama)", + ); + + 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 & Robert E. Lee's Birthday", + ), + ( + NaiveDate::from_ymd_res(2027, 2, 15)?, + "George Washington & Thomas Jefferson's Birthday", + ), + ( + NaiveDate::from_ymd_res(2027, 4, 26)?, + "Confederate Memorial Day", + ), + ( + NaiveDate::from_ymd_res(2027, 6, 7)?, + "Jefferson Davis Birthday", + ), + ( + NaiveDate::from_ymd_res(2027, 10, 11)?, + "Columbus Day / American Indian Heritage Day / Fraternal Day", + ), + ], + &mut map, + Country::US_AL, + "United States (Alabama)", + ); + + 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 & Robert E. Lee's Birthday", + ), + ( + NaiveDate::from_ymd_res(2028, 2, 21)?, + "George Washington & Thomas Jefferson's Birthday", + ), + ( + NaiveDate::from_ymd_res(2028, 4, 24)?, + "Confederate Memorial Day", + ), + ( + NaiveDate::from_ymd_res(2028, 6, 5)?, + "Jefferson Davis Birthday", + ), + ( + NaiveDate::from_ymd_res(2028, 10, 9)?, + "Columbus Day / American Indian Heritage Day / Fraternal Day", + ), + ], + &mut map, + Country::US_AL, + "United States (Alabama)", + ); + + 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 & Robert E. Lee's Birthday", + ), + ( + NaiveDate::from_ymd_res(2029, 2, 19)?, + "George Washington & Thomas Jefferson's Birthday", + ), + ( + NaiveDate::from_ymd_res(2029, 4, 23)?, + "Confederate Memorial Day", + ), + ( + NaiveDate::from_ymd_res(2029, 6, 4)?, + "Jefferson Davis Birthday", + ), + ( + NaiveDate::from_ymd_res(2029, 10, 8)?, + "Columbus Day / American Indian Heritage Day / Fraternal Day", + ), + ], + &mut map, + Country::US_AL, + "United States (Alabama)", + ); + + 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 & Robert E. Lee's Birthday", + ), + ( + NaiveDate::from_ymd_res(2030, 2, 18)?, + "George Washington & Thomas Jefferson's Birthday", + ), + ( + NaiveDate::from_ymd_res(2030, 4, 22)?, + "Confederate Memorial Day", + ), + ( + NaiveDate::from_ymd_res(2030, 6, 3)?, + "Jefferson Davis Birthday", + ), + ( + NaiveDate::from_ymd_res(2030, 10, 14)?, + "Columbus Day / American Indian Heritage Day / Fraternal Day", + ), + ], + &mut map, + Country::US_AL, + "United States (Alabama)", + ); + + Ok(map) +} diff --git a/src/data/us_ar.rs b/src/data/us_ar.rs new file mode 100644 index 0000000..26893bc --- /dev/null +++ b/src/data/us_ar.rs @@ -0,0 +1,975 @@ +//! United States (Arkansas) +use super::*; + +/// Generate holiday map for United States (Arkansas). +#[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)?, + "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", + ), + ( + NaiveDate::from_ymd_res(2000, 2, 21)?, + "George Washington's Birthday and Daisy Gatson Bates Day", + ), + ], + &mut map, + Country::US_AR, + "United States (Arkansas)", + ); + + 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)?, + "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", + ), + ( + NaiveDate::from_ymd_res(2001, 2, 19)?, + "George Washington's Birthday and Daisy Gatson Bates Day", + ), + ], + &mut map, + Country::US_AR, + "United States (Arkansas)", + ); + + 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)?, + "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", + ), + ( + NaiveDate::from_ymd_res(2002, 2, 18)?, + "George Washington's Birthday and Daisy Gatson Bates Day", + ), + ], + &mut map, + Country::US_AR, + "United States (Arkansas)", + ); + + 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)?, + "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", + ), + ( + NaiveDate::from_ymd_res(2003, 2, 17)?, + "George Washington's Birthday and Daisy Gatson Bates Day", + ), + ], + &mut map, + Country::US_AR, + "United States (Arkansas)", + ); + + 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)?, + "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", + ), + ( + NaiveDate::from_ymd_res(2004, 2, 16)?, + "George Washington's Birthday and Daisy Gatson Bates Day", + ), + ], + &mut map, + Country::US_AR, + "United States (Arkansas)", + ); + + 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)?, + "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", + ), + ( + NaiveDate::from_ymd_res(2005, 2, 21)?, + "George Washington's Birthday and Daisy Gatson Bates Day", + ), + ], + &mut map, + Country::US_AR, + "United States (Arkansas)", + ); + + 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)?, + "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", + ), + ( + NaiveDate::from_ymd_res(2006, 2, 20)?, + "George Washington's Birthday and Daisy Gatson Bates Day", + ), + ], + &mut map, + Country::US_AR, + "United States (Arkansas)", + ); + + 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)?, + "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", + ), + ( + NaiveDate::from_ymd_res(2007, 2, 19)?, + "George Washington's Birthday and Daisy Gatson Bates Day", + ), + ], + &mut map, + Country::US_AR, + "United States (Arkansas)", + ); + + 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)?, + "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", + ), + ( + NaiveDate::from_ymd_res(2008, 2, 18)?, + "George Washington's Birthday and Daisy Gatson Bates Day", + ), + ], + &mut map, + Country::US_AR, + "United States (Arkansas)", + ); + + 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)?, + "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", + ), + ( + NaiveDate::from_ymd_res(2009, 2, 16)?, + "George Washington's Birthday and Daisy Gatson Bates Day", + ), + ], + &mut map, + Country::US_AR, + "United States (Arkansas)", + ); + + 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)?, + "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", + ), + ( + NaiveDate::from_ymd_res(2010, 2, 15)?, + "George Washington's Birthday and Daisy Gatson Bates Day", + ), + ], + &mut map, + Country::US_AR, + "United States (Arkansas)", + ); + + 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)?, + "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", + ), + ( + NaiveDate::from_ymd_res(2011, 2, 21)?, + "George Washington's Birthday and Daisy Gatson Bates Day", + ), + ], + &mut map, + Country::US_AR, + "United States (Arkansas)", + ); + + 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)?, + "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", + ), + ( + NaiveDate::from_ymd_res(2012, 2, 20)?, + "George Washington's Birthday and Daisy Gatson Bates Day", + ), + ], + &mut map, + Country::US_AR, + "United States (Arkansas)", + ); + + 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)?, + "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", + ), + ( + NaiveDate::from_ymd_res(2013, 2, 18)?, + "George Washington's Birthday and Daisy Gatson Bates Day", + ), + ], + &mut map, + Country::US_AR, + "United States (Arkansas)", + ); + + 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)?, + "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", + ), + ( + NaiveDate::from_ymd_res(2014, 2, 17)?, + "George Washington's Birthday and Daisy Gatson Bates Day", + ), + ], + &mut map, + Country::US_AR, + "United States (Arkansas)", + ); + + 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)?, + "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", + ), + ( + NaiveDate::from_ymd_res(2015, 2, 16)?, + "George Washington's Birthday and Daisy Gatson Bates Day", + ), + ], + &mut map, + Country::US_AR, + "United States (Arkansas)", + ); + + 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)?, + "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", + ), + ( + NaiveDate::from_ymd_res(2016, 2, 15)?, + "George Washington's Birthday and Daisy Gatson Bates Day", + ), + ], + &mut map, + Country::US_AR, + "United States (Arkansas)", + ); + + 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)?, + "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", + ), + ( + NaiveDate::from_ymd_res(2017, 2, 20)?, + "George Washington's Birthday and Daisy Gatson Bates Day", + ), + ], + &mut map, + Country::US_AR, + "United States (Arkansas)", + ); + + 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)?, + "George Washington's Birthday and Daisy Gatson Bates Day", + ), + ], + &mut map, + Country::US_AR, + "United States (Arkansas)", + ); + + 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)?, + "George Washington's Birthday and Daisy Gatson Bates Day", + ), + ], + &mut map, + Country::US_AR, + "United States (Arkansas)", + ); + + 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)?, + "George Washington's Birthday and Daisy Gatson Bates Day", + ), + ], + &mut map, + Country::US_AR, + "United States (Arkansas)", + ); + + 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)?, + "George Washington's Birthday and Daisy Gatson Bates Day", + ), + ], + &mut map, + Country::US_AR, + "United States (Arkansas)", + ); + + 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)?, + "George Washington's Birthday and Daisy Gatson Bates Day", + ), + ], + &mut map, + Country::US_AR, + "United States (Arkansas)", + ); + + 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)?, + "George Washington's Birthday and Daisy Gatson Bates Day", + ), + ], + &mut map, + Country::US_AR, + "United States (Arkansas)", + ); + + 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)?, + "George Washington's Birthday and Daisy Gatson Bates Day", + ), + ], + &mut map, + Country::US_AR, + "United States (Arkansas)", + ); + + 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)?, + "George Washington's Birthday and Daisy Gatson Bates Day", + ), + ], + &mut map, + Country::US_AR, + "United States (Arkansas)", + ); + + 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)?, + "George Washington's Birthday and Daisy Gatson Bates Day", + ), + ], + &mut map, + Country::US_AR, + "United States (Arkansas)", + ); + + 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)?, + "George Washington's Birthday and Daisy Gatson Bates Day", + ), + ], + &mut map, + Country::US_AR, + "United States (Arkansas)", + ); + + 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)?, + "George Washington's Birthday and Daisy Gatson Bates Day", + ), + ], + &mut map, + Country::US_AR, + "United States (Arkansas)", + ); + + 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)?, + "George Washington's Birthday and Daisy Gatson Bates Day", + ), + ], + &mut map, + Country::US_AR, + "United States (Arkansas)", + ); + + 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)?, + "George Washington's Birthday and Daisy Gatson Bates Day", + ), + ], + &mut map, + Country::US_AR, + "United States (Arkansas)", + ); + + Ok(map) +} diff --git a/src/data/us_as.rs b/src/data/us_as.rs new file mode 100644 index 0000000..4dc1a0a --- /dev/null +++ b/src/data/us_as.rs @@ -0,0 +1,1085 @@ +//! United States (American Samoa) +use super::*; + +/// Generate holiday map for United States (American Samoa). +#[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"), + (NaiveDate::from_ymd_res(2000, 12, 24)?, "Christmas Eve"), + ( + NaiveDate::from_ymd_res(2000, 12, 22)?, + "Christmas Eve (observed)", + ), + ], + &mut map, + Country::US_AS, + "United States (American Samoa)", + ); + + 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"), + (NaiveDate::from_ymd_res(2001, 12, 24)?, "Christmas Eve"), + ], + &mut map, + Country::US_AS, + "United States (American Samoa)", + ); + + 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"), + (NaiveDate::from_ymd_res(2002, 12, 24)?, "Christmas Eve"), + ], + &mut map, + Country::US_AS, + "United States (American Samoa)", + ); + + 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"), + (NaiveDate::from_ymd_res(2003, 12, 24)?, "Christmas Eve"), + ], + &mut map, + Country::US_AS, + "United States (American Samoa)", + ); + + 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); Christmas Eve", + ), + ( + 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"), + ( + NaiveDate::from_ymd_res(2004, 12, 23)?, + "Christmas Eve (observed)", + ), + ], + &mut map, + Country::US_AS, + "United States (American Samoa)", + ); + + 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"), + (NaiveDate::from_ymd_res(2005, 12, 24)?, "Christmas Eve"), + ( + NaiveDate::from_ymd_res(2005, 12, 23)?, + "Christmas Eve (observed)", + ), + ], + &mut map, + Country::US_AS, + "United States (American Samoa)", + ); + + 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"), + (NaiveDate::from_ymd_res(2006, 12, 24)?, "Christmas Eve"), + ( + NaiveDate::from_ymd_res(2006, 12, 22)?, + "Christmas Eve (observed)", + ), + ], + &mut map, + Country::US_AS, + "United States (American Samoa)", + ); + + 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"), + (NaiveDate::from_ymd_res(2007, 12, 24)?, "Christmas Eve"), + ], + &mut map, + Country::US_AS, + "United States (American Samoa)", + ); + + 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"), + (NaiveDate::from_ymd_res(2008, 12, 24)?, "Christmas Eve"), + ], + &mut map, + Country::US_AS, + "United States (American Samoa)", + ); + + 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"), + (NaiveDate::from_ymd_res(2009, 12, 24)?, "Christmas Eve"), + ], + &mut map, + Country::US_AS, + "United States (American Samoa)", + ); + + 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); Christmas Eve", + ), + ( + 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"), + ( + NaiveDate::from_ymd_res(2010, 12, 23)?, + "Christmas Eve (observed)", + ), + ], + &mut map, + Country::US_AS, + "United States (American Samoa)", + ); + + 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"), + (NaiveDate::from_ymd_res(2011, 12, 24)?, "Christmas Eve"), + ( + NaiveDate::from_ymd_res(2011, 12, 23)?, + "Christmas Eve (observed)", + ), + ], + &mut map, + Country::US_AS, + "United States (American Samoa)", + ); + + 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"), + (NaiveDate::from_ymd_res(2012, 12, 24)?, "Christmas Eve"), + ], + &mut map, + Country::US_AS, + "United States (American Samoa)", + ); + + 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"), + (NaiveDate::from_ymd_res(2013, 12, 24)?, "Christmas Eve"), + ], + &mut map, + Country::US_AS, + "United States (American Samoa)", + ); + + 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"), + (NaiveDate::from_ymd_res(2014, 12, 24)?, "Christmas Eve"), + ], + &mut map, + Country::US_AS, + "United States (American Samoa)", + ); + + 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"), + (NaiveDate::from_ymd_res(2015, 12, 24)?, "Christmas Eve"), + ], + &mut map, + Country::US_AS, + "United States (American Samoa)", + ); + + 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"), + (NaiveDate::from_ymd_res(2016, 12, 24)?, "Christmas Eve"), + ( + NaiveDate::from_ymd_res(2016, 12, 23)?, + "Christmas Eve (observed)", + ), + ], + &mut map, + Country::US_AS, + "United States (American Samoa)", + ); + + 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"), + (NaiveDate::from_ymd_res(2017, 12, 24)?, "Christmas Eve"), + ( + NaiveDate::from_ymd_res(2017, 12, 22)?, + "Christmas Eve (observed)", + ), + ], + &mut map, + Country::US_AS, + "United States (American Samoa)", + ); + + 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"), + (NaiveDate::from_ymd_res(2018, 12, 24)?, "Christmas Eve"), + ], + &mut map, + Country::US_AS, + "United States (American Samoa)", + ); + + 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"), + (NaiveDate::from_ymd_res(2019, 12, 24)?, "Christmas Eve"), + ], + &mut map, + Country::US_AS, + "United States (American Samoa)", + ); + + 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"), + (NaiveDate::from_ymd_res(2020, 12, 24)?, "Christmas Eve"), + ], + &mut map, + Country::US_AS, + "United States (American Samoa)", + ); + + 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); Christmas Eve", + ), + ( + 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"), + ( + NaiveDate::from_ymd_res(2021, 12, 23)?, + "Christmas Eve (observed)", + ), + ], + &mut map, + Country::US_AS, + "United States (American Samoa)", + ); + + 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"), + (NaiveDate::from_ymd_res(2022, 12, 24)?, "Christmas Eve"), + ( + NaiveDate::from_ymd_res(2022, 12, 23)?, + "Christmas Eve (observed)", + ), + ], + &mut map, + Country::US_AS, + "United States (American Samoa)", + ); + + 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"), + (NaiveDate::from_ymd_res(2023, 12, 24)?, "Christmas Eve"), + ( + NaiveDate::from_ymd_res(2023, 12, 22)?, + "Christmas Eve (observed)", + ), + ], + &mut map, + Country::US_AS, + "United States (American Samoa)", + ); + + 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"), + (NaiveDate::from_ymd_res(2024, 12, 24)?, "Christmas Eve"), + ], + &mut map, + Country::US_AS, + "United States (American Samoa)", + ); + + 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"), + (NaiveDate::from_ymd_res(2025, 12, 24)?, "Christmas Eve"), + ], + &mut map, + Country::US_AS, + "United States (American Samoa)", + ); + + 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"), + (NaiveDate::from_ymd_res(2026, 12, 24)?, "Christmas Eve"), + ], + &mut map, + Country::US_AS, + "United States (American Samoa)", + ); + + 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); Christmas Eve", + ), + ( + 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"), + ( + NaiveDate::from_ymd_res(2027, 12, 23)?, + "Christmas Eve (observed)", + ), + ], + &mut map, + Country::US_AS, + "United States (American Samoa)", + ); + + 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"), + (NaiveDate::from_ymd_res(2028, 12, 24)?, "Christmas Eve"), + ( + NaiveDate::from_ymd_res(2028, 12, 22)?, + "Christmas Eve (observed)", + ), + ], + &mut map, + Country::US_AS, + "United States (American Samoa)", + ); + + 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"), + (NaiveDate::from_ymd_res(2029, 12, 24)?, "Christmas Eve"), + ], + &mut map, + Country::US_AS, + "United States (American Samoa)", + ); + + 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"), + (NaiveDate::from_ymd_res(2030, 12, 24)?, "Christmas Eve"), + ], + &mut map, + Country::US_AS, + "United States (American Samoa)", + ); + + Ok(map) +} diff --git a/src/data/us_az.rs b/src/data/us_az.rs new file mode 100644 index 0000000..c1a4df6 --- /dev/null +++ b/src/data/us_az.rs @@ -0,0 +1,1006 @@ +//! United States (Arizona) +use super::*; + +/// Generate holiday map for United States (Arizona). +#[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, 2, 21)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2000, 10, 9)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2000, 1, 17)?, + "Dr. Martin Luther King Jr. / Civil Rights Day", + ), + ], + &mut map, + Country::US_AZ, + "United States (Arizona)", + ); + + 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, 2, 19)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2001, 10, 8)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2001, 1, 15)?, + "Dr. Martin Luther King Jr. / Civil Rights Day", + ), + ], + &mut map, + Country::US_AZ, + "United States (Arizona)", + ); + + 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, 2, 18)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2002, 10, 14)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2002, 1, 21)?, + "Dr. Martin Luther King Jr. / Civil Rights Day", + ), + ], + &mut map, + Country::US_AZ, + "United States (Arizona)", + ); + + 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, 2, 17)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2003, 10, 13)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2003, 1, 20)?, + "Dr. Martin Luther King Jr. / Civil Rights Day", + ), + ], + &mut map, + Country::US_AZ, + "United States (Arizona)", + ); + + 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, 2, 16)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2004, 10, 11)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2004, 1, 19)?, + "Dr. Martin Luther King Jr. / Civil Rights Day", + ), + ], + &mut map, + Country::US_AZ, + "United States (Arizona)", + ); + + 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, 2, 21)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2005, 10, 10)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2005, 1, 17)?, + "Dr. Martin Luther King Jr. / Civil Rights Day", + ), + ], + &mut map, + Country::US_AZ, + "United States (Arizona)", + ); + + 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, 2, 20)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2006, 10, 9)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2006, 1, 16)?, + "Dr. Martin Luther King Jr. / Civil Rights Day", + ), + ], + &mut map, + Country::US_AZ, + "United States (Arizona)", + ); + + 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, 2, 19)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2007, 10, 8)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2007, 1, 15)?, + "Dr. Martin Luther King Jr. / Civil Rights Day", + ), + ], + &mut map, + Country::US_AZ, + "United States (Arizona)", + ); + + 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, 2, 18)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2008, 10, 13)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2008, 1, 21)?, + "Dr. Martin Luther King Jr. / Civil Rights Day", + ), + ], + &mut map, + Country::US_AZ, + "United States (Arizona)", + ); + + 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, 2, 16)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2009, 10, 12)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2009, 1, 19)?, + "Dr. Martin Luther King Jr. / Civil Rights Day", + ), + ], + &mut map, + Country::US_AZ, + "United States (Arizona)", + ); + + 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, 2, 15)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2010, 10, 11)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2010, 1, 18)?, + "Dr. Martin Luther King Jr. / Civil Rights Day", + ), + ], + &mut map, + Country::US_AZ, + "United States (Arizona)", + ); + + 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, 2, 21)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2011, 10, 10)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2011, 1, 17)?, + "Dr. Martin Luther King Jr. / Civil Rights Day", + ), + ], + &mut map, + Country::US_AZ, + "United States (Arizona)", + ); + + 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, 2, 20)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2012, 10, 8)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2012, 1, 16)?, + "Dr. Martin Luther King Jr. / Civil Rights Day", + ), + ], + &mut map, + Country::US_AZ, + "United States (Arizona)", + ); + + 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, 2, 18)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2013, 10, 14)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2013, 1, 21)?, + "Dr. Martin Luther King Jr. / Civil Rights Day", + ), + ], + &mut map, + Country::US_AZ, + "United States (Arizona)", + ); + + 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, 2, 17)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2014, 10, 13)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2014, 1, 20)?, + "Dr. Martin Luther King Jr. / Civil Rights Day", + ), + ], + &mut map, + Country::US_AZ, + "United States (Arizona)", + ); + + 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, 2, 16)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2015, 10, 12)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2015, 1, 19)?, + "Dr. Martin Luther King Jr. / Civil Rights Day", + ), + ], + &mut map, + Country::US_AZ, + "United States (Arizona)", + ); + + 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, 2, 15)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2016, 10, 10)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2016, 1, 18)?, + "Dr. Martin Luther King Jr. / Civil Rights Day", + ), + ], + &mut map, + Country::US_AZ, + "United States (Arizona)", + ); + + 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, 2, 20)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2017, 10, 9)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2017, 1, 16)?, + "Dr. Martin Luther King Jr. / Civil Rights Day", + ), + ], + &mut map, + Country::US_AZ, + "United States (Arizona)", + ); + + 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, 2, 19)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2018, 10, 8)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2018, 1, 15)?, + "Dr. Martin Luther King Jr. / Civil Rights Day", + ), + ], + &mut map, + Country::US_AZ, + "United States (Arizona)", + ); + + 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, 2, 18)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2019, 10, 14)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2019, 1, 21)?, + "Dr. Martin Luther King Jr. / Civil Rights Day", + ), + ], + &mut map, + Country::US_AZ, + "United States (Arizona)", + ); + + 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, 2, 17)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2020, 10, 12)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2020, 1, 20)?, + "Dr. Martin Luther King Jr. / Civil Rights Day", + ), + ], + &mut map, + Country::US_AZ, + "United States (Arizona)", + ); + + 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, 2, 15)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2021, 10, 11)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2021, 1, 18)?, + "Dr. Martin Luther King Jr. / Civil Rights Day", + ), + ], + &mut map, + Country::US_AZ, + "United States (Arizona)", + ); + + 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, 2, 21)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2022, 10, 10)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2022, 1, 17)?, + "Dr. Martin Luther King Jr. / Civil Rights Day", + ), + ], + &mut map, + Country::US_AZ, + "United States (Arizona)", + ); + + 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, 2, 20)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2023, 10, 9)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2023, 1, 16)?, + "Dr. Martin Luther King Jr. / Civil Rights Day", + ), + ], + &mut map, + Country::US_AZ, + "United States (Arizona)", + ); + + 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, 2, 19)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2024, 10, 14)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2024, 1, 15)?, + "Dr. Martin Luther King Jr. / Civil Rights Day", + ), + ], + &mut map, + Country::US_AZ, + "United States (Arizona)", + ); + + 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, 2, 17)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2025, 10, 13)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2025, 1, 20)?, + "Dr. Martin Luther King Jr. / Civil Rights Day", + ), + ], + &mut map, + Country::US_AZ, + "United States (Arizona)", + ); + + 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, 2, 16)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2026, 10, 12)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2026, 1, 19)?, + "Dr. Martin Luther King Jr. / Civil Rights Day", + ), + ], + &mut map, + Country::US_AZ, + "United States (Arizona)", + ); + + 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, 2, 15)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2027, 10, 11)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2027, 1, 18)?, + "Dr. Martin Luther King Jr. / Civil Rights Day", + ), + ], + &mut map, + Country::US_AZ, + "United States (Arizona)", + ); + + 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, 2, 21)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2028, 10, 9)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2028, 1, 17)?, + "Dr. Martin Luther King Jr. / Civil Rights Day", + ), + ], + &mut map, + Country::US_AZ, + "United States (Arizona)", + ); + + 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, 2, 19)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2029, 10, 8)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2029, 1, 15)?, + "Dr. Martin Luther King Jr. / Civil Rights Day", + ), + ], + &mut map, + Country::US_AZ, + "United States (Arizona)", + ); + + 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, 2, 18)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2030, 10, 14)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2030, 1, 21)?, + "Dr. Martin Luther King Jr. / Civil Rights Day", + ), + ], + &mut map, + Country::US_AZ, + "United States (Arizona)", + ); + + Ok(map) +} diff --git a/src/data/us_ca.rs b/src/data/us_ca.rs new file mode 100644 index 0000000..4eb3d41 --- /dev/null +++ b/src/data/us_ca.rs @@ -0,0 +1,1237 @@ +//! United States (California) +use super::*; + +/// Generate holiday map for United States (California). +#[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, 2, 12)?, "Lincoln's Birthday"), + ( + NaiveDate::from_ymd_res(2000, 2, 11)?, + "Lincoln's Birthday (observed)", + ), + (NaiveDate::from_ymd_res(2000, 3, 31)?, "Cesar Chavez Day"), + (NaiveDate::from_ymd_res(2000, 10, 9)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2000, 11, 24)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_CA, + "United States (California)", + ); + + 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, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2001, 3, 31)?, "Cesar Chavez Day"), + (NaiveDate::from_ymd_res(2001, 10, 8)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2001, 11, 23)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_CA, + "United States (California)", + ); + + 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, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2002, 3, 31)?, "Cesar Chavez Day"), + ( + NaiveDate::from_ymd_res(2002, 4, 1)?, + "Cesar Chavez Day (observed)", + ), + (NaiveDate::from_ymd_res(2002, 10, 14)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2002, 11, 29)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_CA, + "United States (California)", + ); + + 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, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2003, 3, 31)?, "Cesar Chavez Day"), + (NaiveDate::from_ymd_res(2003, 10, 13)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2003, 11, 28)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_CA, + "United States (California)", + ); + + 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, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2004, 3, 31)?, "Cesar Chavez Day"), + (NaiveDate::from_ymd_res(2004, 10, 11)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2004, 11, 26)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_CA, + "United States (California)", + ); + + 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, 2, 12)?, "Lincoln's Birthday"), + ( + NaiveDate::from_ymd_res(2005, 2, 11)?, + "Lincoln's Birthday (observed)", + ), + (NaiveDate::from_ymd_res(2005, 3, 31)?, "Cesar Chavez Day"), + (NaiveDate::from_ymd_res(2005, 10, 10)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2005, 11, 25)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_CA, + "United States (California)", + ); + + 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, 2, 12)?, "Lincoln's Birthday"), + ( + NaiveDate::from_ymd_res(2006, 2, 13)?, + "Lincoln's Birthday (observed)", + ), + (NaiveDate::from_ymd_res(2006, 3, 31)?, "Cesar Chavez Day"), + (NaiveDate::from_ymd_res(2006, 10, 9)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2006, 11, 24)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_CA, + "United States (California)", + ); + + 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, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2007, 3, 31)?, "Cesar Chavez Day"), + (NaiveDate::from_ymd_res(2007, 10, 8)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2007, 11, 23)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_CA, + "United States (California)", + ); + + 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, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2008, 3, 31)?, "Cesar Chavez Day"), + (NaiveDate::from_ymd_res(2008, 10, 13)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2008, 11, 28)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_CA, + "United States (California)", + ); + + 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, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2009, 3, 31)?, "Cesar Chavez Day"), + ( + NaiveDate::from_ymd_res(2009, 11, 27)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_CA, + "United States (California)", + ); + + 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, 3, 31)?, "Cesar Chavez Day"), + ( + NaiveDate::from_ymd_res(2010, 11, 26)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_CA, + "United States (California)", + ); + + 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, 3, 31)?, "Cesar Chavez Day"), + ( + NaiveDate::from_ymd_res(2011, 11, 25)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_CA, + "United States (California)", + ); + + 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, 3, 31)?, "Cesar Chavez Day"), + ( + NaiveDate::from_ymd_res(2012, 11, 23)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_CA, + "United States (California)", + ); + + 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, 3, 31)?, "Cesar Chavez Day"), + ( + NaiveDate::from_ymd_res(2013, 4, 1)?, + "Cesar Chavez Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2013, 11, 29)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_CA, + "United States (California)", + ); + + 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, 2, 15)?, + "Susan B. Anthony Day", + ), + (NaiveDate::from_ymd_res(2014, 3, 31)?, "Cesar Chavez Day"), + ( + NaiveDate::from_ymd_res(2014, 11, 28)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_CA, + "United States (California)", + ); + + 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, 2, 15)?, + "Susan B. Anthony Day", + ), + (NaiveDate::from_ymd_res(2015, 3, 31)?, "Cesar Chavez Day"), + ( + NaiveDate::from_ymd_res(2015, 11, 27)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_CA, + "United States (California)", + ); + + 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)?, + "Susan B. Anthony Day; Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2016, 3, 31)?, "Cesar Chavez Day"), + ( + NaiveDate::from_ymd_res(2016, 11, 25)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_CA, + "United States (California)", + ); + + 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, 2, 15)?, + "Susan B. Anthony Day", + ), + (NaiveDate::from_ymd_res(2017, 3, 31)?, "Cesar Chavez Day"), + ( + NaiveDate::from_ymd_res(2017, 11, 24)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_CA, + "United States (California)", + ); + + 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, 2, 15)?, + "Susan B. Anthony Day", + ), + (NaiveDate::from_ymd_res(2018, 3, 31)?, "Cesar Chavez Day"), + ( + NaiveDate::from_ymd_res(2018, 11, 23)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_CA, + "United States (California)", + ); + + 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, 2, 15)?, + "Susan B. Anthony Day", + ), + (NaiveDate::from_ymd_res(2019, 3, 31)?, "Cesar Chavez Day"), + ( + NaiveDate::from_ymd_res(2019, 4, 1)?, + "Cesar Chavez Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2019, 11, 29)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_CA, + "United States (California)", + ); + + 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, 2, 15)?, + "Susan B. Anthony Day", + ), + (NaiveDate::from_ymd_res(2020, 3, 31)?, "Cesar Chavez Day"), + ( + NaiveDate::from_ymd_res(2020, 11, 27)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_CA, + "United States (California)", + ); + + 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)?, + "Susan B. Anthony Day; Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2021, 3, 31)?, "Cesar Chavez Day"), + ( + NaiveDate::from_ymd_res(2021, 11, 26)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_CA, + "United States (California)", + ); + + 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, 2, 15)?, + "Susan B. Anthony Day", + ), + (NaiveDate::from_ymd_res(2022, 3, 31)?, "Cesar Chavez Day"), + ( + NaiveDate::from_ymd_res(2022, 11, 25)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_CA, + "United States (California)", + ); + + 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, 2, 15)?, + "Susan B. Anthony Day", + ), + (NaiveDate::from_ymd_res(2023, 3, 31)?, "Cesar Chavez Day"), + ( + NaiveDate::from_ymd_res(2023, 11, 24)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_CA, + "United States (California)", + ); + + 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, 2, 15)?, + "Susan B. Anthony Day", + ), + (NaiveDate::from_ymd_res(2024, 3, 31)?, "Cesar Chavez Day"), + ( + NaiveDate::from_ymd_res(2024, 4, 1)?, + "Cesar Chavez Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2024, 11, 29)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_CA, + "United States (California)", + ); + + 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, 2, 15)?, + "Susan B. Anthony Day", + ), + (NaiveDate::from_ymd_res(2025, 3, 31)?, "Cesar Chavez Day"), + ( + NaiveDate::from_ymd_res(2025, 11, 28)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_CA, + "United States (California)", + ); + + 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, 2, 15)?, + "Susan B. Anthony Day", + ), + (NaiveDate::from_ymd_res(2026, 3, 31)?, "Cesar Chavez Day"), + ( + NaiveDate::from_ymd_res(2026, 11, 27)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_CA, + "United States (California)", + ); + + 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)?, + "Susan B. Anthony Day; Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2027, 3, 31)?, "Cesar Chavez Day"), + ( + NaiveDate::from_ymd_res(2027, 11, 26)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_CA, + "United States (California)", + ); + + 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, 2, 15)?, + "Susan B. Anthony Day", + ), + (NaiveDate::from_ymd_res(2028, 3, 31)?, "Cesar Chavez Day"), + ( + NaiveDate::from_ymd_res(2028, 11, 24)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_CA, + "United States (California)", + ); + + 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, 2, 15)?, + "Susan B. Anthony Day", + ), + (NaiveDate::from_ymd_res(2029, 3, 31)?, "Cesar Chavez Day"), + ( + NaiveDate::from_ymd_res(2029, 11, 23)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_CA, + "United States (California)", + ); + + 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, 2, 15)?, + "Susan B. Anthony Day", + ), + (NaiveDate::from_ymd_res(2030, 3, 31)?, "Cesar Chavez Day"), + ( + NaiveDate::from_ymd_res(2030, 4, 1)?, + "Cesar Chavez Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2030, 11, 29)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_CA, + "United States (California)", + ); + + Ok(map) +} diff --git a/src/data/us_co.rs b/src/data/us_co.rs new file mode 100644 index 0000000..67062b0 --- /dev/null +++ b/src/data/us_co.rs @@ -0,0 +1,1005 @@ +//! United States (Colorado) +use super::*; + +/// Generate holiday map for United States (Colorado). +#[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", + ), + ], + &mut map, + Country::US_CO, + "United States (Colorado)", + ); + + 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, 3, 31)?, "Cesar Chavez Day"), + ], + &mut map, + Country::US_CO, + "United States (Colorado)", + ); + + 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, 3, 31)?, "Cesar Chavez Day"), + ], + &mut map, + Country::US_CO, + "United States (Colorado)", + ); + + 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, 3, 31)?, "Cesar Chavez Day"), + ], + &mut map, + Country::US_CO, + "United States (Colorado)", + ); + + 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, 3, 31)?, "Cesar Chavez Day"), + ], + &mut map, + Country::US_CO, + "United States (Colorado)", + ); + + 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, 3, 31)?, "Cesar Chavez Day"), + ], + &mut map, + Country::US_CO, + "United States (Colorado)", + ); + + 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, 3, 31)?, "Cesar Chavez Day"), + ], + &mut map, + Country::US_CO, + "United States (Colorado)", + ); + + 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, 3, 31)?, "Cesar Chavez Day"), + ], + &mut map, + Country::US_CO, + "United States (Colorado)", + ); + + 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, 3, 31)?, "Cesar Chavez Day"), + ], + &mut map, + Country::US_CO, + "United States (Colorado)", + ); + + 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, 3, 31)?, "Cesar Chavez Day"), + ], + &mut map, + Country::US_CO, + "United States (Colorado)", + ); + + 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, 3, 31)?, "Cesar Chavez Day"), + ], + &mut map, + Country::US_CO, + "United States (Colorado)", + ); + + 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, 3, 31)?, "Cesar Chavez Day"), + ], + &mut map, + Country::US_CO, + "United States (Colorado)", + ); + + 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, 3, 31)?, "Cesar Chavez Day"), + ], + &mut map, + Country::US_CO, + "United States (Colorado)", + ); + + 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, 3, 31)?, "Cesar Chavez Day"), + ], + &mut map, + Country::US_CO, + "United States (Colorado)", + ); + + 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, 3, 31)?, "Cesar Chavez Day"), + ], + &mut map, + Country::US_CO, + "United States (Colorado)", + ); + + 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, 3, 31)?, "Cesar Chavez Day"), + ], + &mut map, + Country::US_CO, + "United States (Colorado)", + ); + + 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, 3, 31)?, "Cesar Chavez Day"), + ], + &mut map, + Country::US_CO, + "United States (Colorado)", + ); + + 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, 3, 31)?, "Cesar Chavez Day"), + ], + &mut map, + Country::US_CO, + "United States (Colorado)", + ); + + 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, 3, 31)?, "Cesar Chavez Day"), + ], + &mut map, + Country::US_CO, + "United States (Colorado)", + ); + + 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, 3, 31)?, "Cesar Chavez Day"), + ], + &mut map, + Country::US_CO, + "United States (Colorado)", + ); + + 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, 3, 31)?, "Cesar Chavez Day"), + ], + &mut map, + Country::US_CO, + "United States (Colorado)", + ); + + 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, 3, 31)?, "Cesar Chavez Day"), + ], + &mut map, + Country::US_CO, + "United States (Colorado)", + ); + + 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, 3, 31)?, "Cesar Chavez Day"), + ], + &mut map, + Country::US_CO, + "United States (Colorado)", + ); + + 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, 3, 31)?, "Cesar Chavez Day"), + ], + &mut map, + Country::US_CO, + "United States (Colorado)", + ); + + 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, 3, 31)?, "Cesar Chavez Day"), + ], + &mut map, + Country::US_CO, + "United States (Colorado)", + ); + + 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, 3, 31)?, "Cesar Chavez Day"), + ], + &mut map, + Country::US_CO, + "United States (Colorado)", + ); + + 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, 3, 31)?, "Cesar Chavez Day"), + ], + &mut map, + Country::US_CO, + "United States (Colorado)", + ); + + 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, 3, 31)?, "Cesar Chavez Day"), + ], + &mut map, + Country::US_CO, + "United States (Colorado)", + ); + + 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, 3, 31)?, "Cesar Chavez Day"), + ], + &mut map, + Country::US_CO, + "United States (Colorado)", + ); + + 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, 3, 31)?, "Cesar Chavez Day"), + ], + &mut map, + Country::US_CO, + "United States (Colorado)", + ); + + 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, 3, 31)?, "Cesar Chavez Day"), + ], + &mut map, + Country::US_CO, + "United States (Colorado)", + ); + + Ok(map) +} diff --git a/src/data/us_ct.rs b/src/data/us_ct.rs new file mode 100644 index 0000000..5e95ce7 --- /dev/null +++ b/src/data/us_ct.rs @@ -0,0 +1,1104 @@ +//! United States (Connecticut) +use super::*; + +/// Generate holiday map for United States (Connecticut). +#[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"), + (NaiveDate::from_ymd_res(2000, 2, 12)?, "Lincoln's Birthday"), + ( + NaiveDate::from_ymd_res(2000, 2, 11)?, + "Lincoln's Birthday (observed)", + ), + (NaiveDate::from_ymd_res(2000, 4, 21)?, "Good Friday"), + ], + &mut map, + Country::US_CT, + "United States (Connecticut)", + ); + + 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"), + (NaiveDate::from_ymd_res(2001, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2001, 4, 13)?, "Good Friday"), + ], + &mut map, + Country::US_CT, + "United States (Connecticut)", + ); + + 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"), + (NaiveDate::from_ymd_res(2002, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2002, 3, 29)?, "Good Friday"), + ], + &mut map, + Country::US_CT, + "United States (Connecticut)", + ); + + 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"), + (NaiveDate::from_ymd_res(2003, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2003, 4, 18)?, "Good Friday"), + ], + &mut map, + Country::US_CT, + "United States (Connecticut)", + ); + + 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"), + (NaiveDate::from_ymd_res(2004, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2004, 4, 9)?, "Good Friday"), + ], + &mut map, + Country::US_CT, + "United States (Connecticut)", + ); + + 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"), + (NaiveDate::from_ymd_res(2005, 2, 12)?, "Lincoln's Birthday"), + ( + NaiveDate::from_ymd_res(2005, 2, 11)?, + "Lincoln's Birthday (observed)", + ), + (NaiveDate::from_ymd_res(2005, 3, 25)?, "Good Friday"), + ], + &mut map, + Country::US_CT, + "United States (Connecticut)", + ); + + 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"), + (NaiveDate::from_ymd_res(2006, 2, 12)?, "Lincoln's Birthday"), + ( + NaiveDate::from_ymd_res(2006, 2, 13)?, + "Lincoln's Birthday (observed)", + ), + (NaiveDate::from_ymd_res(2006, 4, 14)?, "Good Friday"), + ], + &mut map, + Country::US_CT, + "United States (Connecticut)", + ); + + 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"), + (NaiveDate::from_ymd_res(2007, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2007, 4, 6)?, "Good Friday"), + ], + &mut map, + Country::US_CT, + "United States (Connecticut)", + ); + + 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"), + (NaiveDate::from_ymd_res(2008, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2008, 3, 21)?, "Good Friday"), + ], + &mut map, + Country::US_CT, + "United States (Connecticut)", + ); + + 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"), + (NaiveDate::from_ymd_res(2009, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2009, 4, 10)?, "Good Friday"), + ], + &mut map, + Country::US_CT, + "United States (Connecticut)", + ); + + 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"), + (NaiveDate::from_ymd_res(2010, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2010, 4, 2)?, "Good Friday"), + ], + &mut map, + Country::US_CT, + "United States (Connecticut)", + ); + + 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"), + (NaiveDate::from_ymd_res(2011, 2, 12)?, "Lincoln's Birthday"), + ( + NaiveDate::from_ymd_res(2011, 2, 11)?, + "Lincoln's Birthday (observed)", + ), + (NaiveDate::from_ymd_res(2011, 4, 22)?, "Good Friday"), + ], + &mut map, + Country::US_CT, + "United States (Connecticut)", + ); + + 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"), + (NaiveDate::from_ymd_res(2012, 2, 12)?, "Lincoln's Birthday"), + ( + NaiveDate::from_ymd_res(2012, 2, 13)?, + "Lincoln's Birthday (observed)", + ), + (NaiveDate::from_ymd_res(2012, 4, 6)?, "Good Friday"), + ], + &mut map, + Country::US_CT, + "United States (Connecticut)", + ); + + 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"), + (NaiveDate::from_ymd_res(2013, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2013, 3, 29)?, "Good Friday"), + ], + &mut map, + Country::US_CT, + "United States (Connecticut)", + ); + + 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"), + (NaiveDate::from_ymd_res(2014, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2014, 4, 18)?, "Good Friday"), + ], + &mut map, + Country::US_CT, + "United States (Connecticut)", + ); + + 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"), + (NaiveDate::from_ymd_res(2015, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2015, 4, 3)?, "Good Friday"), + ], + &mut map, + Country::US_CT, + "United States (Connecticut)", + ); + + 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"), + (NaiveDate::from_ymd_res(2016, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2016, 3, 25)?, "Good Friday"), + ], + &mut map, + Country::US_CT, + "United States (Connecticut)", + ); + + 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"), + (NaiveDate::from_ymd_res(2017, 2, 12)?, "Lincoln's Birthday"), + ( + NaiveDate::from_ymd_res(2017, 2, 13)?, + "Lincoln's Birthday (observed)", + ), + (NaiveDate::from_ymd_res(2017, 4, 14)?, "Good Friday"), + ], + &mut map, + Country::US_CT, + "United States (Connecticut)", + ); + + 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"), + (NaiveDate::from_ymd_res(2018, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2018, 3, 30)?, "Good Friday"), + ], + &mut map, + Country::US_CT, + "United States (Connecticut)", + ); + + 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"), + (NaiveDate::from_ymd_res(2019, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2019, 4, 19)?, "Good Friday"), + ], + &mut map, + Country::US_CT, + "United States (Connecticut)", + ); + + 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"), + (NaiveDate::from_ymd_res(2020, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2020, 4, 10)?, "Good Friday"), + ], + &mut map, + Country::US_CT, + "United States (Connecticut)", + ); + + 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"), + (NaiveDate::from_ymd_res(2021, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2021, 4, 2)?, "Good Friday"), + ], + &mut map, + Country::US_CT, + "United States (Connecticut)", + ); + + 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"), + (NaiveDate::from_ymd_res(2022, 2, 12)?, "Lincoln's Birthday"), + ( + NaiveDate::from_ymd_res(2022, 2, 11)?, + "Lincoln's Birthday (observed)", + ), + (NaiveDate::from_ymd_res(2022, 4, 15)?, "Good Friday"), + ], + &mut map, + Country::US_CT, + "United States (Connecticut)", + ); + + 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"), + (NaiveDate::from_ymd_res(2023, 2, 12)?, "Lincoln's Birthday"), + ( + NaiveDate::from_ymd_res(2023, 2, 13)?, + "Lincoln's Birthday (observed)", + ), + (NaiveDate::from_ymd_res(2023, 4, 7)?, "Good Friday"), + ], + &mut map, + Country::US_CT, + "United States (Connecticut)", + ); + + 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"), + (NaiveDate::from_ymd_res(2024, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2024, 3, 29)?, "Good Friday"), + ], + &mut map, + Country::US_CT, + "United States (Connecticut)", + ); + + 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"), + (NaiveDate::from_ymd_res(2025, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2025, 4, 18)?, "Good Friday"), + ], + &mut map, + Country::US_CT, + "United States (Connecticut)", + ); + + 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"), + (NaiveDate::from_ymd_res(2026, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2026, 4, 3)?, "Good Friday"), + ], + &mut map, + Country::US_CT, + "United States (Connecticut)", + ); + + 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"), + (NaiveDate::from_ymd_res(2027, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2027, 3, 26)?, "Good Friday"), + ], + &mut map, + Country::US_CT, + "United States (Connecticut)", + ); + + 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"), + (NaiveDate::from_ymd_res(2028, 2, 12)?, "Lincoln's Birthday"), + ( + NaiveDate::from_ymd_res(2028, 2, 11)?, + "Lincoln's Birthday (observed)", + ), + (NaiveDate::from_ymd_res(2028, 4, 14)?, "Good Friday"), + ], + &mut map, + Country::US_CT, + "United States (Connecticut)", + ); + + 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"), + (NaiveDate::from_ymd_res(2029, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2029, 3, 30)?, "Good Friday"), + ], + &mut map, + Country::US_CT, + "United States (Connecticut)", + ); + + 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"), + (NaiveDate::from_ymd_res(2030, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2030, 4, 19)?, "Good Friday"), + ], + &mut map, + Country::US_CT, + "United States (Connecticut)", + ); + + Ok(map) +} diff --git a/src/data/us_dc.rs b/src/data/us_dc.rs new file mode 100644 index 0000000..0377e4e --- /dev/null +++ b/src/data/us_dc.rs @@ -0,0 +1,1107 @@ +//! United States (District of Columbia) +use super::*; + +/// Generate holiday map for United States (District of Columbia). +#[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_DC, + "United States (District of Columbia)", + ); + + 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, 1, 20)?, "Inauguration Day"), + (NaiveDate::from_ymd_res(2001, 10, 8)?, "Columbus Day"), + ], + &mut map, + Country::US_DC, + "United States (District of Columbia)", + ); + + 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_DC, + "United States (District of Columbia)", + ); + + 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_DC, + "United States (District of Columbia)", + ); + + 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_DC, + "United States (District of Columbia)", + ); + + 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, 1, 20)?, "Inauguration Day"), + (NaiveDate::from_ymd_res(2005, 4, 16)?, "Emancipation Day"), + ( + NaiveDate::from_ymd_res(2005, 4, 15)?, + "Emancipation Day (observed)", + ), + (NaiveDate::from_ymd_res(2005, 10, 10)?, "Columbus Day"), + ], + &mut map, + Country::US_DC, + "United States (District of Columbia)", + ); + + 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, 4, 16)?, "Emancipation Day"), + ( + NaiveDate::from_ymd_res(2006, 4, 17)?, + "Emancipation Day (observed)", + ), + (NaiveDate::from_ymd_res(2006, 10, 9)?, "Columbus Day"), + ], + &mut map, + Country::US_DC, + "United States (District of Columbia)", + ); + + 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, 4, 16)?, "Emancipation Day"), + (NaiveDate::from_ymd_res(2007, 10, 8)?, "Columbus Day"), + ], + &mut map, + Country::US_DC, + "United States (District of Columbia)", + ); + + 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, 4, 16)?, "Emancipation Day"), + (NaiveDate::from_ymd_res(2008, 10, 13)?, "Columbus Day"), + ], + &mut map, + Country::US_DC, + "United States (District of Columbia)", + ); + + 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, 1, 20)?, "Inauguration Day"), + (NaiveDate::from_ymd_res(2009, 4, 16)?, "Emancipation Day"), + (NaiveDate::from_ymd_res(2009, 10, 12)?, "Columbus Day"), + ], + &mut map, + Country::US_DC, + "United States (District of Columbia)", + ); + + 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, 4, 16)?, "Emancipation Day"), + (NaiveDate::from_ymd_res(2010, 10, 11)?, "Columbus Day"), + ], + &mut map, + Country::US_DC, + "United States (District of Columbia)", + ); + + 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, 4, 16)?, "Emancipation Day"), + ( + NaiveDate::from_ymd_res(2011, 4, 15)?, + "Emancipation Day (observed)", + ), + (NaiveDate::from_ymd_res(2011, 10, 10)?, "Columbus Day"), + ], + &mut map, + Country::US_DC, + "United States (District of Columbia)", + ); + + 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, 4, 16)?, "Emancipation Day"), + (NaiveDate::from_ymd_res(2012, 10, 8)?, "Columbus Day"), + ], + &mut map, + Country::US_DC, + "United States (District of Columbia)", + ); + + 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)?, + "Inauguration Day (observed); Martin Luther King Jr. Day", + ), + ( + NaiveDate::from_ymd_res(2013, 2, 18)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2013, 1, 20)?, "Inauguration Day"), + (NaiveDate::from_ymd_res(2013, 4, 16)?, "Emancipation Day"), + (NaiveDate::from_ymd_res(2013, 10, 14)?, "Columbus Day"), + ], + &mut map, + Country::US_DC, + "United States (District of Columbia)", + ); + + 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, 4, 16)?, "Emancipation Day"), + (NaiveDate::from_ymd_res(2014, 10, 13)?, "Columbus Day"), + ], + &mut map, + Country::US_DC, + "United States (District of Columbia)", + ); + + 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, 4, 16)?, "Emancipation Day"), + (NaiveDate::from_ymd_res(2015, 10, 12)?, "Columbus Day"), + ], + &mut map, + Country::US_DC, + "United States (District of Columbia)", + ); + + 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, 4, 16)?, "Emancipation Day"), + ( + NaiveDate::from_ymd_res(2016, 4, 15)?, + "Emancipation Day (observed)", + ), + (NaiveDate::from_ymd_res(2016, 10, 10)?, "Columbus Day"), + ], + &mut map, + Country::US_DC, + "United States (District of Columbia)", + ); + + 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, 1, 20)?, "Inauguration Day"), + (NaiveDate::from_ymd_res(2017, 4, 16)?, "Emancipation Day"), + ( + NaiveDate::from_ymd_res(2017, 4, 17)?, + "Emancipation Day (observed)", + ), + (NaiveDate::from_ymd_res(2017, 10, 9)?, "Columbus Day"), + ], + &mut map, + Country::US_DC, + "United States (District of Columbia)", + ); + + 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, 4, 16)?, "Emancipation Day"), + (NaiveDate::from_ymd_res(2018, 10, 8)?, "Columbus Day"), + ], + &mut map, + Country::US_DC, + "United States (District of Columbia)", + ); + + 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, 4, 16)?, "Emancipation Day"), + ( + NaiveDate::from_ymd_res(2019, 10, 14)?, + "Indigenous Peoples' Day", + ), + ], + &mut map, + Country::US_DC, + "United States (District of Columbia)", + ); + + 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, 4, 16)?, "Emancipation Day"), + ( + NaiveDate::from_ymd_res(2020, 10, 12)?, + "Indigenous Peoples' Day", + ), + ], + &mut map, + Country::US_DC, + "United States (District of Columbia)", + ); + + 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, 1, 20)?, "Inauguration Day"), + (NaiveDate::from_ymd_res(2021, 4, 16)?, "Emancipation Day"), + ( + NaiveDate::from_ymd_res(2021, 10, 11)?, + "Indigenous Peoples' Day", + ), + ], + &mut map, + Country::US_DC, + "United States (District of Columbia)", + ); + + 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, 4, 16)?, "Emancipation Day"), + ( + NaiveDate::from_ymd_res(2022, 4, 15)?, + "Emancipation Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2022, 10, 10)?, + "Indigenous Peoples' Day", + ), + ], + &mut map, + Country::US_DC, + "United States (District of Columbia)", + ); + + 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, 4, 16)?, "Emancipation Day"), + ( + NaiveDate::from_ymd_res(2023, 4, 17)?, + "Emancipation Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2023, 10, 9)?, + "Indigenous Peoples' Day", + ), + ], + &mut map, + Country::US_DC, + "United States (District of Columbia)", + ); + + 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, 4, 16)?, "Emancipation Day"), + ( + NaiveDate::from_ymd_res(2024, 10, 14)?, + "Indigenous Peoples' Day", + ), + ], + &mut map, + Country::US_DC, + "United States (District of Columbia)", + ); + + 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)?, + "Inauguration Day; Martin Luther King Jr. Day", + ), + ( + NaiveDate::from_ymd_res(2025, 2, 17)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2025, 4, 16)?, "Emancipation Day"), + ( + NaiveDate::from_ymd_res(2025, 10, 13)?, + "Indigenous Peoples' Day", + ), + ], + &mut map, + Country::US_DC, + "United States (District of Columbia)", + ); + + 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, 4, 16)?, "Emancipation Day"), + ( + NaiveDate::from_ymd_res(2026, 10, 12)?, + "Indigenous Peoples' Day", + ), + ], + &mut map, + Country::US_DC, + "United States (District of Columbia)", + ); + + 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, 4, 16)?, "Emancipation Day"), + ( + NaiveDate::from_ymd_res(2027, 10, 11)?, + "Indigenous Peoples' Day", + ), + ], + &mut map, + Country::US_DC, + "United States (District of Columbia)", + ); + + 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, 4, 16)?, "Emancipation Day"), + ( + NaiveDate::from_ymd_res(2028, 4, 17)?, + "Emancipation Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2028, 10, 9)?, + "Indigenous Peoples' Day", + ), + ], + &mut map, + Country::US_DC, + "United States (District of Columbia)", + ); + + 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, 1, 20)?, "Inauguration Day"), + (NaiveDate::from_ymd_res(2029, 4, 16)?, "Emancipation Day"), + ( + NaiveDate::from_ymd_res(2029, 10, 8)?, + "Indigenous Peoples' Day", + ), + ], + &mut map, + Country::US_DC, + "United States (District of Columbia)", + ); + + 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, 4, 16)?, "Emancipation Day"), + ( + NaiveDate::from_ymd_res(2030, 10, 14)?, + "Indigenous Peoples' Day", + ), + ], + &mut map, + Country::US_DC, + "United States (District of Columbia)", + ); + + Ok(map) +} diff --git a/src/data/us_de.rs b/src/data/us_de.rs new file mode 100644 index 0000000..56151cc --- /dev/null +++ b/src/data/us_de.rs @@ -0,0 +1,1018 @@ +//! United States (Delaware) +use super::*; + +/// Generate holiday map for United States (Delaware). +#[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, 4, 21)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2000, 11, 24)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_DE, + "United States (Delaware)", + ); + + 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, 4, 13)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2001, 11, 23)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_DE, + "United States (Delaware)", + ); + + 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, 3, 29)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2002, 11, 29)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_DE, + "United States (Delaware)", + ); + + 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, 4, 18)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2003, 11, 28)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_DE, + "United States (Delaware)", + ); + + 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, 4, 9)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2004, 11, 26)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_DE, + "United States (Delaware)", + ); + + 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, 3, 25)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2005, 11, 25)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_DE, + "United States (Delaware)", + ); + + 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, 4, 14)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2006, 11, 24)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_DE, + "United States (Delaware)", + ); + + 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, 4, 6)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2007, 11, 23)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_DE, + "United States (Delaware)", + ); + + 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, 3, 21)?, "Good Friday"), + (NaiveDate::from_ymd_res(2008, 11, 4)?, "Election Day"), + ( + NaiveDate::from_ymd_res(2008, 11, 28)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_DE, + "United States (Delaware)", + ); + + 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, 4, 10)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2009, 11, 27)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_DE, + "United States (Delaware)", + ); + + 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, 4, 2)?, "Good Friday"), + (NaiveDate::from_ymd_res(2010, 11, 2)?, "Election Day"), + ( + NaiveDate::from_ymd_res(2010, 11, 26)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_DE, + "United States (Delaware)", + ); + + 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, 4, 22)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2011, 11, 25)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_DE, + "United States (Delaware)", + ); + + 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, 4, 6)?, "Good Friday"), + (NaiveDate::from_ymd_res(2012, 11, 6)?, "Election Day"), + ( + NaiveDate::from_ymd_res(2012, 11, 23)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_DE, + "United States (Delaware)", + ); + + 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, 3, 29)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2013, 11, 29)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_DE, + "United States (Delaware)", + ); + + 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, 4, 18)?, "Good Friday"), + (NaiveDate::from_ymd_res(2014, 11, 4)?, "Election Day"), + ( + NaiveDate::from_ymd_res(2014, 11, 28)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_DE, + "United States (Delaware)", + ); + + 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, 4, 3)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2015, 11, 27)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_DE, + "United States (Delaware)", + ); + + 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, 3, 25)?, "Good Friday"), + (NaiveDate::from_ymd_res(2016, 11, 8)?, "Election Day"), + ( + NaiveDate::from_ymd_res(2016, 11, 25)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_DE, + "United States (Delaware)", + ); + + 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, 4, 14)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2017, 11, 24)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_DE, + "United States (Delaware)", + ); + + 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, 3, 30)?, "Good Friday"), + (NaiveDate::from_ymd_res(2018, 11, 6)?, "Election Day"), + ( + NaiveDate::from_ymd_res(2018, 11, 23)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_DE, + "United States (Delaware)", + ); + + 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, 4, 19)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2019, 11, 29)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_DE, + "United States (Delaware)", + ); + + 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, 4, 10)?, "Good Friday"), + (NaiveDate::from_ymd_res(2020, 11, 3)?, "Election Day"), + ( + NaiveDate::from_ymd_res(2020, 11, 27)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_DE, + "United States (Delaware)", + ); + + 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, 4, 2)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2021, 11, 26)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_DE, + "United States (Delaware)", + ); + + 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, 4, 15)?, "Good Friday"), + (NaiveDate::from_ymd_res(2022, 11, 8)?, "Election Day"), + ( + NaiveDate::from_ymd_res(2022, 11, 25)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_DE, + "United States (Delaware)", + ); + + 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, 4, 7)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2023, 11, 24)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_DE, + "United States (Delaware)", + ); + + 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, 3, 29)?, "Good Friday"), + (NaiveDate::from_ymd_res(2024, 11, 5)?, "Election Day"), + ( + NaiveDate::from_ymd_res(2024, 11, 29)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_DE, + "United States (Delaware)", + ); + + 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, 4, 18)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2025, 11, 28)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_DE, + "United States (Delaware)", + ); + + 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, 4, 3)?, "Good Friday"), + (NaiveDate::from_ymd_res(2026, 11, 3)?, "Election Day"), + ( + NaiveDate::from_ymd_res(2026, 11, 27)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_DE, + "United States (Delaware)", + ); + + 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, 3, 26)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2027, 11, 26)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_DE, + "United States (Delaware)", + ); + + 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, 4, 14)?, "Good Friday"), + (NaiveDate::from_ymd_res(2028, 11, 7)?, "Election Day"), + ( + NaiveDate::from_ymd_res(2028, 11, 24)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_DE, + "United States (Delaware)", + ); + + 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, 3, 30)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2029, 11, 23)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_DE, + "United States (Delaware)", + ); + + 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, 4, 19)?, "Good Friday"), + (NaiveDate::from_ymd_res(2030, 11, 5)?, "Election Day"), + ( + NaiveDate::from_ymd_res(2030, 11, 29)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_DE, + "United States (Delaware)", + ); + + Ok(map) +} diff --git a/src/data/us_fl.rs b/src/data/us_fl.rs new file mode 100644 index 0000000..64f5391 --- /dev/null +++ b/src/data/us_fl.rs @@ -0,0 +1,1055 @@ +//! United States (Florida) +use super::*; + +/// Generate holiday map for United States (Florida). +#[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, 11, 24)?, + "Friday After Thanksgiving", + ), + ], + &mut map, + Country::US_FL, + "United States (Florida)", + ); + + 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, 11, 23)?, + "Friday After Thanksgiving", + ), + ], + &mut map, + Country::US_FL, + "United States (Florida)", + ); + + 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, 11, 29)?, + "Friday After Thanksgiving", + ), + ], + &mut map, + Country::US_FL, + "United States (Florida)", + ); + + 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, 11, 28)?, + "Friday After Thanksgiving", + ), + ], + &mut map, + Country::US_FL, + "United States (Florida)", + ); + + 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, 11, 26)?, + "Friday After Thanksgiving", + ), + ], + &mut map, + Country::US_FL, + "United States (Florida)", + ); + + 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, 11, 25)?, + "Friday After Thanksgiving", + ), + ], + &mut map, + Country::US_FL, + "United States (Florida)", + ); + + 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, 11, 24)?, + "Friday After Thanksgiving", + ), + ], + &mut map, + Country::US_FL, + "United States (Florida)", + ); + + 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, 11, 23)?, + "Friday After Thanksgiving", + ), + ], + &mut map, + Country::US_FL, + "United States (Florida)", + ); + + 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, 11, 28)?, + "Friday After Thanksgiving", + ), + ], + &mut map, + Country::US_FL, + "United States (Florida)", + ); + + 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, 11, 27)?, + "Friday After Thanksgiving", + ), + ], + &mut map, + Country::US_FL, + "United States (Florida)", + ); + + 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, 11, 26)?, + "Friday After Thanksgiving", + ), + ], + &mut map, + Country::US_FL, + "United States (Florida)", + ); + + 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, 15)?, + "Susan B. Anthony Day", + ), + ( + NaiveDate::from_ymd_res(2011, 11, 25)?, + "Friday After Thanksgiving", + ), + ], + &mut map, + Country::US_FL, + "United States (Florida)", + ); + + 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, 15)?, + "Susan B. Anthony Day", + ), + ( + NaiveDate::from_ymd_res(2012, 11, 23)?, + "Friday After Thanksgiving", + ), + ], + &mut map, + Country::US_FL, + "United States (Florida)", + ); + + 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, 15)?, + "Susan B. Anthony Day", + ), + ( + NaiveDate::from_ymd_res(2013, 11, 29)?, + "Friday After Thanksgiving", + ), + ], + &mut map, + Country::US_FL, + "United States (Florida)", + ); + + 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, 15)?, + "Susan B. Anthony Day", + ), + ( + NaiveDate::from_ymd_res(2014, 11, 28)?, + "Friday After Thanksgiving", + ), + ], + &mut map, + Country::US_FL, + "United States (Florida)", + ); + + 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, 15)?, + "Susan B. Anthony Day", + ), + ( + NaiveDate::from_ymd_res(2015, 11, 27)?, + "Friday After Thanksgiving", + ), + ], + &mut map, + Country::US_FL, + "United States (Florida)", + ); + + 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)?, + "Susan B. Anthony Day", + ), + ( + NaiveDate::from_ymd_res(2016, 11, 25)?, + "Friday After Thanksgiving", + ), + ], + &mut map, + Country::US_FL, + "United States (Florida)", + ); + + 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, 15)?, + "Susan B. Anthony Day", + ), + ( + NaiveDate::from_ymd_res(2017, 11, 24)?, + "Friday After Thanksgiving", + ), + ], + &mut map, + Country::US_FL, + "United States (Florida)", + ); + + 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, 15)?, + "Susan B. Anthony Day", + ), + ( + NaiveDate::from_ymd_res(2018, 11, 23)?, + "Friday After Thanksgiving", + ), + ], + &mut map, + Country::US_FL, + "United States (Florida)", + ); + + 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, 15)?, + "Susan B. Anthony Day", + ), + ( + NaiveDate::from_ymd_res(2019, 11, 29)?, + "Friday After Thanksgiving", + ), + ], + &mut map, + Country::US_FL, + "United States (Florida)", + ); + + 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, 15)?, + "Susan B. Anthony Day", + ), + ( + NaiveDate::from_ymd_res(2020, 11, 27)?, + "Friday After Thanksgiving", + ), + ], + &mut map, + Country::US_FL, + "United States (Florida)", + ); + + 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)?, + "Susan B. Anthony Day", + ), + ( + NaiveDate::from_ymd_res(2021, 11, 26)?, + "Friday After Thanksgiving", + ), + ], + &mut map, + Country::US_FL, + "United States (Florida)", + ); + + 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, 15)?, + "Susan B. Anthony Day", + ), + ( + NaiveDate::from_ymd_res(2022, 11, 25)?, + "Friday After Thanksgiving", + ), + ], + &mut map, + Country::US_FL, + "United States (Florida)", + ); + + 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, 15)?, + "Susan B. Anthony Day", + ), + ( + NaiveDate::from_ymd_res(2023, 11, 24)?, + "Friday After Thanksgiving", + ), + ], + &mut map, + Country::US_FL, + "United States (Florida)", + ); + + 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, 15)?, + "Susan B. Anthony Day", + ), + ( + NaiveDate::from_ymd_res(2024, 11, 29)?, + "Friday After Thanksgiving", + ), + ], + &mut map, + Country::US_FL, + "United States (Florida)", + ); + + 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, 15)?, + "Susan B. Anthony Day", + ), + ( + NaiveDate::from_ymd_res(2025, 11, 28)?, + "Friday After Thanksgiving", + ), + ], + &mut map, + Country::US_FL, + "United States (Florida)", + ); + + 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, 15)?, + "Susan B. Anthony Day", + ), + ( + NaiveDate::from_ymd_res(2026, 11, 27)?, + "Friday After Thanksgiving", + ), + ], + &mut map, + Country::US_FL, + "United States (Florida)", + ); + + 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)?, + "Susan B. Anthony Day", + ), + ( + NaiveDate::from_ymd_res(2027, 11, 26)?, + "Friday After Thanksgiving", + ), + ], + &mut map, + Country::US_FL, + "United States (Florida)", + ); + + 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, 15)?, + "Susan B. Anthony Day", + ), + ( + NaiveDate::from_ymd_res(2028, 11, 24)?, + "Friday After Thanksgiving", + ), + ], + &mut map, + Country::US_FL, + "United States (Florida)", + ); + + 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, 15)?, + "Susan B. Anthony Day", + ), + ( + NaiveDate::from_ymd_res(2029, 11, 23)?, + "Friday After Thanksgiving", + ), + ], + &mut map, + Country::US_FL, + "United States (Florida)", + ); + + 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, 15)?, + "Susan B. Anthony Day", + ), + ( + NaiveDate::from_ymd_res(2030, 11, 29)?, + "Friday After Thanksgiving", + ), + ], + &mut map, + Country::US_FL, + "United States (Florida)", + ); + + Ok(map) +} diff --git a/src/data/us_ga.rs b/src/data/us_ga.rs new file mode 100644 index 0000000..85a5c50 --- /dev/null +++ b/src/data/us_ga.rs @@ -0,0 +1,1148 @@ +//! United States (Georgia) +use super::*; + +/// Generate holiday map for United States (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)?, "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, 10, 9)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2000, 1, 17)?, + "Robert E. Lee's Birthday", + ), + ( + NaiveDate::from_ymd_res(2000, 4, 24)?, + "Confederate Memorial Day", + ), + ( + NaiveDate::from_ymd_res(2000, 11, 24)?, + "Robert E. Lee's Birthday", + ), + ( + NaiveDate::from_ymd_res(2000, 12, 24)?, + "Washington's Birthday", + ), + ], + &mut map, + Country::US_GA, + "United States (Georgia)", + ); + + 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, 10, 8)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2001, 1, 15)?, + "Robert E. Lee's Birthday", + ), + ( + NaiveDate::from_ymd_res(2001, 4, 23)?, + "Confederate Memorial Day", + ), + ( + NaiveDate::from_ymd_res(2001, 11, 23)?, + "Robert E. Lee's Birthday", + ), + ( + NaiveDate::from_ymd_res(2001, 12, 24)?, + "Washington's Birthday", + ), + ], + &mut map, + Country::US_GA, + "United States (Georgia)", + ); + + 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, 10, 14)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2002, 1, 21)?, + "Robert E. Lee's Birthday", + ), + ( + NaiveDate::from_ymd_res(2002, 4, 22)?, + "Confederate Memorial Day", + ), + ( + NaiveDate::from_ymd_res(2002, 11, 29)?, + "Robert E. Lee's Birthday", + ), + ( + NaiveDate::from_ymd_res(2002, 12, 24)?, + "Washington's Birthday", + ), + ], + &mut map, + Country::US_GA, + "United States (Georgia)", + ); + + 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, 10, 13)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2003, 1, 20)?, + "Robert E. Lee's Birthday", + ), + ( + NaiveDate::from_ymd_res(2003, 4, 28)?, + "Confederate Memorial Day", + ), + ( + NaiveDate::from_ymd_res(2003, 11, 28)?, + "Robert E. Lee's Birthday", + ), + ( + NaiveDate::from_ymd_res(2003, 12, 26)?, + "Washington's Birthday", + ), + ], + &mut map, + Country::US_GA, + "United States (Georgia)", + ); + + 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); Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2004, 10, 11)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2004, 1, 19)?, + "Robert E. Lee's Birthday", + ), + ( + NaiveDate::from_ymd_res(2004, 4, 26)?, + "Confederate Memorial Day", + ), + ( + NaiveDate::from_ymd_res(2004, 11, 26)?, + "Robert E. Lee's Birthday", + ), + ], + &mut map, + Country::US_GA, + "United States (Georgia)", + ); + + 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, 10, 10)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2005, 1, 17)?, + "Robert E. Lee's Birthday", + ), + ( + NaiveDate::from_ymd_res(2005, 4, 25)?, + "Confederate Memorial Day", + ), + ( + NaiveDate::from_ymd_res(2005, 11, 25)?, + "Robert E. Lee's Birthday", + ), + ( + NaiveDate::from_ymd_res(2005, 12, 24)?, + "Washington's Birthday", + ), + ], + &mut map, + Country::US_GA, + "United States (Georgia)", + ); + + 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, 10, 9)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2006, 1, 16)?, + "Robert E. Lee's Birthday", + ), + ( + NaiveDate::from_ymd_res(2006, 4, 24)?, + "Confederate Memorial Day", + ), + ( + NaiveDate::from_ymd_res(2006, 11, 24)?, + "Robert E. Lee's Birthday", + ), + ( + NaiveDate::from_ymd_res(2006, 12, 24)?, + "Washington's Birthday", + ), + ], + &mut map, + Country::US_GA, + "United States (Georgia)", + ); + + 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, 10, 8)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2007, 1, 15)?, + "Robert E. Lee's Birthday", + ), + ( + NaiveDate::from_ymd_res(2007, 4, 23)?, + "Confederate Memorial Day", + ), + ( + NaiveDate::from_ymd_res(2007, 11, 23)?, + "Robert E. Lee's Birthday", + ), + ( + NaiveDate::from_ymd_res(2007, 12, 24)?, + "Washington's Birthday", + ), + ], + &mut map, + Country::US_GA, + "United States (Georgia)", + ); + + 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, 10, 13)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2008, 1, 21)?, + "Robert E. Lee's Birthday", + ), + ( + NaiveDate::from_ymd_res(2008, 4, 28)?, + "Confederate Memorial Day", + ), + ( + NaiveDate::from_ymd_res(2008, 11, 28)?, + "Robert E. Lee's Birthday", + ), + ( + NaiveDate::from_ymd_res(2008, 12, 26)?, + "Washington's Birthday", + ), + ], + &mut map, + Country::US_GA, + "United States (Georgia)", + ); + + 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, 10, 12)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2009, 1, 19)?, + "Robert E. Lee's Birthday", + ), + ( + NaiveDate::from_ymd_res(2009, 4, 27)?, + "Confederate Memorial Day", + ), + ( + NaiveDate::from_ymd_res(2009, 11, 27)?, + "Robert E. Lee's Birthday", + ), + ( + NaiveDate::from_ymd_res(2009, 12, 24)?, + "Washington's Birthday", + ), + ], + &mut map, + Country::US_GA, + "United States (Georgia)", + ); + + 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); Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2010, 10, 11)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2010, 1, 18)?, + "Robert E. Lee's Birthday", + ), + ( + NaiveDate::from_ymd_res(2010, 4, 26)?, + "Confederate Memorial Day", + ), + ( + NaiveDate::from_ymd_res(2010, 11, 26)?, + "Robert E. Lee's Birthday", + ), + ], + &mut map, + Country::US_GA, + "United States (Georgia)", + ); + + 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, 10, 10)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2011, 1, 17)?, + "Robert E. Lee's Birthday", + ), + ( + NaiveDate::from_ymd_res(2011, 4, 25)?, + "Confederate Memorial Day", + ), + ( + NaiveDate::from_ymd_res(2011, 11, 25)?, + "Robert E. Lee's Birthday", + ), + ( + NaiveDate::from_ymd_res(2011, 12, 24)?, + "Washington's Birthday", + ), + ], + &mut map, + Country::US_GA, + "United States (Georgia)", + ); + + 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, 10, 8)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2012, 1, 16)?, + "Martin Luther King Jr. Day", + ), + ( + NaiveDate::from_ymd_res(2012, 4, 23)?, + "Confederate Memorial Day", + ), + ( + NaiveDate::from_ymd_res(2012, 11, 23)?, + "Robert E. Lee's Birthday", + ), + ( + NaiveDate::from_ymd_res(2012, 12, 24)?, + "Washington's Birthday", + ), + ], + &mut map, + Country::US_GA, + "United States (Georgia)", + ); + + 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, 10, 14)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2013, 1, 21)?, + "Martin Luther King Jr. Day", + ), + ( + NaiveDate::from_ymd_res(2013, 4, 22)?, + "Confederate Memorial Day", + ), + ( + NaiveDate::from_ymd_res(2013, 11, 29)?, + "Robert E. Lee's Birthday", + ), + ( + NaiveDate::from_ymd_res(2013, 12, 24)?, + "Washington's Birthday", + ), + ], + &mut map, + Country::US_GA, + "United States (Georgia)", + ); + + 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, 10, 13)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2014, 1, 20)?, + "Martin Luther King Jr. Day", + ), + ( + NaiveDate::from_ymd_res(2014, 4, 28)?, + "Confederate Memorial Day", + ), + ( + NaiveDate::from_ymd_res(2014, 11, 28)?, + "Robert E. Lee's Birthday", + ), + ( + NaiveDate::from_ymd_res(2014, 12, 26)?, + "Washington's Birthday", + ), + ], + &mut map, + Country::US_GA, + "United States (Georgia)", + ); + + 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, 10, 12)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2015, 1, 19)?, + "Martin Luther King Jr. Day", + ), + ( + NaiveDate::from_ymd_res(2015, 4, 27)?, + "Confederate Memorial Day", + ), + ( + NaiveDate::from_ymd_res(2015, 11, 27)?, + "Robert E. Lee's Birthday", + ), + ( + NaiveDate::from_ymd_res(2015, 12, 24)?, + "Washington's Birthday", + ), + ], + &mut map, + Country::US_GA, + "United States (Georgia)", + ); + + 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, 10, 10)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2016, 1, 18)?, + "Martin Luther King Jr. Day", + ), + (NaiveDate::from_ymd_res(2016, 4, 25)?, "State Holiday"), + (NaiveDate::from_ymd_res(2016, 11, 25)?, "State Holiday"), + ( + NaiveDate::from_ymd_res(2016, 12, 24)?, + "Washington's Birthday", + ), + ], + &mut map, + Country::US_GA, + "United States (Georgia)", + ); + + 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, 10, 9)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2017, 1, 16)?, + "Martin Luther King Jr. Day", + ), + (NaiveDate::from_ymd_res(2017, 4, 24)?, "State Holiday"), + (NaiveDate::from_ymd_res(2017, 11, 24)?, "State Holiday"), + ( + NaiveDate::from_ymd_res(2017, 12, 24)?, + "Washington's Birthday", + ), + ], + &mut map, + Country::US_GA, + "United States (Georgia)", + ); + + 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, 10, 8)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2018, 1, 15)?, + "Martin Luther King Jr. Day", + ), + (NaiveDate::from_ymd_res(2018, 4, 23)?, "State Holiday"), + (NaiveDate::from_ymd_res(2018, 11, 23)?, "State Holiday"), + ( + NaiveDate::from_ymd_res(2018, 12, 24)?, + "Washington's Birthday", + ), + ], + &mut map, + Country::US_GA, + "United States (Georgia)", + ); + + 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, 10, 14)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2019, 1, 21)?, + "Martin Luther King Jr. Day", + ), + (NaiveDate::from_ymd_res(2019, 4, 22)?, "State Holiday"), + (NaiveDate::from_ymd_res(2019, 11, 29)?, "State Holiday"), + ( + NaiveDate::from_ymd_res(2019, 12, 24)?, + "Washington's Birthday", + ), + ], + &mut map, + Country::US_GA, + "United States (Georgia)", + ); + + 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, 10, 12)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2020, 1, 20)?, + "Martin Luther King Jr. Day", + ), + (NaiveDate::from_ymd_res(2020, 4, 10)?, "State Holiday"), + (NaiveDate::from_ymd_res(2020, 11, 27)?, "State Holiday"), + ( + NaiveDate::from_ymd_res(2020, 12, 24)?, + "Washington's Birthday", + ), + ], + &mut map, + Country::US_GA, + "United States (Georgia)", + ); + + 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); Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2021, 10, 11)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2021, 1, 18)?, + "Martin Luther King Jr. Day", + ), + (NaiveDate::from_ymd_res(2021, 4, 26)?, "State Holiday"), + (NaiveDate::from_ymd_res(2021, 11, 26)?, "State Holiday"), + ], + &mut map, + Country::US_GA, + "United States (Georgia)", + ); + + 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, 10, 10)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2022, 1, 17)?, + "Martin Luther King Jr. Day", + ), + (NaiveDate::from_ymd_res(2022, 4, 25)?, "State Holiday"), + (NaiveDate::from_ymd_res(2022, 11, 25)?, "State Holiday"), + ( + NaiveDate::from_ymd_res(2022, 12, 24)?, + "Washington's Birthday", + ), + ], + &mut map, + Country::US_GA, + "United States (Georgia)", + ); + + 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, 10, 9)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2023, 1, 16)?, + "Martin Luther King Jr. Day", + ), + (NaiveDate::from_ymd_res(2023, 4, 24)?, "State Holiday"), + (NaiveDate::from_ymd_res(2023, 11, 24)?, "State Holiday"), + ( + NaiveDate::from_ymd_res(2023, 12, 24)?, + "Washington's Birthday", + ), + ], + &mut map, + Country::US_GA, + "United States (Georgia)", + ); + + 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, 10, 14)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2024, 1, 15)?, + "Martin Luther King Jr. Day", + ), + (NaiveDate::from_ymd_res(2024, 4, 22)?, "State Holiday"), + (NaiveDate::from_ymd_res(2024, 11, 29)?, "State Holiday"), + ( + NaiveDate::from_ymd_res(2024, 12, 24)?, + "Washington's Birthday", + ), + ], + &mut map, + Country::US_GA, + "United States (Georgia)", + ); + + 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, 10, 13)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2025, 1, 20)?, + "Martin Luther King Jr. Day", + ), + (NaiveDate::from_ymd_res(2025, 4, 28)?, "State Holiday"), + (NaiveDate::from_ymd_res(2025, 11, 28)?, "State Holiday"), + ( + NaiveDate::from_ymd_res(2025, 12, 26)?, + "Washington's Birthday", + ), + ], + &mut map, + Country::US_GA, + "United States (Georgia)", + ); + + 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, 10, 12)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2026, 1, 19)?, + "Martin Luther King Jr. Day", + ), + (NaiveDate::from_ymd_res(2026, 4, 27)?, "State Holiday"), + (NaiveDate::from_ymd_res(2026, 11, 27)?, "State Holiday"), + ( + NaiveDate::from_ymd_res(2026, 12, 24)?, + "Washington's Birthday", + ), + ], + &mut map, + Country::US_GA, + "United States (Georgia)", + ); + + 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); Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2027, 10, 11)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2027, 1, 18)?, + "Martin Luther King Jr. Day", + ), + (NaiveDate::from_ymd_res(2027, 4, 26)?, "State Holiday"), + (NaiveDate::from_ymd_res(2027, 11, 26)?, "State Holiday"), + ], + &mut map, + Country::US_GA, + "United States (Georgia)", + ); + + 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, 10, 9)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2028, 1, 17)?, + "Martin Luther King Jr. Day", + ), + (NaiveDate::from_ymd_res(2028, 4, 24)?, "State Holiday"), + (NaiveDate::from_ymd_res(2028, 11, 24)?, "State Holiday"), + ( + NaiveDate::from_ymd_res(2028, 12, 24)?, + "Washington's Birthday", + ), + ], + &mut map, + Country::US_GA, + "United States (Georgia)", + ); + + 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, 10, 8)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2029, 1, 15)?, + "Martin Luther King Jr. Day", + ), + (NaiveDate::from_ymd_res(2029, 4, 23)?, "State Holiday"), + (NaiveDate::from_ymd_res(2029, 11, 23)?, "State Holiday"), + ( + NaiveDate::from_ymd_res(2029, 12, 24)?, + "Washington's Birthday", + ), + ], + &mut map, + Country::US_GA, + "United States (Georgia)", + ); + + 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, 10, 14)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2030, 1, 21)?, + "Martin Luther King Jr. Day", + ), + (NaiveDate::from_ymd_res(2030, 4, 22)?, "State Holiday"), + (NaiveDate::from_ymd_res(2030, 11, 29)?, "State Holiday"), + ( + NaiveDate::from_ymd_res(2030, 12, 24)?, + "Washington's Birthday", + ), + ], + &mut map, + Country::US_GA, + "United States (Georgia)", + ); + + Ok(map) +} diff --git a/src/data/us_gu.rs b/src/data/us_gu.rs new file mode 100644 index 0000000..956b721 --- /dev/null +++ b/src/data/us_gu.rs @@ -0,0 +1,1223 @@ +//! United States (Guam) +use super::*; + +/// Generate holiday map for United States (Guam). +#[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, 3, 6)?, "Guam Discovery Day"), + (NaiveDate::from_ymd_res(2000, 4, 21)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2000, 7, 21)?, + "Liberation Day (Guam)", + ), + (NaiveDate::from_ymd_res(2000, 11, 2)?, "All Souls' Day"), + (NaiveDate::from_ymd_res(2000, 12, 8)?, "Lady of Camarin Day"), + ], + &mut map, + Country::US_GU, + "United States (Guam)", + ); + + 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, 3, 5)?, "Guam Discovery Day"), + (NaiveDate::from_ymd_res(2001, 4, 13)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2001, 7, 21)?, + "Liberation Day (Guam)", + ), + (NaiveDate::from_ymd_res(2001, 11, 2)?, "All Souls' Day"), + (NaiveDate::from_ymd_res(2001, 12, 8)?, "Lady of Camarin Day"), + ], + &mut map, + Country::US_GU, + "United States (Guam)", + ); + + 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, 3, 4)?, "Guam Discovery Day"), + (NaiveDate::from_ymd_res(2002, 3, 29)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2002, 7, 21)?, + "Liberation Day (Guam)", + ), + (NaiveDate::from_ymd_res(2002, 11, 2)?, "All Souls' Day"), + (NaiveDate::from_ymd_res(2002, 12, 8)?, "Lady of Camarin Day"), + ], + &mut map, + Country::US_GU, + "United States (Guam)", + ); + + 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, 3, 3)?, "Guam Discovery Day"), + (NaiveDate::from_ymd_res(2003, 4, 18)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2003, 7, 21)?, + "Liberation Day (Guam)", + ), + (NaiveDate::from_ymd_res(2003, 11, 2)?, "All Souls' Day"), + (NaiveDate::from_ymd_res(2003, 12, 8)?, "Lady of Camarin Day"), + ], + &mut map, + Country::US_GU, + "United States (Guam)", + ); + + 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, 3, 1)?, "Guam Discovery Day"), + (NaiveDate::from_ymd_res(2004, 4, 9)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2004, 7, 21)?, + "Liberation Day (Guam)", + ), + (NaiveDate::from_ymd_res(2004, 11, 2)?, "All Souls' Day"), + (NaiveDate::from_ymd_res(2004, 12, 8)?, "Lady of Camarin Day"), + ], + &mut map, + Country::US_GU, + "United States (Guam)", + ); + + 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, 3, 7)?, "Guam Discovery Day"), + (NaiveDate::from_ymd_res(2005, 3, 25)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2005, 7, 21)?, + "Liberation Day (Guam)", + ), + (NaiveDate::from_ymd_res(2005, 11, 2)?, "All Souls' Day"), + (NaiveDate::from_ymd_res(2005, 12, 8)?, "Lady of Camarin Day"), + ], + &mut map, + Country::US_GU, + "United States (Guam)", + ); + + 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, 3, 6)?, "Guam Discovery Day"), + (NaiveDate::from_ymd_res(2006, 4, 14)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2006, 7, 21)?, + "Liberation Day (Guam)", + ), + (NaiveDate::from_ymd_res(2006, 11, 2)?, "All Souls' Day"), + (NaiveDate::from_ymd_res(2006, 12, 8)?, "Lady of Camarin Day"), + ], + &mut map, + Country::US_GU, + "United States (Guam)", + ); + + 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, 3, 5)?, "Guam Discovery Day"), + (NaiveDate::from_ymd_res(2007, 4, 6)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2007, 7, 21)?, + "Liberation Day (Guam)", + ), + (NaiveDate::from_ymd_res(2007, 11, 2)?, "All Souls' Day"), + (NaiveDate::from_ymd_res(2007, 12, 8)?, "Lady of Camarin Day"), + ], + &mut map, + Country::US_GU, + "United States (Guam)", + ); + + 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, 3, 3)?, "Guam Discovery Day"), + (NaiveDate::from_ymd_res(2008, 3, 21)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2008, 7, 21)?, + "Liberation Day (Guam)", + ), + (NaiveDate::from_ymd_res(2008, 11, 2)?, "All Souls' Day"), + (NaiveDate::from_ymd_res(2008, 12, 8)?, "Lady of Camarin Day"), + ], + &mut map, + Country::US_GU, + "United States (Guam)", + ); + + 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, 3, 2)?, "Guam Discovery Day"), + (NaiveDate::from_ymd_res(2009, 4, 10)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2009, 7, 21)?, + "Liberation Day (Guam)", + ), + (NaiveDate::from_ymd_res(2009, 11, 2)?, "All Souls' Day"), + (NaiveDate::from_ymd_res(2009, 12, 8)?, "Lady of Camarin Day"), + ], + &mut map, + Country::US_GU, + "United States (Guam)", + ); + + 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, 3, 1)?, "Guam Discovery Day"), + (NaiveDate::from_ymd_res(2010, 4, 2)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2010, 7, 21)?, + "Liberation Day (Guam)", + ), + (NaiveDate::from_ymd_res(2010, 11, 2)?, "All Souls' Day"), + (NaiveDate::from_ymd_res(2010, 12, 8)?, "Lady of Camarin Day"), + ], + &mut map, + Country::US_GU, + "United States (Guam)", + ); + + 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, 3, 7)?, "Guam Discovery Day"), + (NaiveDate::from_ymd_res(2011, 4, 22)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2011, 7, 21)?, + "Liberation Day (Guam)", + ), + (NaiveDate::from_ymd_res(2011, 11, 2)?, "All Souls' Day"), + (NaiveDate::from_ymd_res(2011, 12, 8)?, "Lady of Camarin Day"), + ], + &mut map, + Country::US_GU, + "United States (Guam)", + ); + + 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, 3, 5)?, "Guam Discovery Day"), + (NaiveDate::from_ymd_res(2012, 4, 6)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2012, 7, 21)?, + "Liberation Day (Guam)", + ), + (NaiveDate::from_ymd_res(2012, 11, 2)?, "All Souls' Day"), + (NaiveDate::from_ymd_res(2012, 12, 8)?, "Lady of Camarin Day"), + ], + &mut map, + Country::US_GU, + "United States (Guam)", + ); + + 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, 3, 4)?, "Guam Discovery Day"), + (NaiveDate::from_ymd_res(2013, 3, 29)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2013, 7, 21)?, + "Liberation Day (Guam)", + ), + (NaiveDate::from_ymd_res(2013, 11, 2)?, "All Souls' Day"), + (NaiveDate::from_ymd_res(2013, 12, 8)?, "Lady of Camarin Day"), + ], + &mut map, + Country::US_GU, + "United States (Guam)", + ); + + 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, 3, 3)?, "Guam Discovery Day"), + (NaiveDate::from_ymd_res(2014, 4, 18)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2014, 7, 21)?, + "Liberation Day (Guam)", + ), + (NaiveDate::from_ymd_res(2014, 11, 2)?, "All Souls' Day"), + (NaiveDate::from_ymd_res(2014, 12, 8)?, "Lady of Camarin Day"), + ], + &mut map, + Country::US_GU, + "United States (Guam)", + ); + + 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, 3, 2)?, "Guam Discovery Day"), + (NaiveDate::from_ymd_res(2015, 4, 3)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2015, 7, 21)?, + "Liberation Day (Guam)", + ), + (NaiveDate::from_ymd_res(2015, 11, 2)?, "All Souls' Day"), + (NaiveDate::from_ymd_res(2015, 12, 8)?, "Lady of Camarin Day"), + ], + &mut map, + Country::US_GU, + "United States (Guam)", + ); + + 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, 3, 7)?, "Guam Discovery Day"), + (NaiveDate::from_ymd_res(2016, 3, 25)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2016, 7, 21)?, + "Liberation Day (Guam)", + ), + (NaiveDate::from_ymd_res(2016, 11, 2)?, "All Souls' Day"), + (NaiveDate::from_ymd_res(2016, 12, 8)?, "Lady of Camarin Day"), + ], + &mut map, + Country::US_GU, + "United States (Guam)", + ); + + 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, 3, 6)?, "Guam Discovery Day"), + (NaiveDate::from_ymd_res(2017, 4, 14)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2017, 7, 21)?, + "Liberation Day (Guam)", + ), + (NaiveDate::from_ymd_res(2017, 11, 2)?, "All Souls' Day"), + (NaiveDate::from_ymd_res(2017, 12, 8)?, "Lady of Camarin Day"), + ], + &mut map, + Country::US_GU, + "United States (Guam)", + ); + + 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, 3, 5)?, "Guam Discovery Day"), + (NaiveDate::from_ymd_res(2018, 3, 30)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2018, 7, 21)?, + "Liberation Day (Guam)", + ), + (NaiveDate::from_ymd_res(2018, 11, 2)?, "All Souls' Day"), + (NaiveDate::from_ymd_res(2018, 12, 8)?, "Lady of Camarin Day"), + ], + &mut map, + Country::US_GU, + "United States (Guam)", + ); + + 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, 3, 4)?, "Guam Discovery Day"), + (NaiveDate::from_ymd_res(2019, 4, 19)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2019, 7, 21)?, + "Liberation Day (Guam)", + ), + (NaiveDate::from_ymd_res(2019, 11, 2)?, "All Souls' Day"), + (NaiveDate::from_ymd_res(2019, 12, 8)?, "Lady of Camarin Day"), + ], + &mut map, + Country::US_GU, + "United States (Guam)", + ); + + 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, 3, 2)?, "Guam Discovery Day"), + (NaiveDate::from_ymd_res(2020, 4, 10)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2020, 7, 21)?, + "Liberation Day (Guam)", + ), + (NaiveDate::from_ymd_res(2020, 11, 2)?, "All Souls' Day"), + (NaiveDate::from_ymd_res(2020, 12, 8)?, "Lady of Camarin Day"), + ], + &mut map, + Country::US_GU, + "United States (Guam)", + ); + + 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, 3, 1)?, "Guam Discovery Day"), + (NaiveDate::from_ymd_res(2021, 4, 2)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2021, 7, 21)?, + "Liberation Day (Guam)", + ), + (NaiveDate::from_ymd_res(2021, 11, 2)?, "All Souls' Day"), + (NaiveDate::from_ymd_res(2021, 12, 8)?, "Lady of Camarin Day"), + ], + &mut map, + Country::US_GU, + "United States (Guam)", + ); + + 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, 3, 7)?, "Guam Discovery Day"), + (NaiveDate::from_ymd_res(2022, 4, 15)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2022, 7, 21)?, + "Liberation Day (Guam)", + ), + (NaiveDate::from_ymd_res(2022, 11, 2)?, "All Souls' Day"), + (NaiveDate::from_ymd_res(2022, 12, 8)?, "Lady of Camarin Day"), + ], + &mut map, + Country::US_GU, + "United States (Guam)", + ); + + 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, 3, 6)?, "Guam Discovery Day"), + (NaiveDate::from_ymd_res(2023, 4, 7)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2023, 7, 21)?, + "Liberation Day (Guam)", + ), + (NaiveDate::from_ymd_res(2023, 11, 2)?, "All Souls' Day"), + (NaiveDate::from_ymd_res(2023, 12, 8)?, "Lady of Camarin Day"), + ], + &mut map, + Country::US_GU, + "United States (Guam)", + ); + + 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, 3, 4)?, "Guam Discovery Day"), + (NaiveDate::from_ymd_res(2024, 3, 29)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2024, 7, 21)?, + "Liberation Day (Guam)", + ), + (NaiveDate::from_ymd_res(2024, 11, 2)?, "All Souls' Day"), + (NaiveDate::from_ymd_res(2024, 12, 8)?, "Lady of Camarin Day"), + ], + &mut map, + Country::US_GU, + "United States (Guam)", + ); + + 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, 3, 3)?, "Guam Discovery Day"), + (NaiveDate::from_ymd_res(2025, 4, 18)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2025, 7, 21)?, + "Liberation Day (Guam)", + ), + (NaiveDate::from_ymd_res(2025, 11, 2)?, "All Souls' Day"), + (NaiveDate::from_ymd_res(2025, 12, 8)?, "Lady of Camarin Day"), + ], + &mut map, + Country::US_GU, + "United States (Guam)", + ); + + 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, 3, 2)?, "Guam Discovery Day"), + (NaiveDate::from_ymd_res(2026, 4, 3)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2026, 7, 21)?, + "Liberation Day (Guam)", + ), + (NaiveDate::from_ymd_res(2026, 11, 2)?, "All Souls' Day"), + (NaiveDate::from_ymd_res(2026, 12, 8)?, "Lady of Camarin Day"), + ], + &mut map, + Country::US_GU, + "United States (Guam)", + ); + + 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, 3, 1)?, "Guam Discovery Day"), + (NaiveDate::from_ymd_res(2027, 3, 26)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2027, 7, 21)?, + "Liberation Day (Guam)", + ), + (NaiveDate::from_ymd_res(2027, 11, 2)?, "All Souls' Day"), + (NaiveDate::from_ymd_res(2027, 12, 8)?, "Lady of Camarin Day"), + ], + &mut map, + Country::US_GU, + "United States (Guam)", + ); + + 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, 3, 6)?, "Guam Discovery Day"), + (NaiveDate::from_ymd_res(2028, 4, 14)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2028, 7, 21)?, + "Liberation Day (Guam)", + ), + (NaiveDate::from_ymd_res(2028, 11, 2)?, "All Souls' Day"), + (NaiveDate::from_ymd_res(2028, 12, 8)?, "Lady of Camarin Day"), + ], + &mut map, + Country::US_GU, + "United States (Guam)", + ); + + 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, 3, 5)?, "Guam Discovery Day"), + (NaiveDate::from_ymd_res(2029, 3, 30)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2029, 7, 21)?, + "Liberation Day (Guam)", + ), + (NaiveDate::from_ymd_res(2029, 11, 2)?, "All Souls' Day"), + (NaiveDate::from_ymd_res(2029, 12, 8)?, "Lady of Camarin Day"), + ], + &mut map, + Country::US_GU, + "United States (Guam)", + ); + + 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, 3, 4)?, "Guam Discovery Day"), + (NaiveDate::from_ymd_res(2030, 4, 19)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2030, 7, 21)?, + "Liberation Day (Guam)", + ), + (NaiveDate::from_ymd_res(2030, 11, 2)?, "All Souls' Day"), + (NaiveDate::from_ymd_res(2030, 12, 8)?, "Lady of Camarin Day"), + ], + &mut map, + Country::US_GU, + "United States (Guam)", + ); + + Ok(map) +} diff --git a/src/data/us_hi.rs b/src/data/us_hi.rs new file mode 100644 index 0000000..ba0557a --- /dev/null +++ b/src/data/us_hi.rs @@ -0,0 +1,1233 @@ +//! United States (Hawaii) +use super::*; + +/// Generate holiday map for United States (Hawaii). +#[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, 3, 26)?, + "Prince Jonah Kuhio Kalanianaole Day", + ), + ( + NaiveDate::from_ymd_res(2000, 3, 27)?, + "Prince Jonah Kuhio Kalanianaole Day (observed)", + ), + (NaiveDate::from_ymd_res(2000, 6, 11)?, "Kamehameha Day"), + (NaiveDate::from_ymd_res(2000, 8, 18)?, "Statehood Day"), + ], + &mut map, + Country::US_HI, + "United States (Hawaii)", + ); + + 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, 3, 26)?, + "Prince Jonah Kuhio Kalanianaole Day", + ), + (NaiveDate::from_ymd_res(2001, 6, 11)?, "Kamehameha Day"), + (NaiveDate::from_ymd_res(2001, 8, 17)?, "Statehood Day"), + ], + &mut map, + Country::US_HI, + "United States (Hawaii)", + ); + + 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, 3, 26)?, + "Prince Jonah Kuhio Kalanianaole Day", + ), + (NaiveDate::from_ymd_res(2002, 6, 11)?, "Kamehameha Day"), + (NaiveDate::from_ymd_res(2002, 8, 16)?, "Statehood Day"), + ], + &mut map, + Country::US_HI, + "United States (Hawaii)", + ); + + 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, 3, 26)?, + "Prince Jonah Kuhio Kalanianaole Day", + ), + (NaiveDate::from_ymd_res(2003, 6, 11)?, "Kamehameha Day"), + (NaiveDate::from_ymd_res(2003, 8, 15)?, "Statehood Day"), + ], + &mut map, + Country::US_HI, + "United States (Hawaii)", + ); + + 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, 3, 26)?, + "Prince Jonah Kuhio Kalanianaole Day", + ), + (NaiveDate::from_ymd_res(2004, 6, 11)?, "Kamehameha Day"), + (NaiveDate::from_ymd_res(2004, 8, 20)?, "Statehood Day"), + ], + &mut map, + Country::US_HI, + "United States (Hawaii)", + ); + + 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, 3, 26)?, + "Prince Jonah Kuhio Kalanianaole Day", + ), + ( + NaiveDate::from_ymd_res(2005, 3, 25)?, + "Prince Jonah Kuhio Kalanianaole Day (observed)", + ), + (NaiveDate::from_ymd_res(2005, 6, 11)?, "Kamehameha Day"), + (NaiveDate::from_ymd_res(2005, 8, 19)?, "Statehood Day"), + ], + &mut map, + Country::US_HI, + "United States (Hawaii)", + ); + + 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, 3, 26)?, + "Prince Jonah Kuhio Kalanianaole Day", + ), + ( + NaiveDate::from_ymd_res(2006, 3, 27)?, + "Prince Jonah Kuhio Kalanianaole Day (observed)", + ), + (NaiveDate::from_ymd_res(2006, 6, 11)?, "Kamehameha Day"), + (NaiveDate::from_ymd_res(2006, 8, 18)?, "Statehood Day"), + ], + &mut map, + Country::US_HI, + "United States (Hawaii)", + ); + + 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, 3, 26)?, + "Prince Jonah Kuhio Kalanianaole Day", + ), + (NaiveDate::from_ymd_res(2007, 6, 11)?, "Kamehameha Day"), + (NaiveDate::from_ymd_res(2007, 8, 17)?, "Statehood Day"), + ], + &mut map, + Country::US_HI, + "United States (Hawaii)", + ); + + 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, 3, 26)?, + "Prince Jonah Kuhio Kalanianaole Day", + ), + (NaiveDate::from_ymd_res(2008, 6, 11)?, "Kamehameha Day"), + (NaiveDate::from_ymd_res(2008, 8, 15)?, "Statehood Day"), + (NaiveDate::from_ymd_res(2008, 11, 4)?, "Election Day"), + ], + &mut map, + Country::US_HI, + "United States (Hawaii)", + ); + + 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, 3, 26)?, + "Prince Jonah Kuhio Kalanianaole Day", + ), + (NaiveDate::from_ymd_res(2009, 6, 11)?, "Kamehameha Day"), + (NaiveDate::from_ymd_res(2009, 8, 21)?, "Statehood Day"), + ], + &mut map, + Country::US_HI, + "United States (Hawaii)", + ); + + 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, 3, 26)?, + "Prince Jonah Kuhio Kalanianaole Day", + ), + (NaiveDate::from_ymd_res(2010, 6, 11)?, "Kamehameha Day"), + (NaiveDate::from_ymd_res(2010, 8, 20)?, "Statehood Day"), + (NaiveDate::from_ymd_res(2010, 11, 2)?, "Election Day"), + ], + &mut map, + Country::US_HI, + "United States (Hawaii)", + ); + + 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, 3, 26)?, + "Prince Jonah Kuhio Kalanianaole Day", + ), + ( + NaiveDate::from_ymd_res(2011, 3, 25)?, + "Prince Jonah Kuhio Kalanianaole Day (observed)", + ), + (NaiveDate::from_ymd_res(2011, 6, 11)?, "Kamehameha Day"), + ( + NaiveDate::from_ymd_res(2011, 6, 10)?, + "Kamehameha Day (observed)", + ), + (NaiveDate::from_ymd_res(2011, 8, 19)?, "Statehood Day"), + ], + &mut map, + Country::US_HI, + "United States (Hawaii)", + ); + + 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, 3, 26)?, + "Prince Jonah Kuhio Kalanianaole Day", + ), + (NaiveDate::from_ymd_res(2012, 6, 11)?, "Kamehameha Day"), + (NaiveDate::from_ymd_res(2012, 8, 17)?, "Statehood Day"), + (NaiveDate::from_ymd_res(2012, 11, 6)?, "Election Day"), + ], + &mut map, + Country::US_HI, + "United States (Hawaii)", + ); + + 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, 3, 26)?, + "Prince Jonah Kuhio Kalanianaole Day", + ), + (NaiveDate::from_ymd_res(2013, 6, 11)?, "Kamehameha Day"), + (NaiveDate::from_ymd_res(2013, 8, 16)?, "Statehood Day"), + ], + &mut map, + Country::US_HI, + "United States (Hawaii)", + ); + + 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, 3, 26)?, + "Prince Jonah Kuhio Kalanianaole Day", + ), + (NaiveDate::from_ymd_res(2014, 6, 11)?, "Kamehameha Day"), + (NaiveDate::from_ymd_res(2014, 8, 15)?, "Statehood Day"), + (NaiveDate::from_ymd_res(2014, 11, 4)?, "Election Day"), + ], + &mut map, + Country::US_HI, + "United States (Hawaii)", + ); + + 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, 3, 26)?, + "Prince Jonah Kuhio Kalanianaole Day", + ), + (NaiveDate::from_ymd_res(2015, 6, 11)?, "Kamehameha Day"), + (NaiveDate::from_ymd_res(2015, 8, 21)?, "Statehood Day"), + ], + &mut map, + Country::US_HI, + "United States (Hawaii)", + ); + + 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, 3, 26)?, + "Prince Jonah Kuhio Kalanianaole Day", + ), + ( + NaiveDate::from_ymd_res(2016, 3, 25)?, + "Prince Jonah Kuhio Kalanianaole Day (observed)", + ), + (NaiveDate::from_ymd_res(2016, 6, 11)?, "Kamehameha Day"), + ( + NaiveDate::from_ymd_res(2016, 6, 10)?, + "Kamehameha Day (observed)", + ), + (NaiveDate::from_ymd_res(2016, 8, 19)?, "Statehood Day"), + (NaiveDate::from_ymd_res(2016, 11, 8)?, "Election Day"), + ], + &mut map, + Country::US_HI, + "United States (Hawaii)", + ); + + 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, 3, 26)?, + "Prince Jonah Kuhio Kalanianaole Day", + ), + ( + NaiveDate::from_ymd_res(2017, 3, 27)?, + "Prince Jonah Kuhio Kalanianaole Day (observed)", + ), + (NaiveDate::from_ymd_res(2017, 6, 11)?, "Kamehameha Day"), + ( + NaiveDate::from_ymd_res(2017, 6, 12)?, + "Kamehameha Day (observed)", + ), + (NaiveDate::from_ymd_res(2017, 8, 18)?, "Statehood Day"), + ], + &mut map, + Country::US_HI, + "United States (Hawaii)", + ); + + 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, 3, 26)?, + "Prince Jonah Kuhio Kalanianaole Day", + ), + (NaiveDate::from_ymd_res(2018, 6, 11)?, "Kamehameha Day"), + (NaiveDate::from_ymd_res(2018, 8, 17)?, "Statehood Day"), + (NaiveDate::from_ymd_res(2018, 11, 6)?, "Election Day"), + ], + &mut map, + Country::US_HI, + "United States (Hawaii)", + ); + + 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, 3, 26)?, + "Prince Jonah Kuhio Kalanianaole Day", + ), + (NaiveDate::from_ymd_res(2019, 6, 11)?, "Kamehameha Day"), + (NaiveDate::from_ymd_res(2019, 8, 16)?, "Statehood Day"), + ], + &mut map, + Country::US_HI, + "United States (Hawaii)", + ); + + 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, 3, 26)?, + "Prince Jonah Kuhio Kalanianaole Day", + ), + (NaiveDate::from_ymd_res(2020, 6, 11)?, "Kamehameha Day"), + (NaiveDate::from_ymd_res(2020, 8, 21)?, "Statehood Day"), + (NaiveDate::from_ymd_res(2020, 11, 3)?, "Election Day"), + ], + &mut map, + Country::US_HI, + "United States (Hawaii)", + ); + + 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, 3, 26)?, + "Prince Jonah Kuhio Kalanianaole Day", + ), + (NaiveDate::from_ymd_res(2021, 6, 11)?, "Kamehameha Day"), + (NaiveDate::from_ymd_res(2021, 8, 20)?, "Statehood Day"), + ], + &mut map, + Country::US_HI, + "United States (Hawaii)", + ); + + 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, 3, 26)?, + "Prince Jonah Kuhio Kalanianaole Day", + ), + ( + NaiveDate::from_ymd_res(2022, 3, 25)?, + "Prince Jonah Kuhio Kalanianaole Day (observed)", + ), + (NaiveDate::from_ymd_res(2022, 6, 11)?, "Kamehameha Day"), + ( + NaiveDate::from_ymd_res(2022, 6, 10)?, + "Kamehameha Day (observed)", + ), + (NaiveDate::from_ymd_res(2022, 8, 19)?, "Statehood Day"), + (NaiveDate::from_ymd_res(2022, 11, 8)?, "Election Day"), + ], + &mut map, + Country::US_HI, + "United States (Hawaii)", + ); + + 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, 3, 26)?, + "Prince Jonah Kuhio Kalanianaole Day", + ), + ( + NaiveDate::from_ymd_res(2023, 3, 27)?, + "Prince Jonah Kuhio Kalanianaole Day (observed)", + ), + (NaiveDate::from_ymd_res(2023, 6, 11)?, "Kamehameha Day"), + ( + NaiveDate::from_ymd_res(2023, 6, 12)?, + "Kamehameha Day (observed)", + ), + (NaiveDate::from_ymd_res(2023, 8, 18)?, "Statehood Day"), + ], + &mut map, + Country::US_HI, + "United States (Hawaii)", + ); + + 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, 3, 26)?, + "Prince Jonah Kuhio Kalanianaole Day", + ), + (NaiveDate::from_ymd_res(2024, 6, 11)?, "Kamehameha Day"), + (NaiveDate::from_ymd_res(2024, 8, 16)?, "Statehood Day"), + (NaiveDate::from_ymd_res(2024, 11, 5)?, "Election Day"), + ], + &mut map, + Country::US_HI, + "United States (Hawaii)", + ); + + 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, 3, 26)?, + "Prince Jonah Kuhio Kalanianaole Day", + ), + (NaiveDate::from_ymd_res(2025, 6, 11)?, "Kamehameha Day"), + (NaiveDate::from_ymd_res(2025, 8, 15)?, "Statehood Day"), + ], + &mut map, + Country::US_HI, + "United States (Hawaii)", + ); + + 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, 3, 26)?, + "Prince Jonah Kuhio Kalanianaole Day", + ), + (NaiveDate::from_ymd_res(2026, 6, 11)?, "Kamehameha Day"), + (NaiveDate::from_ymd_res(2026, 8, 21)?, "Statehood Day"), + (NaiveDate::from_ymd_res(2026, 11, 3)?, "Election Day"), + ], + &mut map, + Country::US_HI, + "United States (Hawaii)", + ); + + 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, 3, 26)?, + "Prince Jonah Kuhio Kalanianaole Day", + ), + (NaiveDate::from_ymd_res(2027, 6, 11)?, "Kamehameha Day"), + (NaiveDate::from_ymd_res(2027, 8, 20)?, "Statehood Day"), + ], + &mut map, + Country::US_HI, + "United States (Hawaii)", + ); + + 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, 3, 26)?, + "Prince Jonah Kuhio Kalanianaole Day", + ), + ( + NaiveDate::from_ymd_res(2028, 3, 27)?, + "Prince Jonah Kuhio Kalanianaole Day (observed)", + ), + (NaiveDate::from_ymd_res(2028, 6, 11)?, "Kamehameha Day"), + ( + NaiveDate::from_ymd_res(2028, 6, 12)?, + "Kamehameha Day (observed)", + ), + (NaiveDate::from_ymd_res(2028, 8, 18)?, "Statehood Day"), + (NaiveDate::from_ymd_res(2028, 11, 7)?, "Election Day"), + ], + &mut map, + Country::US_HI, + "United States (Hawaii)", + ); + + 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, 3, 26)?, + "Prince Jonah Kuhio Kalanianaole Day", + ), + (NaiveDate::from_ymd_res(2029, 6, 11)?, "Kamehameha Day"), + (NaiveDate::from_ymd_res(2029, 8, 17)?, "Statehood Day"), + ], + &mut map, + Country::US_HI, + "United States (Hawaii)", + ); + + 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, 3, 26)?, + "Prince Jonah Kuhio Kalanianaole Day", + ), + (NaiveDate::from_ymd_res(2030, 6, 11)?, "Kamehameha Day"), + (NaiveDate::from_ymd_res(2030, 8, 16)?, "Statehood Day"), + (NaiveDate::from_ymd_res(2030, 11, 5)?, "Election Day"), + ], + &mut map, + Country::US_HI, + "United States (Hawaii)", + ); + + Ok(map) +} diff --git a/src/data/us_ia.rs b/src/data/us_ia.rs new file mode 100644 index 0000000..727ef67 --- /dev/null +++ b/src/data/us_ia.rs @@ -0,0 +1,1042 @@ +//! United States (Iowa) +use super::*; + +/// Generate holiday map for United States (Iowa). +#[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, 2, 12)?, "Lincoln's Birthday"), + ( + NaiveDate::from_ymd_res(2000, 2, 11)?, + "Lincoln's Birthday (observed)", + ), + ], + &mut map, + Country::US_IA, + "United States (Iowa)", + ); + + 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, 2, 12)?, "Lincoln's Birthday"), + ], + &mut map, + Country::US_IA, + "United States (Iowa)", + ); + + 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, 2, 12)?, "Lincoln's Birthday"), + ], + &mut map, + Country::US_IA, + "United States (Iowa)", + ); + + 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, 2, 12)?, "Lincoln's Birthday"), + ], + &mut map, + Country::US_IA, + "United States (Iowa)", + ); + + 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, 2, 12)?, "Lincoln's Birthday"), + ], + &mut map, + Country::US_IA, + "United States (Iowa)", + ); + + 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, 2, 12)?, "Lincoln's Birthday"), + ( + NaiveDate::from_ymd_res(2005, 2, 11)?, + "Lincoln's Birthday (observed)", + ), + ], + &mut map, + Country::US_IA, + "United States (Iowa)", + ); + + 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, 2, 12)?, "Lincoln's Birthday"), + ( + NaiveDate::from_ymd_res(2006, 2, 13)?, + "Lincoln's Birthday (observed)", + ), + ], + &mut map, + Country::US_IA, + "United States (Iowa)", + ); + + 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, 2, 12)?, "Lincoln's Birthday"), + ], + &mut map, + Country::US_IA, + "United States (Iowa)", + ); + + 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, 2, 12)?, "Lincoln's Birthday"), + ], + &mut map, + Country::US_IA, + "United States (Iowa)", + ); + + 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, 2, 12)?, "Lincoln's Birthday"), + ], + &mut map, + Country::US_IA, + "United States (Iowa)", + ); + + 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, 2, 12)?, "Lincoln's Birthday"), + ], + &mut map, + Country::US_IA, + "United States (Iowa)", + ); + + 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, 2, 12)?, "Lincoln's Birthday"), + ( + NaiveDate::from_ymd_res(2011, 2, 11)?, + "Lincoln's Birthday (observed)", + ), + ], + &mut map, + Country::US_IA, + "United States (Iowa)", + ); + + 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, 2, 12)?, "Lincoln's Birthday"), + ( + NaiveDate::from_ymd_res(2012, 2, 13)?, + "Lincoln's Birthday (observed)", + ), + ], + &mut map, + Country::US_IA, + "United States (Iowa)", + ); + + 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, 2, 12)?, "Lincoln's Birthday"), + ], + &mut map, + Country::US_IA, + "United States (Iowa)", + ); + + 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, 2, 12)?, "Lincoln's Birthday"), + ], + &mut map, + Country::US_IA, + "United States (Iowa)", + ); + + 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, 2, 12)?, "Lincoln's Birthday"), + ], + &mut map, + Country::US_IA, + "United States (Iowa)", + ); + + 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, 2, 12)?, "Lincoln's Birthday"), + ], + &mut map, + Country::US_IA, + "United States (Iowa)", + ); + + 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, 2, 12)?, "Lincoln's Birthday"), + ( + NaiveDate::from_ymd_res(2017, 2, 13)?, + "Lincoln's Birthday (observed)", + ), + ], + &mut map, + Country::US_IA, + "United States (Iowa)", + ); + + 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, 2, 12)?, "Lincoln's Birthday"), + ], + &mut map, + Country::US_IA, + "United States (Iowa)", + ); + + 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, 2, 12)?, "Lincoln's Birthday"), + ], + &mut map, + Country::US_IA, + "United States (Iowa)", + ); + + 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, 2, 12)?, "Lincoln's Birthday"), + ], + &mut map, + Country::US_IA, + "United States (Iowa)", + ); + + 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, 2, 12)?, "Lincoln's Birthday"), + ], + &mut map, + Country::US_IA, + "United States (Iowa)", + ); + + 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, 2, 12)?, "Lincoln's Birthday"), + ( + NaiveDate::from_ymd_res(2022, 2, 11)?, + "Lincoln's Birthday (observed)", + ), + ], + &mut map, + Country::US_IA, + "United States (Iowa)", + ); + + 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, 2, 12)?, "Lincoln's Birthday"), + ( + NaiveDate::from_ymd_res(2023, 2, 13)?, + "Lincoln's Birthday (observed)", + ), + ], + &mut map, + Country::US_IA, + "United States (Iowa)", + ); + + 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, 2, 12)?, "Lincoln's Birthday"), + ], + &mut map, + Country::US_IA, + "United States (Iowa)", + ); + + 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, 2, 12)?, "Lincoln's Birthday"), + ], + &mut map, + Country::US_IA, + "United States (Iowa)", + ); + + 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, 2, 12)?, "Lincoln's Birthday"), + ], + &mut map, + Country::US_IA, + "United States (Iowa)", + ); + + 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, 2, 12)?, "Lincoln's Birthday"), + ], + &mut map, + Country::US_IA, + "United States (Iowa)", + ); + + 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, 2, 12)?, "Lincoln's Birthday"), + ( + NaiveDate::from_ymd_res(2028, 2, 11)?, + "Lincoln's Birthday (observed)", + ), + ], + &mut map, + Country::US_IA, + "United States (Iowa)", + ); + + 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, 2, 12)?, "Lincoln's Birthday"), + ], + &mut map, + Country::US_IA, + "United States (Iowa)", + ); + + 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, 2, 12)?, "Lincoln's Birthday"), + ], + &mut map, + Country::US_IA, + "United States (Iowa)", + ); + + Ok(map) +} diff --git a/src/data/us_id.rs b/src/data/us_id.rs new file mode 100644 index 0000000..8d59ea1 --- /dev/null +++ b/src/data/us_id.rs @@ -0,0 +1,1006 @@ +//! United States (Idaho) +use super::*; + +/// Generate holiday map for United States (Idaho). +#[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, 2, 21)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2000, 10, 9)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2000, 1, 17)?, + "Martin Luther King Jr. Day", + ), + ], + &mut map, + Country::US_ID, + "United States (Idaho)", + ); + + 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, 2, 19)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2001, 10, 8)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2001, 1, 15)?, + "Martin Luther King Jr. Day", + ), + ], + &mut map, + Country::US_ID, + "United States (Idaho)", + ); + + 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, 2, 18)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2002, 10, 14)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2002, 1, 21)?, + "Martin Luther King Jr. Day", + ), + ], + &mut map, + Country::US_ID, + "United States (Idaho)", + ); + + 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, 2, 17)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2003, 10, 13)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2003, 1, 20)?, + "Martin Luther King Jr. Day", + ), + ], + &mut map, + Country::US_ID, + "United States (Idaho)", + ); + + 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, 2, 16)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2004, 10, 11)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2004, 1, 19)?, + "Martin Luther King Jr. Day", + ), + ], + &mut map, + Country::US_ID, + "United States (Idaho)", + ); + + 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, 2, 21)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2005, 10, 10)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2005, 1, 17)?, + "Martin Luther King Jr. Day", + ), + ], + &mut map, + Country::US_ID, + "United States (Idaho)", + ); + + 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, 2, 20)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2006, 10, 9)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2006, 1, 16)?, + "Martin Luther King Jr. / Idaho Human Rights Day", + ), + ], + &mut map, + Country::US_ID, + "United States (Idaho)", + ); + + 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, 2, 19)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2007, 10, 8)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2007, 1, 15)?, + "Martin Luther King Jr. / Idaho Human Rights Day", + ), + ], + &mut map, + Country::US_ID, + "United States (Idaho)", + ); + + 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, 2, 18)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2008, 10, 13)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2008, 1, 21)?, + "Martin Luther King Jr. / Idaho Human Rights Day", + ), + ], + &mut map, + Country::US_ID, + "United States (Idaho)", + ); + + 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, 2, 16)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2009, 10, 12)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2009, 1, 19)?, + "Martin Luther King Jr. / Idaho Human Rights Day", + ), + ], + &mut map, + Country::US_ID, + "United States (Idaho)", + ); + + 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, 2, 15)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2010, 10, 11)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2010, 1, 18)?, + "Martin Luther King Jr. / Idaho Human Rights Day", + ), + ], + &mut map, + Country::US_ID, + "United States (Idaho)", + ); + + 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, 2, 21)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2011, 10, 10)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2011, 1, 17)?, + "Martin Luther King Jr. / Idaho Human Rights Day", + ), + ], + &mut map, + Country::US_ID, + "United States (Idaho)", + ); + + 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, 2, 20)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2012, 10, 8)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2012, 1, 16)?, + "Martin Luther King Jr. / Idaho Human Rights Day", + ), + ], + &mut map, + Country::US_ID, + "United States (Idaho)", + ); + + 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, 2, 18)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2013, 10, 14)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2013, 1, 21)?, + "Martin Luther King Jr. / Idaho Human Rights Day", + ), + ], + &mut map, + Country::US_ID, + "United States (Idaho)", + ); + + 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, 2, 17)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2014, 10, 13)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2014, 1, 20)?, + "Martin Luther King Jr. / Idaho Human Rights Day", + ), + ], + &mut map, + Country::US_ID, + "United States (Idaho)", + ); + + 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, 2, 16)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2015, 10, 12)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2015, 1, 19)?, + "Martin Luther King Jr. / Idaho Human Rights Day", + ), + ], + &mut map, + Country::US_ID, + "United States (Idaho)", + ); + + 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, 2, 15)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2016, 10, 10)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2016, 1, 18)?, + "Martin Luther King Jr. / Idaho Human Rights Day", + ), + ], + &mut map, + Country::US_ID, + "United States (Idaho)", + ); + + 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, 2, 20)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2017, 10, 9)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2017, 1, 16)?, + "Martin Luther King Jr. / Idaho Human Rights Day", + ), + ], + &mut map, + Country::US_ID, + "United States (Idaho)", + ); + + 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, 2, 19)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2018, 10, 8)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2018, 1, 15)?, + "Martin Luther King Jr. / Idaho Human Rights Day", + ), + ], + &mut map, + Country::US_ID, + "United States (Idaho)", + ); + + 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, 2, 18)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2019, 10, 14)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2019, 1, 21)?, + "Martin Luther King Jr. / Idaho Human Rights Day", + ), + ], + &mut map, + Country::US_ID, + "United States (Idaho)", + ); + + 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, 2, 17)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2020, 10, 12)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2020, 1, 20)?, + "Martin Luther King Jr. / Idaho Human Rights Day", + ), + ], + &mut map, + Country::US_ID, + "United States (Idaho)", + ); + + 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, 2, 15)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2021, 10, 11)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2021, 1, 18)?, + "Martin Luther King Jr. / Idaho Human Rights Day", + ), + ], + &mut map, + Country::US_ID, + "United States (Idaho)", + ); + + 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, 2, 21)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2022, 10, 10)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2022, 1, 17)?, + "Martin Luther King Jr. / Idaho Human Rights Day", + ), + ], + &mut map, + Country::US_ID, + "United States (Idaho)", + ); + + 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, 2, 20)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2023, 10, 9)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2023, 1, 16)?, + "Martin Luther King Jr. / Idaho Human Rights Day", + ), + ], + &mut map, + Country::US_ID, + "United States (Idaho)", + ); + + 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, 2, 19)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2024, 10, 14)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2024, 1, 15)?, + "Martin Luther King Jr. / Idaho Human Rights Day", + ), + ], + &mut map, + Country::US_ID, + "United States (Idaho)", + ); + + 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, 2, 17)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2025, 10, 13)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2025, 1, 20)?, + "Martin Luther King Jr. / Idaho Human Rights Day", + ), + ], + &mut map, + Country::US_ID, + "United States (Idaho)", + ); + + 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, 2, 16)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2026, 10, 12)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2026, 1, 19)?, + "Martin Luther King Jr. / Idaho Human Rights Day", + ), + ], + &mut map, + Country::US_ID, + "United States (Idaho)", + ); + + 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, 2, 15)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2027, 10, 11)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2027, 1, 18)?, + "Martin Luther King Jr. / Idaho Human Rights Day", + ), + ], + &mut map, + Country::US_ID, + "United States (Idaho)", + ); + + 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, 2, 21)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2028, 10, 9)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2028, 1, 17)?, + "Martin Luther King Jr. / Idaho Human Rights Day", + ), + ], + &mut map, + Country::US_ID, + "United States (Idaho)", + ); + + 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, 2, 19)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2029, 10, 8)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2029, 1, 15)?, + "Martin Luther King Jr. / Idaho Human Rights Day", + ), + ], + &mut map, + Country::US_ID, + "United States (Idaho)", + ); + + 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, 2, 18)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2030, 10, 14)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2030, 1, 21)?, + "Martin Luther King Jr. / Idaho Human Rights Day", + ), + ], + &mut map, + Country::US_ID, + "United States (Idaho)", + ); + + Ok(map) +} diff --git a/src/data/us_il.rs b/src/data/us_il.rs new file mode 100644 index 0000000..024d4fa --- /dev/null +++ b/src/data/us_il.rs @@ -0,0 +1,1116 @@ +//! United States (Illinois) +use super::*; + +/// Generate holiday map for United States (Illinois). +#[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"), + (NaiveDate::from_ymd_res(2000, 2, 12)?, "Lincoln's Birthday"), + ( + NaiveDate::from_ymd_res(2000, 2, 11)?, + "Lincoln's Birthday (observed)", + ), + (NaiveDate::from_ymd_res(2000, 3, 6)?, "Casimir Pulaski Day"), + ], + &mut map, + Country::US_IL, + "United States (Illinois)", + ); + + 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"), + (NaiveDate::from_ymd_res(2001, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2001, 3, 5)?, "Casimir Pulaski Day"), + ], + &mut map, + Country::US_IL, + "United States (Illinois)", + ); + + 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"), + (NaiveDate::from_ymd_res(2002, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2002, 3, 4)?, "Casimir Pulaski Day"), + ], + &mut map, + Country::US_IL, + "United States (Illinois)", + ); + + 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"), + (NaiveDate::from_ymd_res(2003, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2003, 3, 3)?, "Casimir Pulaski Day"), + ], + &mut map, + Country::US_IL, + "United States (Illinois)", + ); + + 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"), + (NaiveDate::from_ymd_res(2004, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2004, 3, 1)?, "Casimir Pulaski Day"), + ], + &mut map, + Country::US_IL, + "United States (Illinois)", + ); + + 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"), + (NaiveDate::from_ymd_res(2005, 2, 12)?, "Lincoln's Birthday"), + ( + NaiveDate::from_ymd_res(2005, 2, 11)?, + "Lincoln's Birthday (observed)", + ), + (NaiveDate::from_ymd_res(2005, 3, 7)?, "Casimir Pulaski Day"), + ], + &mut map, + Country::US_IL, + "United States (Illinois)", + ); + + 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"), + (NaiveDate::from_ymd_res(2006, 2, 12)?, "Lincoln's Birthday"), + ( + NaiveDate::from_ymd_res(2006, 2, 13)?, + "Lincoln's Birthday (observed)", + ), + (NaiveDate::from_ymd_res(2006, 3, 6)?, "Casimir Pulaski Day"), + ], + &mut map, + Country::US_IL, + "United States (Illinois)", + ); + + 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"), + (NaiveDate::from_ymd_res(2007, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2007, 3, 5)?, "Casimir Pulaski Day"), + ], + &mut map, + Country::US_IL, + "United States (Illinois)", + ); + + 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"), + (NaiveDate::from_ymd_res(2008, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2008, 3, 3)?, "Casimir Pulaski Day"), + (NaiveDate::from_ymd_res(2008, 11, 4)?, "Election Day"), + ], + &mut map, + Country::US_IL, + "United States (Illinois)", + ); + + 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"), + (NaiveDate::from_ymd_res(2009, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2009, 3, 2)?, "Casimir Pulaski Day"), + ], + &mut map, + Country::US_IL, + "United States (Illinois)", + ); + + 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"), + (NaiveDate::from_ymd_res(2010, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2010, 3, 1)?, "Casimir Pulaski Day"), + (NaiveDate::from_ymd_res(2010, 11, 2)?, "Election Day"), + ], + &mut map, + Country::US_IL, + "United States (Illinois)", + ); + + 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"), + (NaiveDate::from_ymd_res(2011, 2, 12)?, "Lincoln's Birthday"), + ( + NaiveDate::from_ymd_res(2011, 2, 11)?, + "Lincoln's Birthday (observed)", + ), + (NaiveDate::from_ymd_res(2011, 3, 7)?, "Casimir Pulaski Day"), + ], + &mut map, + Country::US_IL, + "United States (Illinois)", + ); + + 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"), + (NaiveDate::from_ymd_res(2012, 2, 12)?, "Lincoln's Birthday"), + ( + NaiveDate::from_ymd_res(2012, 2, 13)?, + "Lincoln's Birthday (observed)", + ), + (NaiveDate::from_ymd_res(2012, 3, 5)?, "Casimir Pulaski Day"), + (NaiveDate::from_ymd_res(2012, 11, 6)?, "Election Day"), + ], + &mut map, + Country::US_IL, + "United States (Illinois)", + ); + + 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"), + (NaiveDate::from_ymd_res(2013, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2013, 3, 4)?, "Casimir Pulaski Day"), + ], + &mut map, + Country::US_IL, + "United States (Illinois)", + ); + + 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"), + (NaiveDate::from_ymd_res(2014, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2014, 3, 3)?, "Casimir Pulaski Day"), + (NaiveDate::from_ymd_res(2014, 11, 4)?, "Election Day"), + ], + &mut map, + Country::US_IL, + "United States (Illinois)", + ); + + 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"), + (NaiveDate::from_ymd_res(2015, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2015, 3, 2)?, "Casimir Pulaski Day"), + ], + &mut map, + Country::US_IL, + "United States (Illinois)", + ); + + 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"), + (NaiveDate::from_ymd_res(2016, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2016, 3, 7)?, "Casimir Pulaski Day"), + (NaiveDate::from_ymd_res(2016, 11, 8)?, "Election Day"), + ], + &mut map, + Country::US_IL, + "United States (Illinois)", + ); + + 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"), + (NaiveDate::from_ymd_res(2017, 2, 12)?, "Lincoln's Birthday"), + ( + NaiveDate::from_ymd_res(2017, 2, 13)?, + "Lincoln's Birthday (observed)", + ), + (NaiveDate::from_ymd_res(2017, 3, 6)?, "Casimir Pulaski Day"), + ], + &mut map, + Country::US_IL, + "United States (Illinois)", + ); + + 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"), + (NaiveDate::from_ymd_res(2018, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2018, 3, 5)?, "Casimir Pulaski Day"), + (NaiveDate::from_ymd_res(2018, 11, 6)?, "Election Day"), + ], + &mut map, + Country::US_IL, + "United States (Illinois)", + ); + + 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"), + (NaiveDate::from_ymd_res(2019, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2019, 3, 4)?, "Casimir Pulaski Day"), + ], + &mut map, + Country::US_IL, + "United States (Illinois)", + ); + + 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"), + (NaiveDate::from_ymd_res(2020, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2020, 3, 2)?, "Casimir Pulaski Day"), + (NaiveDate::from_ymd_res(2020, 11, 3)?, "Election Day"), + ], + &mut map, + Country::US_IL, + "United States (Illinois)", + ); + + 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"), + (NaiveDate::from_ymd_res(2021, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2021, 3, 1)?, "Casimir Pulaski Day"), + ], + &mut map, + Country::US_IL, + "United States (Illinois)", + ); + + 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"), + (NaiveDate::from_ymd_res(2022, 2, 12)?, "Lincoln's Birthday"), + ( + NaiveDate::from_ymd_res(2022, 2, 11)?, + "Lincoln's Birthday (observed)", + ), + (NaiveDate::from_ymd_res(2022, 3, 7)?, "Casimir Pulaski Day"), + (NaiveDate::from_ymd_res(2022, 11, 8)?, "Election Day"), + ], + &mut map, + Country::US_IL, + "United States (Illinois)", + ); + + 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"), + (NaiveDate::from_ymd_res(2023, 2, 12)?, "Lincoln's Birthday"), + ( + NaiveDate::from_ymd_res(2023, 2, 13)?, + "Lincoln's Birthday (observed)", + ), + (NaiveDate::from_ymd_res(2023, 3, 6)?, "Casimir Pulaski Day"), + ], + &mut map, + Country::US_IL, + "United States (Illinois)", + ); + + 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"), + (NaiveDate::from_ymd_res(2024, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2024, 3, 4)?, "Casimir Pulaski Day"), + (NaiveDate::from_ymd_res(2024, 11, 5)?, "Election Day"), + ], + &mut map, + Country::US_IL, + "United States (Illinois)", + ); + + 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"), + (NaiveDate::from_ymd_res(2025, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2025, 3, 3)?, "Casimir Pulaski Day"), + ], + &mut map, + Country::US_IL, + "United States (Illinois)", + ); + + 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"), + (NaiveDate::from_ymd_res(2026, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2026, 3, 2)?, "Casimir Pulaski Day"), + (NaiveDate::from_ymd_res(2026, 11, 3)?, "Election Day"), + ], + &mut map, + Country::US_IL, + "United States (Illinois)", + ); + + 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"), + (NaiveDate::from_ymd_res(2027, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2027, 3, 1)?, "Casimir Pulaski Day"), + ], + &mut map, + Country::US_IL, + "United States (Illinois)", + ); + + 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"), + (NaiveDate::from_ymd_res(2028, 2, 12)?, "Lincoln's Birthday"), + ( + NaiveDate::from_ymd_res(2028, 2, 11)?, + "Lincoln's Birthday (observed)", + ), + (NaiveDate::from_ymd_res(2028, 3, 6)?, "Casimir Pulaski Day"), + (NaiveDate::from_ymd_res(2028, 11, 7)?, "Election Day"), + ], + &mut map, + Country::US_IL, + "United States (Illinois)", + ); + + 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"), + (NaiveDate::from_ymd_res(2029, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2029, 3, 5)?, "Casimir Pulaski Day"), + ], + &mut map, + Country::US_IL, + "United States (Illinois)", + ); + + 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"), + (NaiveDate::from_ymd_res(2030, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2030, 3, 4)?, "Casimir Pulaski Day"), + (NaiveDate::from_ymd_res(2030, 11, 5)?, "Election Day"), + ], + &mut map, + Country::US_IL, + "United States (Illinois)", + ); + + Ok(map) +} diff --git a/src/data/us_in.rs b/src/data/us_in.rs new file mode 100644 index 0000000..79e59de --- /dev/null +++ b/src/data/us_in.rs @@ -0,0 +1,1099 @@ +//! United States (Indiana) +use super::*; + +/// Generate holiday map for United States (Indiana). +#[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"), + (NaiveDate::from_ymd_res(2000, 4, 21)?, "Good Friday"), + ], + &mut map, + Country::US_IN, + "United States (Indiana)", + ); + + 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"), + (NaiveDate::from_ymd_res(2001, 4, 13)?, "Good Friday"), + ], + &mut map, + Country::US_IN, + "United States (Indiana)", + ); + + 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"), + (NaiveDate::from_ymd_res(2002, 3, 29)?, "Good Friday"), + ], + &mut map, + Country::US_IN, + "United States (Indiana)", + ); + + 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"), + (NaiveDate::from_ymd_res(2003, 4, 18)?, "Good Friday"), + ], + &mut map, + Country::US_IN, + "United States (Indiana)", + ); + + 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"), + (NaiveDate::from_ymd_res(2004, 4, 9)?, "Good Friday"), + ], + &mut map, + Country::US_IN, + "United States (Indiana)", + ); + + 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"), + (NaiveDate::from_ymd_res(2005, 3, 25)?, "Good Friday"), + ], + &mut map, + Country::US_IN, + "United States (Indiana)", + ); + + 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"), + (NaiveDate::from_ymd_res(2006, 4, 14)?, "Good Friday"), + (NaiveDate::from_ymd_res(2006, 5, 2)?, "Primary Election Day"), + ], + &mut map, + Country::US_IN, + "United States (Indiana)", + ); + + 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"), + (NaiveDate::from_ymd_res(2007, 4, 6)?, "Good Friday"), + ], + &mut map, + Country::US_IN, + "United States (Indiana)", + ); + + 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"), + (NaiveDate::from_ymd_res(2008, 3, 21)?, "Good Friday"), + (NaiveDate::from_ymd_res(2008, 5, 6)?, "Primary Election Day"), + (NaiveDate::from_ymd_res(2008, 11, 4)?, "Election Day"), + ], + &mut map, + Country::US_IN, + "United States (Indiana)", + ); + + 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"), + (NaiveDate::from_ymd_res(2009, 4, 10)?, "Good Friday"), + ], + &mut map, + Country::US_IN, + "United States (Indiana)", + ); + + 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"), + (NaiveDate::from_ymd_res(2010, 4, 2)?, "Good Friday"), + (NaiveDate::from_ymd_res(2010, 5, 4)?, "Primary Election Day"), + (NaiveDate::from_ymd_res(2010, 11, 2)?, "Election Day"), + (NaiveDate::from_ymd_res(2010, 11, 26)?, "Lincoln's Birthday"), + ], + &mut map, + Country::US_IN, + "United States (Indiana)", + ); + + 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"), + (NaiveDate::from_ymd_res(2011, 4, 22)?, "Good Friday"), + (NaiveDate::from_ymd_res(2011, 11, 25)?, "Lincoln's Birthday"), + ], + &mut map, + Country::US_IN, + "United States (Indiana)", + ); + + 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"), + (NaiveDate::from_ymd_res(2012, 4, 6)?, "Good Friday"), + (NaiveDate::from_ymd_res(2012, 5, 8)?, "Primary Election Day"), + (NaiveDate::from_ymd_res(2012, 11, 6)?, "Election Day"), + (NaiveDate::from_ymd_res(2012, 11, 23)?, "Lincoln's Birthday"), + ], + &mut map, + Country::US_IN, + "United States (Indiana)", + ); + + 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"), + (NaiveDate::from_ymd_res(2013, 3, 29)?, "Good Friday"), + (NaiveDate::from_ymd_res(2013, 11, 29)?, "Lincoln's Birthday"), + ], + &mut map, + Country::US_IN, + "United States (Indiana)", + ); + + 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"), + (NaiveDate::from_ymd_res(2014, 4, 18)?, "Good Friday"), + (NaiveDate::from_ymd_res(2014, 5, 6)?, "Primary Election Day"), + (NaiveDate::from_ymd_res(2014, 11, 4)?, "Election Day"), + (NaiveDate::from_ymd_res(2014, 11, 28)?, "Lincoln's Birthday"), + ], + &mut map, + Country::US_IN, + "United States (Indiana)", + ); + + 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"), + (NaiveDate::from_ymd_res(2015, 4, 3)?, "Good Friday"), + (NaiveDate::from_ymd_res(2015, 5, 5)?, "Primary Election Day"), + (NaiveDate::from_ymd_res(2015, 11, 3)?, "Election Day"), + (NaiveDate::from_ymd_res(2015, 11, 27)?, "Lincoln's Birthday"), + ], + &mut map, + Country::US_IN, + "United States (Indiana)", + ); + + 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"), + (NaiveDate::from_ymd_res(2016, 3, 25)?, "Good Friday"), + (NaiveDate::from_ymd_res(2016, 5, 3)?, "Primary Election Day"), + (NaiveDate::from_ymd_res(2016, 11, 8)?, "Election Day"), + (NaiveDate::from_ymd_res(2016, 11, 25)?, "Lincoln's Birthday"), + ], + &mut map, + Country::US_IN, + "United States (Indiana)", + ); + + 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"), + (NaiveDate::from_ymd_res(2017, 4, 14)?, "Good Friday"), + (NaiveDate::from_ymd_res(2017, 5, 2)?, "Primary Election Day"), + (NaiveDate::from_ymd_res(2017, 11, 7)?, "Election Day"), + (NaiveDate::from_ymd_res(2017, 11, 24)?, "Lincoln's Birthday"), + ], + &mut map, + Country::US_IN, + "United States (Indiana)", + ); + + 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"), + (NaiveDate::from_ymd_res(2018, 3, 30)?, "Good Friday"), + (NaiveDate::from_ymd_res(2018, 5, 8)?, "Primary Election Day"), + (NaiveDate::from_ymd_res(2018, 11, 6)?, "Election Day"), + (NaiveDate::from_ymd_res(2018, 11, 23)?, "Lincoln's Birthday"), + ], + &mut map, + Country::US_IN, + "United States (Indiana)", + ); + + 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"), + (NaiveDate::from_ymd_res(2019, 4, 19)?, "Good Friday"), + (NaiveDate::from_ymd_res(2019, 5, 7)?, "Primary Election Day"), + (NaiveDate::from_ymd_res(2019, 11, 5)?, "Election Day"), + (NaiveDate::from_ymd_res(2019, 11, 29)?, "Lincoln's Birthday"), + ], + &mut map, + Country::US_IN, + "United States (Indiana)", + ); + + 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"), + (NaiveDate::from_ymd_res(2020, 4, 10)?, "Good Friday"), + (NaiveDate::from_ymd_res(2020, 5, 5)?, "Primary Election Day"), + (NaiveDate::from_ymd_res(2020, 11, 3)?, "Election Day"), + (NaiveDate::from_ymd_res(2020, 11, 27)?, "Lincoln's Birthday"), + ], + &mut map, + Country::US_IN, + "United States (Indiana)", + ); + + 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"), + (NaiveDate::from_ymd_res(2021, 4, 2)?, "Good Friday"), + (NaiveDate::from_ymd_res(2021, 5, 4)?, "Primary Election Day"), + (NaiveDate::from_ymd_res(2021, 11, 2)?, "Election Day"), + (NaiveDate::from_ymd_res(2021, 11, 26)?, "Lincoln's Birthday"), + ], + &mut map, + Country::US_IN, + "United States (Indiana)", + ); + + 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"), + (NaiveDate::from_ymd_res(2022, 4, 15)?, "Good Friday"), + (NaiveDate::from_ymd_res(2022, 5, 3)?, "Primary Election Day"), + (NaiveDate::from_ymd_res(2022, 11, 8)?, "Election Day"), + (NaiveDate::from_ymd_res(2022, 11, 25)?, "Lincoln's Birthday"), + ], + &mut map, + Country::US_IN, + "United States (Indiana)", + ); + + 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"), + (NaiveDate::from_ymd_res(2023, 4, 7)?, "Good Friday"), + (NaiveDate::from_ymd_res(2023, 5, 2)?, "Primary Election Day"), + (NaiveDate::from_ymd_res(2023, 11, 7)?, "Election Day"), + (NaiveDate::from_ymd_res(2023, 11, 24)?, "Lincoln's Birthday"), + ], + &mut map, + Country::US_IN, + "United States (Indiana)", + ); + + 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"), + (NaiveDate::from_ymd_res(2024, 3, 29)?, "Good Friday"), + (NaiveDate::from_ymd_res(2024, 5, 7)?, "Primary Election Day"), + (NaiveDate::from_ymd_res(2024, 11, 5)?, "Election Day"), + (NaiveDate::from_ymd_res(2024, 11, 29)?, "Lincoln's Birthday"), + ], + &mut map, + Country::US_IN, + "United States (Indiana)", + ); + + 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"), + (NaiveDate::from_ymd_res(2025, 4, 18)?, "Good Friday"), + (NaiveDate::from_ymd_res(2025, 5, 6)?, "Primary Election Day"), + (NaiveDate::from_ymd_res(2025, 11, 4)?, "Election Day"), + (NaiveDate::from_ymd_res(2025, 11, 28)?, "Lincoln's Birthday"), + ], + &mut map, + Country::US_IN, + "United States (Indiana)", + ); + + 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"), + (NaiveDate::from_ymd_res(2026, 4, 3)?, "Good Friday"), + (NaiveDate::from_ymd_res(2026, 5, 5)?, "Primary Election Day"), + (NaiveDate::from_ymd_res(2026, 11, 3)?, "Election Day"), + (NaiveDate::from_ymd_res(2026, 11, 27)?, "Lincoln's Birthday"), + ], + &mut map, + Country::US_IN, + "United States (Indiana)", + ); + + 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"), + (NaiveDate::from_ymd_res(2027, 3, 26)?, "Good Friday"), + (NaiveDate::from_ymd_res(2027, 5, 4)?, "Primary Election Day"), + (NaiveDate::from_ymd_res(2027, 11, 2)?, "Election Day"), + (NaiveDate::from_ymd_res(2027, 11, 26)?, "Lincoln's Birthday"), + ], + &mut map, + Country::US_IN, + "United States (Indiana)", + ); + + 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"), + (NaiveDate::from_ymd_res(2028, 4, 14)?, "Good Friday"), + (NaiveDate::from_ymd_res(2028, 5, 2)?, "Primary Election Day"), + (NaiveDate::from_ymd_res(2028, 11, 7)?, "Election Day"), + (NaiveDate::from_ymd_res(2028, 11, 24)?, "Lincoln's Birthday"), + ], + &mut map, + Country::US_IN, + "United States (Indiana)", + ); + + 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"), + (NaiveDate::from_ymd_res(2029, 3, 30)?, "Good Friday"), + (NaiveDate::from_ymd_res(2029, 5, 8)?, "Primary Election Day"), + (NaiveDate::from_ymd_res(2029, 11, 6)?, "Election Day"), + (NaiveDate::from_ymd_res(2029, 11, 23)?, "Lincoln's Birthday"), + ], + &mut map, + Country::US_IN, + "United States (Indiana)", + ); + + 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"), + (NaiveDate::from_ymd_res(2030, 4, 19)?, "Good Friday"), + (NaiveDate::from_ymd_res(2030, 5, 7)?, "Primary Election Day"), + (NaiveDate::from_ymd_res(2030, 11, 5)?, "Election Day"), + (NaiveDate::from_ymd_res(2030, 11, 29)?, "Lincoln's Birthday"), + ], + &mut map, + Country::US_IN, + "United States (Indiana)", + ); + + Ok(map) +} diff --git a/src/data/us_ks.rs b/src/data/us_ks.rs new file mode 100644 index 0000000..38b22f4 --- /dev/null +++ b/src/data/us_ks.rs @@ -0,0 +1,1019 @@ +//! United States (Kansas) +use super::*; + +/// Generate holiday map for United States (Kansas). +#[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", + ), + ], + &mut map, + Country::US_KS, + "United States (Kansas)", + ); + + 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", + ), + ], + &mut map, + Country::US_KS, + "United States (Kansas)", + ); + + 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", + ), + ], + &mut map, + Country::US_KS, + "United States (Kansas)", + ); + + 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", + ), + ], + &mut map, + Country::US_KS, + "United States (Kansas)", + ); + + 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", + ), + ], + &mut map, + Country::US_KS, + "United States (Kansas)", + ); + + 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", + ), + ], + &mut map, + Country::US_KS, + "United States (Kansas)", + ); + + 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", + ), + ], + &mut map, + Country::US_KS, + "United States (Kansas)", + ); + + 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", + ), + ], + &mut map, + Country::US_KS, + "United States (Kansas)", + ); + + 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", + ), + ], + &mut map, + Country::US_KS, + "United States (Kansas)", + ); + + 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", + ), + ], + &mut map, + Country::US_KS, + "United States (Kansas)", + ); + + 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", + ), + ], + &mut map, + Country::US_KS, + "United States (Kansas)", + ); + + 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", + ), + ], + &mut map, + Country::US_KS, + "United States (Kansas)", + ); + + 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", + ), + ], + &mut map, + Country::US_KS, + "United States (Kansas)", + ); + + 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, 12, 24)?, "Christmas Eve"), + ], + &mut map, + Country::US_KS, + "United States (Kansas)", + ); + + 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, 12, 24)?, "Christmas Eve"), + ], + &mut map, + Country::US_KS, + "United States (Kansas)", + ); + + 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, 12, 24)?, "Christmas Eve"), + ], + &mut map, + Country::US_KS, + "United States (Kansas)", + ); + + 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, 12, 24)?, "Christmas Eve"), + ( + NaiveDate::from_ymd_res(2016, 12, 23)?, + "Christmas Eve (observed)", + ), + ], + &mut map, + Country::US_KS, + "United States (Kansas)", + ); + + 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, 12, 24)?, "Christmas Eve"), + ( + NaiveDate::from_ymd_res(2017, 12, 22)?, + "Christmas Eve (observed)", + ), + ], + &mut map, + Country::US_KS, + "United States (Kansas)", + ); + + 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, 12, 24)?, "Christmas Eve"), + ], + &mut map, + Country::US_KS, + "United States (Kansas)", + ); + + 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, 12, 24)?, "Christmas Eve"), + ], + &mut map, + Country::US_KS, + "United States (Kansas)", + ); + + 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, 12, 24)?, "Christmas Eve"), + ], + &mut map, + Country::US_KS, + "United States (Kansas)", + ); + + 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); Christmas Eve", + ), + ( + 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, 12, 23)?, + "Christmas Eve (observed)", + ), + ], + &mut map, + Country::US_KS, + "United States (Kansas)", + ); + + 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, 12, 24)?, "Christmas Eve"), + ( + NaiveDate::from_ymd_res(2022, 12, 23)?, + "Christmas Eve (observed)", + ), + ], + &mut map, + Country::US_KS, + "United States (Kansas)", + ); + + 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, 12, 24)?, "Christmas Eve"), + ( + NaiveDate::from_ymd_res(2023, 12, 22)?, + "Christmas Eve (observed)", + ), + ], + &mut map, + Country::US_KS, + "United States (Kansas)", + ); + + 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, 12, 24)?, "Christmas Eve"), + ], + &mut map, + Country::US_KS, + "United States (Kansas)", + ); + + 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, 12, 24)?, "Christmas Eve"), + ], + &mut map, + Country::US_KS, + "United States (Kansas)", + ); + + 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, 12, 24)?, "Christmas Eve"), + ], + &mut map, + Country::US_KS, + "United States (Kansas)", + ); + + 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); Christmas Eve", + ), + ( + 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, 12, 23)?, + "Christmas Eve (observed)", + ), + ], + &mut map, + Country::US_KS, + "United States (Kansas)", + ); + + 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, 12, 24)?, "Christmas Eve"), + ( + NaiveDate::from_ymd_res(2028, 12, 22)?, + "Christmas Eve (observed)", + ), + ], + &mut map, + Country::US_KS, + "United States (Kansas)", + ); + + 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, 12, 24)?, "Christmas Eve"), + ], + &mut map, + Country::US_KS, + "United States (Kansas)", + ); + + 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, 12, 24)?, "Christmas Eve"), + ], + &mut map, + Country::US_KS, + "United States (Kansas)", + ); + + Ok(map) +} diff --git a/src/data/us_ky.rs b/src/data/us_ky.rs new file mode 100644 index 0000000..db830ce --- /dev/null +++ b/src/data/us_ky.rs @@ -0,0 +1,1030 @@ +//! United States (Kentucky) +use super::*; + +/// Generate holiday map for United States (Kentucky). +#[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, 4, 21)?, "Good Friday"), + ], + &mut map, + Country::US_KY, + "United States (Kentucky)", + ); + + 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, 4, 13)?, "Good Friday"), + ], + &mut map, + Country::US_KY, + "United States (Kentucky)", + ); + + 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, 3, 29)?, "Good Friday"), + ], + &mut map, + Country::US_KY, + "United States (Kentucky)", + ); + + 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, 4, 18)?, "Good Friday"), + ], + &mut map, + Country::US_KY, + "United States (Kentucky)", + ); + + 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, 4, 9)?, "Good Friday"), + ], + &mut map, + Country::US_KY, + "United States (Kentucky)", + ); + + 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, 3, 25)?, "Good Friday"), + ], + &mut map, + Country::US_KY, + "United States (Kentucky)", + ); + + 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, 4, 14)?, "Good Friday"), + ], + &mut map, + Country::US_KY, + "United States (Kentucky)", + ); + + 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, 4, 6)?, "Good Friday"), + ], + &mut map, + Country::US_KY, + "United States (Kentucky)", + ); + + 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, 3, 21)?, "Good Friday"), + ], + &mut map, + Country::US_KY, + "United States (Kentucky)", + ); + + 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, 4, 10)?, "Good Friday"), + ], + &mut map, + Country::US_KY, + "United States (Kentucky)", + ); + + 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, 4, 2)?, "Good Friday"), + ], + &mut map, + Country::US_KY, + "United States (Kentucky)", + ); + + 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, 4, 22)?, "Good Friday"), + ], + &mut map, + Country::US_KY, + "United States (Kentucky)", + ); + + 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, 4, 6)?, "Good Friday"), + ], + &mut map, + Country::US_KY, + "United States (Kentucky)", + ); + + 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, 3, 29)?, "Good Friday"), + (NaiveDate::from_ymd_res(2013, 12, 31)?, "New Year's Eve"), + ], + &mut map, + Country::US_KY, + "United States (Kentucky)", + ); + + 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, 4, 18)?, "Good Friday"), + (NaiveDate::from_ymd_res(2014, 12, 31)?, "New Year's Eve"), + ], + &mut map, + Country::US_KY, + "United States (Kentucky)", + ); + + 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, 4, 3)?, "Good Friday"), + (NaiveDate::from_ymd_res(2015, 12, 31)?, "New Year's Eve"), + ], + &mut map, + Country::US_KY, + "United States (Kentucky)", + ); + + 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, 3, 25)?, "Good Friday"), + (NaiveDate::from_ymd_res(2016, 12, 31)?, "New Year's Eve"), + ( + NaiveDate::from_ymd_res(2016, 12, 30)?, + "New Year's Eve (observed)", + ), + ], + &mut map, + Country::US_KY, + "United States (Kentucky)", + ); + + 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, 4, 14)?, "Good Friday"), + (NaiveDate::from_ymd_res(2017, 12, 31)?, "New Year's Eve"), + ], + &mut map, + Country::US_KY, + "United States (Kentucky)", + ); + + 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, 3, 30)?, "Good Friday"), + (NaiveDate::from_ymd_res(2018, 12, 31)?, "New Year's Eve"), + ], + &mut map, + Country::US_KY, + "United States (Kentucky)", + ); + + 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, 4, 19)?, "Good Friday"), + (NaiveDate::from_ymd_res(2019, 12, 31)?, "New Year's Eve"), + ], + &mut map, + Country::US_KY, + "United States (Kentucky)", + ); + + 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, 4, 10)?, "Good Friday"), + (NaiveDate::from_ymd_res(2020, 12, 31)?, "New Year's Eve"), + ], + &mut map, + Country::US_KY, + "United States (Kentucky)", + ); + + 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); New Year's Eve", + ), + (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, 4, 2)?, "Good Friday"), + ], + &mut map, + Country::US_KY, + "United States (Kentucky)", + ); + + 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, 4, 15)?, "Good Friday"), + (NaiveDate::from_ymd_res(2022, 12, 31)?, "New Year's Eve"), + ( + NaiveDate::from_ymd_res(2022, 12, 30)?, + "New Year's Eve (observed)", + ), + ], + &mut map, + Country::US_KY, + "United States (Kentucky)", + ); + + 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, 4, 7)?, "Good Friday"), + (NaiveDate::from_ymd_res(2023, 12, 31)?, "New Year's Eve"), + ], + &mut map, + Country::US_KY, + "United States (Kentucky)", + ); + + 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, 3, 29)?, "Good Friday"), + (NaiveDate::from_ymd_res(2024, 12, 31)?, "New Year's Eve"), + ], + &mut map, + Country::US_KY, + "United States (Kentucky)", + ); + + 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, 4, 18)?, "Good Friday"), + (NaiveDate::from_ymd_res(2025, 12, 31)?, "New Year's Eve"), + ], + &mut map, + Country::US_KY, + "United States (Kentucky)", + ); + + 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, 4, 3)?, "Good Friday"), + (NaiveDate::from_ymd_res(2026, 12, 31)?, "New Year's Eve"), + ], + &mut map, + Country::US_KY, + "United States (Kentucky)", + ); + + 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); New Year's Eve", + ), + (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, 3, 26)?, "Good Friday"), + ], + &mut map, + Country::US_KY, + "United States (Kentucky)", + ); + + 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, 4, 14)?, "Good Friday"), + (NaiveDate::from_ymd_res(2028, 12, 31)?, "New Year's Eve"), + ], + &mut map, + Country::US_KY, + "United States (Kentucky)", + ); + + 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, 3, 30)?, "Good Friday"), + (NaiveDate::from_ymd_res(2029, 12, 31)?, "New Year's Eve"), + ], + &mut map, + Country::US_KY, + "United States (Kentucky)", + ); + + 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, 4, 19)?, "Good Friday"), + (NaiveDate::from_ymd_res(2030, 12, 31)?, "New Year's Eve"), + ], + &mut map, + Country::US_KY, + "United States (Kentucky)", + ); + + Ok(map) +} diff --git a/src/data/us_la.rs b/src/data/us_la.rs new file mode 100644 index 0000000..f3a6c19 --- /dev/null +++ b/src/data/us_la.rs @@ -0,0 +1,1056 @@ +//! United States (Louisiana) +use super::*; + +/// Generate holiday map for United States (Louisiana). +#[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, 3, 7)?, "Mardi Gras"), + (NaiveDate::from_ymd_res(2000, 4, 21)?, "Good Friday"), + ], + &mut map, + Country::US_LA, + "United States (Louisiana)", + ); + + 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, 1, 20)?, "Inauguration Day"), + (NaiveDate::from_ymd_res(2001, 2, 27)?, "Mardi Gras"), + (NaiveDate::from_ymd_res(2001, 4, 13)?, "Good Friday"), + ], + &mut map, + Country::US_LA, + "United States (Louisiana)", + ); + + 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, 2, 12)?, "Mardi Gras"), + (NaiveDate::from_ymd_res(2002, 3, 29)?, "Good Friday"), + ], + &mut map, + Country::US_LA, + "United States (Louisiana)", + ); + + 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, 3, 4)?, "Mardi Gras"), + (NaiveDate::from_ymd_res(2003, 4, 18)?, "Good Friday"), + ], + &mut map, + Country::US_LA, + "United States (Louisiana)", + ); + + 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, 2, 24)?, "Mardi Gras"), + (NaiveDate::from_ymd_res(2004, 4, 9)?, "Good Friday"), + ], + &mut map, + Country::US_LA, + "United States (Louisiana)", + ); + + 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, 1, 20)?, "Inauguration Day"), + (NaiveDate::from_ymd_res(2005, 2, 8)?, "Mardi Gras"), + (NaiveDate::from_ymd_res(2005, 3, 25)?, "Good Friday"), + ], + &mut map, + Country::US_LA, + "United States (Louisiana)", + ); + + 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, 2, 28)?, "Mardi Gras"), + (NaiveDate::from_ymd_res(2006, 4, 14)?, "Good Friday"), + ], + &mut map, + Country::US_LA, + "United States (Louisiana)", + ); + + 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, 2, 20)?, "Mardi Gras"), + (NaiveDate::from_ymd_res(2007, 4, 6)?, "Good Friday"), + ], + &mut map, + Country::US_LA, + "United States (Louisiana)", + ); + + 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, 2, 5)?, "Mardi Gras"), + (NaiveDate::from_ymd_res(2008, 3, 21)?, "Good Friday"), + (NaiveDate::from_ymd_res(2008, 11, 4)?, "Election Day"), + ], + &mut map, + Country::US_LA, + "United States (Louisiana)", + ); + + 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, 1, 20)?, "Inauguration Day"), + (NaiveDate::from_ymd_res(2009, 2, 24)?, "Mardi Gras"), + (NaiveDate::from_ymd_res(2009, 4, 10)?, "Good Friday"), + ], + &mut map, + Country::US_LA, + "United States (Louisiana)", + ); + + 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, 2, 16)?, "Mardi Gras"), + (NaiveDate::from_ymd_res(2010, 4, 2)?, "Good Friday"), + (NaiveDate::from_ymd_res(2010, 11, 2)?, "Election Day"), + ], + &mut map, + Country::US_LA, + "United States (Louisiana)", + ); + + 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, 3, 8)?, "Mardi Gras"), + (NaiveDate::from_ymd_res(2011, 4, 22)?, "Good Friday"), + ], + &mut map, + Country::US_LA, + "United States (Louisiana)", + ); + + 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, 2, 21)?, "Mardi Gras"), + (NaiveDate::from_ymd_res(2012, 4, 6)?, "Good Friday"), + (NaiveDate::from_ymd_res(2012, 11, 6)?, "Election Day"), + ], + &mut map, + Country::US_LA, + "United States (Louisiana)", + ); + + 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)?, + "Inauguration Day (observed); Martin Luther King Jr. Day", + ), + ( + NaiveDate::from_ymd_res(2013, 2, 18)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2013, 1, 20)?, "Inauguration Day"), + (NaiveDate::from_ymd_res(2013, 2, 12)?, "Mardi Gras"), + (NaiveDate::from_ymd_res(2013, 3, 29)?, "Good Friday"), + ], + &mut map, + Country::US_LA, + "United States (Louisiana)", + ); + + 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, 3, 4)?, "Mardi Gras"), + (NaiveDate::from_ymd_res(2014, 4, 18)?, "Good Friday"), + (NaiveDate::from_ymd_res(2014, 11, 4)?, "Election Day"), + ], + &mut map, + Country::US_LA, + "United States (Louisiana)", + ); + + 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, 2, 17)?, "Mardi Gras"), + (NaiveDate::from_ymd_res(2015, 4, 3)?, "Good Friday"), + ], + &mut map, + Country::US_LA, + "United States (Louisiana)", + ); + + 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, 2, 9)?, "Mardi Gras"), + (NaiveDate::from_ymd_res(2016, 3, 25)?, "Good Friday"), + (NaiveDate::from_ymd_res(2016, 11, 8)?, "Election Day"), + ], + &mut map, + Country::US_LA, + "United States (Louisiana)", + ); + + 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, 1, 20)?, "Inauguration Day"), + (NaiveDate::from_ymd_res(2017, 2, 28)?, "Mardi Gras"), + (NaiveDate::from_ymd_res(2017, 4, 14)?, "Good Friday"), + ], + &mut map, + Country::US_LA, + "United States (Louisiana)", + ); + + 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, 2, 13)?, "Mardi Gras"), + (NaiveDate::from_ymd_res(2018, 3, 30)?, "Good Friday"), + (NaiveDate::from_ymd_res(2018, 11, 6)?, "Election Day"), + ], + &mut map, + Country::US_LA, + "United States (Louisiana)", + ); + + 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, 3, 5)?, "Mardi Gras"), + (NaiveDate::from_ymd_res(2019, 4, 19)?, "Good Friday"), + ], + &mut map, + Country::US_LA, + "United States (Louisiana)", + ); + + 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, 2, 25)?, "Mardi Gras"), + (NaiveDate::from_ymd_res(2020, 4, 10)?, "Good Friday"), + (NaiveDate::from_ymd_res(2020, 11, 3)?, "Election Day"), + ], + &mut map, + Country::US_LA, + "United States (Louisiana)", + ); + + 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, 1, 20)?, "Inauguration Day"), + (NaiveDate::from_ymd_res(2021, 2, 16)?, "Mardi Gras"), + (NaiveDate::from_ymd_res(2021, 4, 2)?, "Good Friday"), + ], + &mut map, + Country::US_LA, + "United States (Louisiana)", + ); + + 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, 3, 1)?, "Mardi Gras"), + (NaiveDate::from_ymd_res(2022, 4, 15)?, "Good Friday"), + (NaiveDate::from_ymd_res(2022, 11, 8)?, "Election Day"), + ], + &mut map, + Country::US_LA, + "United States (Louisiana)", + ); + + 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, 2, 21)?, "Mardi Gras"), + (NaiveDate::from_ymd_res(2023, 4, 7)?, "Good Friday"), + ], + &mut map, + Country::US_LA, + "United States (Louisiana)", + ); + + 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, 2, 13)?, "Mardi Gras"), + (NaiveDate::from_ymd_res(2024, 3, 29)?, "Good Friday"), + (NaiveDate::from_ymd_res(2024, 11, 5)?, "Election Day"), + ], + &mut map, + Country::US_LA, + "United States (Louisiana)", + ); + + 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)?, + "Inauguration Day; Martin Luther King Jr. Day", + ), + ( + NaiveDate::from_ymd_res(2025, 2, 17)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2025, 3, 4)?, "Mardi Gras"), + (NaiveDate::from_ymd_res(2025, 4, 18)?, "Good Friday"), + ], + &mut map, + Country::US_LA, + "United States (Louisiana)", + ); + + 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, 2, 17)?, "Mardi Gras"), + (NaiveDate::from_ymd_res(2026, 4, 3)?, "Good Friday"), + (NaiveDate::from_ymd_res(2026, 11, 3)?, "Election Day"), + ], + &mut map, + Country::US_LA, + "United States (Louisiana)", + ); + + 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, 2, 9)?, "Mardi Gras"), + (NaiveDate::from_ymd_res(2027, 3, 26)?, "Good Friday"), + ], + &mut map, + Country::US_LA, + "United States (Louisiana)", + ); + + 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, 2, 29)?, "Mardi Gras"), + (NaiveDate::from_ymd_res(2028, 4, 14)?, "Good Friday"), + (NaiveDate::from_ymd_res(2028, 11, 7)?, "Election Day"), + ], + &mut map, + Country::US_LA, + "United States (Louisiana)", + ); + + 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, 1, 20)?, "Inauguration Day"), + (NaiveDate::from_ymd_res(2029, 2, 13)?, "Mardi Gras"), + (NaiveDate::from_ymd_res(2029, 3, 30)?, "Good Friday"), + ], + &mut map, + Country::US_LA, + "United States (Louisiana)", + ); + + 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, 3, 5)?, "Mardi Gras"), + (NaiveDate::from_ymd_res(2030, 4, 19)?, "Good Friday"), + (NaiveDate::from_ymd_res(2030, 11, 5)?, "Election Day"), + ], + &mut map, + Country::US_LA, + "United States (Louisiana)", + ); + + Ok(map) +} diff --git a/src/data/us_ma.rs b/src/data/us_ma.rs new file mode 100644 index 0000000..f8bab4f --- /dev/null +++ b/src/data/us_ma.rs @@ -0,0 +1,1108 @@ +//! United States (Massachusetts) +use super::*; + +/// Generate holiday map for United States (Massachusetts). +#[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"), + (NaiveDate::from_ymd_res(2000, 3, 17)?, "Evacuation Day"), + (NaiveDate::from_ymd_res(2000, 4, 17)?, "Patriots' Day"), + ], + &mut map, + Country::US_MA, + "United States (Massachusetts)", + ); + + 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"), + (NaiveDate::from_ymd_res(2001, 3, 17)?, "Evacuation Day"), + ( + NaiveDate::from_ymd_res(2001, 3, 19)?, + "Evacuation Day (observed)", + ), + (NaiveDate::from_ymd_res(2001, 4, 16)?, "Patriots' Day"), + ], + &mut map, + Country::US_MA, + "United States (Massachusetts)", + ); + + 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"), + (NaiveDate::from_ymd_res(2002, 3, 17)?, "Evacuation Day"), + ( + NaiveDate::from_ymd_res(2002, 3, 18)?, + "Evacuation Day (observed)", + ), + (NaiveDate::from_ymd_res(2002, 4, 15)?, "Patriots' Day"), + ], + &mut map, + Country::US_MA, + "United States (Massachusetts)", + ); + + 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"), + (NaiveDate::from_ymd_res(2003, 3, 17)?, "Evacuation Day"), + (NaiveDate::from_ymd_res(2003, 4, 21)?, "Patriots' Day"), + ], + &mut map, + Country::US_MA, + "United States (Massachusetts)", + ); + + 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"), + (NaiveDate::from_ymd_res(2004, 3, 17)?, "Evacuation Day"), + (NaiveDate::from_ymd_res(2004, 4, 19)?, "Patriots' Day"), + ], + &mut map, + Country::US_MA, + "United States (Massachusetts)", + ); + + 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"), + (NaiveDate::from_ymd_res(2005, 3, 17)?, "Evacuation Day"), + (NaiveDate::from_ymd_res(2005, 4, 18)?, "Patriots' Day"), + ], + &mut map, + Country::US_MA, + "United States (Massachusetts)", + ); + + 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"), + (NaiveDate::from_ymd_res(2006, 3, 17)?, "Evacuation Day"), + (NaiveDate::from_ymd_res(2006, 4, 17)?, "Patriots' Day"), + ], + &mut map, + Country::US_MA, + "United States (Massachusetts)", + ); + + 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"), + (NaiveDate::from_ymd_res(2007, 3, 17)?, "Evacuation Day"), + ( + NaiveDate::from_ymd_res(2007, 3, 19)?, + "Evacuation Day (observed)", + ), + (NaiveDate::from_ymd_res(2007, 4, 16)?, "Patriots' Day"), + ], + &mut map, + Country::US_MA, + "United States (Massachusetts)", + ); + + 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"), + (NaiveDate::from_ymd_res(2008, 3, 17)?, "Evacuation Day"), + (NaiveDate::from_ymd_res(2008, 4, 21)?, "Patriots' Day"), + ], + &mut map, + Country::US_MA, + "United States (Massachusetts)", + ); + + 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"), + (NaiveDate::from_ymd_res(2009, 3, 17)?, "Evacuation Day"), + (NaiveDate::from_ymd_res(2009, 4, 20)?, "Patriots' Day"), + ], + &mut map, + Country::US_MA, + "United States (Massachusetts)", + ); + + 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"), + (NaiveDate::from_ymd_res(2010, 3, 17)?, "Evacuation Day"), + (NaiveDate::from_ymd_res(2010, 4, 19)?, "Patriots' Day"), + ], + &mut map, + Country::US_MA, + "United States (Massachusetts)", + ); + + 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"), + (NaiveDate::from_ymd_res(2011, 3, 17)?, "Evacuation Day"), + (NaiveDate::from_ymd_res(2011, 4, 18)?, "Patriots' Day"), + ], + &mut map, + Country::US_MA, + "United States (Massachusetts)", + ); + + 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"), + (NaiveDate::from_ymd_res(2012, 3, 17)?, "Evacuation Day"), + ( + NaiveDate::from_ymd_res(2012, 3, 19)?, + "Evacuation Day (observed)", + ), + (NaiveDate::from_ymd_res(2012, 4, 16)?, "Patriots' Day"), + ], + &mut map, + Country::US_MA, + "United States (Massachusetts)", + ); + + 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"), + (NaiveDate::from_ymd_res(2013, 3, 17)?, "Evacuation Day"), + ( + NaiveDate::from_ymd_res(2013, 3, 18)?, + "Evacuation Day (observed)", + ), + (NaiveDate::from_ymd_res(2013, 4, 15)?, "Patriots' Day"), + ], + &mut map, + Country::US_MA, + "United States (Massachusetts)", + ); + + 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"), + (NaiveDate::from_ymd_res(2014, 3, 17)?, "Evacuation Day"), + (NaiveDate::from_ymd_res(2014, 4, 21)?, "Patriots' Day"), + ], + &mut map, + Country::US_MA, + "United States (Massachusetts)", + ); + + 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"), + (NaiveDate::from_ymd_res(2015, 3, 17)?, "Evacuation Day"), + (NaiveDate::from_ymd_res(2015, 4, 20)?, "Patriots' Day"), + ], + &mut map, + Country::US_MA, + "United States (Massachusetts)", + ); + + 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"), + (NaiveDate::from_ymd_res(2016, 3, 17)?, "Evacuation Day"), + (NaiveDate::from_ymd_res(2016, 4, 18)?, "Patriots' Day"), + ], + &mut map, + Country::US_MA, + "United States (Massachusetts)", + ); + + 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"), + (NaiveDate::from_ymd_res(2017, 3, 17)?, "Evacuation Day"), + (NaiveDate::from_ymd_res(2017, 4, 17)?, "Patriots' Day"), + ], + &mut map, + Country::US_MA, + "United States (Massachusetts)", + ); + + 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"), + (NaiveDate::from_ymd_res(2018, 3, 17)?, "Evacuation Day"), + ( + NaiveDate::from_ymd_res(2018, 3, 19)?, + "Evacuation Day (observed)", + ), + (NaiveDate::from_ymd_res(2018, 4, 16)?, "Patriots' Day"), + ], + &mut map, + Country::US_MA, + "United States (Massachusetts)", + ); + + 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"), + (NaiveDate::from_ymd_res(2019, 3, 17)?, "Evacuation Day"), + ( + NaiveDate::from_ymd_res(2019, 3, 18)?, + "Evacuation Day (observed)", + ), + (NaiveDate::from_ymd_res(2019, 4, 15)?, "Patriots' Day"), + ], + &mut map, + Country::US_MA, + "United States (Massachusetts)", + ); + + 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"), + (NaiveDate::from_ymd_res(2020, 3, 17)?, "Evacuation Day"), + (NaiveDate::from_ymd_res(2020, 4, 20)?, "Patriots' Day"), + ], + &mut map, + Country::US_MA, + "United States (Massachusetts)", + ); + + 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"), + (NaiveDate::from_ymd_res(2021, 3, 17)?, "Evacuation Day"), + (NaiveDate::from_ymd_res(2021, 4, 19)?, "Patriots' Day"), + ], + &mut map, + Country::US_MA, + "United States (Massachusetts)", + ); + + 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"), + (NaiveDate::from_ymd_res(2022, 3, 17)?, "Evacuation Day"), + (NaiveDate::from_ymd_res(2022, 4, 18)?, "Patriots' Day"), + ], + &mut map, + Country::US_MA, + "United States (Massachusetts)", + ); + + 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"), + (NaiveDate::from_ymd_res(2023, 3, 17)?, "Evacuation Day"), + (NaiveDate::from_ymd_res(2023, 4, 17)?, "Patriots' Day"), + ], + &mut map, + Country::US_MA, + "United States (Massachusetts)", + ); + + 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"), + (NaiveDate::from_ymd_res(2024, 3, 17)?, "Evacuation Day"), + ( + NaiveDate::from_ymd_res(2024, 3, 18)?, + "Evacuation Day (observed)", + ), + (NaiveDate::from_ymd_res(2024, 4, 15)?, "Patriots' Day"), + ], + &mut map, + Country::US_MA, + "United States (Massachusetts)", + ); + + 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"), + (NaiveDate::from_ymd_res(2025, 3, 17)?, "Evacuation Day"), + (NaiveDate::from_ymd_res(2025, 4, 21)?, "Patriots' Day"), + ], + &mut map, + Country::US_MA, + "United States (Massachusetts)", + ); + + 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"), + (NaiveDate::from_ymd_res(2026, 3, 17)?, "Evacuation Day"), + (NaiveDate::from_ymd_res(2026, 4, 20)?, "Patriots' Day"), + ], + &mut map, + Country::US_MA, + "United States (Massachusetts)", + ); + + 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"), + (NaiveDate::from_ymd_res(2027, 3, 17)?, "Evacuation Day"), + (NaiveDate::from_ymd_res(2027, 4, 19)?, "Patriots' Day"), + ], + &mut map, + Country::US_MA, + "United States (Massachusetts)", + ); + + 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"), + (NaiveDate::from_ymd_res(2028, 3, 17)?, "Evacuation Day"), + (NaiveDate::from_ymd_res(2028, 4, 17)?, "Patriots' Day"), + ], + &mut map, + Country::US_MA, + "United States (Massachusetts)", + ); + + 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"), + (NaiveDate::from_ymd_res(2029, 3, 17)?, "Evacuation Day"), + ( + NaiveDate::from_ymd_res(2029, 3, 19)?, + "Evacuation Day (observed)", + ), + (NaiveDate::from_ymd_res(2029, 4, 16)?, "Patriots' Day"), + ], + &mut map, + Country::US_MA, + "United States (Massachusetts)", + ); + + 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"), + (NaiveDate::from_ymd_res(2030, 3, 17)?, "Evacuation Day"), + ( + NaiveDate::from_ymd_res(2030, 3, 18)?, + "Evacuation Day (observed)", + ), + (NaiveDate::from_ymd_res(2030, 4, 15)?, "Patriots' Day"), + ], + &mut map, + Country::US_MA, + "United States (Massachusetts)", + ); + + Ok(map) +} diff --git a/src/data/us_md.rs b/src/data/us_md.rs new file mode 100644 index 0000000..7bac95d --- /dev/null +++ b/src/data/us_md.rs @@ -0,0 +1,1105 @@ +//! United States (Maryland) +use super::*; + +/// Generate holiday map for United States (Maryland). +#[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_MD, + "United States (Maryland)", + ); + + 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"), + (NaiveDate::from_ymd_res(2001, 1, 20)?, "Inauguration Day"), + ], + &mut map, + Country::US_MD, + "United States (Maryland)", + ); + + 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_MD, + "United States (Maryland)", + ); + + 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_MD, + "United States (Maryland)", + ); + + 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_MD, + "United States (Maryland)", + ); + + 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"), + (NaiveDate::from_ymd_res(2005, 1, 20)?, "Inauguration Day"), + ], + &mut map, + Country::US_MD, + "United States (Maryland)", + ); + + 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_MD, + "United States (Maryland)", + ); + + 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_MD, + "United States (Maryland)", + ); + + 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"), + ( + NaiveDate::from_ymd_res(2008, 11, 28)?, + "American Indian Heritage Day", + ), + ], + &mut map, + Country::US_MD, + "United States (Maryland)", + ); + + 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"), + (NaiveDate::from_ymd_res(2009, 1, 20)?, "Inauguration Day"), + ( + NaiveDate::from_ymd_res(2009, 11, 27)?, + "American Indian Heritage Day", + ), + ], + &mut map, + Country::US_MD, + "United States (Maryland)", + ); + + 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"), + ( + NaiveDate::from_ymd_res(2010, 11, 26)?, + "American Indian Heritage Day", + ), + ], + &mut map, + Country::US_MD, + "United States (Maryland)", + ); + + 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"), + ( + NaiveDate::from_ymd_res(2011, 11, 25)?, + "American Indian Heritage Day", + ), + ], + &mut map, + Country::US_MD, + "United States (Maryland)", + ); + + 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"), + ( + NaiveDate::from_ymd_res(2012, 11, 23)?, + "American Indian Heritage Day", + ), + ], + &mut map, + Country::US_MD, + "United States (Maryland)", + ); + + 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)?, + "Inauguration Day (observed); Martin Luther King Jr. Day", + ), + ( + NaiveDate::from_ymd_res(2013, 2, 18)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2013, 10, 14)?, "Columbus Day"), + (NaiveDate::from_ymd_res(2013, 1, 20)?, "Inauguration Day"), + ( + NaiveDate::from_ymd_res(2013, 11, 29)?, + "American Indian Heritage Day", + ), + ], + &mut map, + Country::US_MD, + "United States (Maryland)", + ); + + 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"), + ( + NaiveDate::from_ymd_res(2014, 11, 28)?, + "American Indian Heritage Day", + ), + ], + &mut map, + Country::US_MD, + "United States (Maryland)", + ); + + 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"), + ( + NaiveDate::from_ymd_res(2015, 11, 27)?, + "American Indian Heritage Day", + ), + ], + &mut map, + Country::US_MD, + "United States (Maryland)", + ); + + 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"), + ( + NaiveDate::from_ymd_res(2016, 11, 25)?, + "American Indian Heritage Day", + ), + ], + &mut map, + Country::US_MD, + "United States (Maryland)", + ); + + 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"), + (NaiveDate::from_ymd_res(2017, 1, 20)?, "Inauguration Day"), + ( + NaiveDate::from_ymd_res(2017, 11, 24)?, + "American Indian Heritage Day", + ), + ], + &mut map, + Country::US_MD, + "United States (Maryland)", + ); + + 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"), + ( + NaiveDate::from_ymd_res(2018, 11, 23)?, + "American Indian Heritage Day", + ), + ], + &mut map, + Country::US_MD, + "United States (Maryland)", + ); + + 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"), + ( + NaiveDate::from_ymd_res(2019, 11, 29)?, + "American Indian Heritage Day", + ), + ], + &mut map, + Country::US_MD, + "United States (Maryland)", + ); + + 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"), + ( + NaiveDate::from_ymd_res(2020, 11, 27)?, + "American Indian Heritage Day", + ), + ], + &mut map, + Country::US_MD, + "United States (Maryland)", + ); + + 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"), + (NaiveDate::from_ymd_res(2021, 1, 20)?, "Inauguration Day"), + ( + NaiveDate::from_ymd_res(2021, 11, 26)?, + "American Indian Heritage Day", + ), + ], + &mut map, + Country::US_MD, + "United States (Maryland)", + ); + + 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"), + ( + NaiveDate::from_ymd_res(2022, 11, 25)?, + "American Indian Heritage Day", + ), + ], + &mut map, + Country::US_MD, + "United States (Maryland)", + ); + + 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"), + ( + NaiveDate::from_ymd_res(2023, 11, 24)?, + "American Indian Heritage Day", + ), + ], + &mut map, + Country::US_MD, + "United States (Maryland)", + ); + + 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"), + ( + NaiveDate::from_ymd_res(2024, 11, 29)?, + "American Indian Heritage Day", + ), + ], + &mut map, + Country::US_MD, + "United States (Maryland)", + ); + + 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)?, + "Inauguration Day; Martin Luther King Jr. Day", + ), + ( + NaiveDate::from_ymd_res(2025, 2, 17)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2025, 10, 13)?, "Columbus Day"), + ( + NaiveDate::from_ymd_res(2025, 11, 28)?, + "American Indian Heritage Day", + ), + ], + &mut map, + Country::US_MD, + "United States (Maryland)", + ); + + 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"), + ( + NaiveDate::from_ymd_res(2026, 11, 27)?, + "American Indian Heritage Day", + ), + ], + &mut map, + Country::US_MD, + "United States (Maryland)", + ); + + 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"), + ( + NaiveDate::from_ymd_res(2027, 11, 26)?, + "American Indian Heritage Day", + ), + ], + &mut map, + Country::US_MD, + "United States (Maryland)", + ); + + 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"), + ( + NaiveDate::from_ymd_res(2028, 11, 24)?, + "American Indian Heritage Day", + ), + ], + &mut map, + Country::US_MD, + "United States (Maryland)", + ); + + 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"), + (NaiveDate::from_ymd_res(2029, 1, 20)?, "Inauguration Day"), + ( + NaiveDate::from_ymd_res(2029, 11, 23)?, + "American Indian Heritage Day", + ), + ], + &mut map, + Country::US_MD, + "United States (Maryland)", + ); + + 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"), + ( + NaiveDate::from_ymd_res(2030, 11, 29)?, + "American Indian Heritage Day", + ), + ], + &mut map, + Country::US_MD, + "United States (Maryland)", + ); + + Ok(map) +} diff --git a/src/data/us_me.rs b/src/data/us_me.rs new file mode 100644 index 0000000..790b015 --- /dev/null +++ b/src/data/us_me.rs @@ -0,0 +1,1073 @@ +//! United States (Maine) +use super::*; + +/// Generate holiday map for United States (Maine). +#[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, 4, 17)?, "Patriots' Day"), + (NaiveDate::from_ymd_res(2000, 10, 9)?, "Columbus Day"), + ], + &mut map, + Country::US_ME, + "United States (Maine)", + ); + + 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, 4, 16)?, "Patriots' Day"), + (NaiveDate::from_ymd_res(2001, 10, 8)?, "Columbus Day"), + ], + &mut map, + Country::US_ME, + "United States (Maine)", + ); + + 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, 4, 15)?, "Patriots' Day"), + (NaiveDate::from_ymd_res(2002, 10, 14)?, "Columbus Day"), + ], + &mut map, + Country::US_ME, + "United States (Maine)", + ); + + 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, 4, 21)?, "Patriots' Day"), + (NaiveDate::from_ymd_res(2003, 10, 13)?, "Columbus Day"), + ], + &mut map, + Country::US_ME, + "United States (Maine)", + ); + + 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, 4, 19)?, "Patriots' Day"), + (NaiveDate::from_ymd_res(2004, 10, 11)?, "Columbus Day"), + ], + &mut map, + Country::US_ME, + "United States (Maine)", + ); + + 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, 4, 18)?, "Patriots' Day"), + (NaiveDate::from_ymd_res(2005, 10, 10)?, "Columbus Day"), + ], + &mut map, + Country::US_ME, + "United States (Maine)", + ); + + 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, 4, 17)?, "Patriots' Day"), + (NaiveDate::from_ymd_res(2006, 10, 9)?, "Columbus Day"), + ], + &mut map, + Country::US_ME, + "United States (Maine)", + ); + + 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, 4, 16)?, "Patriots' Day"), + (NaiveDate::from_ymd_res(2007, 10, 8)?, "Columbus Day"), + ], + &mut map, + Country::US_ME, + "United States (Maine)", + ); + + 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, 4, 21)?, "Patriots' Day"), + (NaiveDate::from_ymd_res(2008, 10, 13)?, "Columbus Day"), + ], + &mut map, + Country::US_ME, + "United States (Maine)", + ); + + 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, 4, 20)?, "Patriots' Day"), + (NaiveDate::from_ymd_res(2009, 10, 12)?, "Columbus Day"), + ], + &mut map, + Country::US_ME, + "United States (Maine)", + ); + + 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, 4, 19)?, "Patriots' Day"), + (NaiveDate::from_ymd_res(2010, 10, 11)?, "Columbus Day"), + ], + &mut map, + Country::US_ME, + "United States (Maine)", + ); + + 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, 4, 18)?, "Patriots' Day"), + (NaiveDate::from_ymd_res(2011, 10, 10)?, "Columbus Day"), + ], + &mut map, + Country::US_ME, + "United States (Maine)", + ); + + 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, 4, 16)?, "Patriots' Day"), + (NaiveDate::from_ymd_res(2012, 10, 8)?, "Columbus Day"), + ], + &mut map, + Country::US_ME, + "United States (Maine)", + ); + + 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, 4, 15)?, "Patriots' Day"), + (NaiveDate::from_ymd_res(2013, 10, 14)?, "Columbus Day"), + ], + &mut map, + Country::US_ME, + "United States (Maine)", + ); + + 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, 4, 21)?, "Patriots' Day"), + (NaiveDate::from_ymd_res(2014, 10, 13)?, "Columbus Day"), + ], + &mut map, + Country::US_ME, + "United States (Maine)", + ); + + 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, 4, 20)?, "Patriots' Day"), + (NaiveDate::from_ymd_res(2015, 10, 12)?, "Columbus Day"), + ], + &mut map, + Country::US_ME, + "United States (Maine)", + ); + + 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, 4, 18)?, "Patriots' Day"), + (NaiveDate::from_ymd_res(2016, 10, 10)?, "Columbus Day"), + ], + &mut map, + Country::US_ME, + "United States (Maine)", + ); + + 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, 4, 17)?, "Patriots' Day"), + (NaiveDate::from_ymd_res(2017, 10, 9)?, "Columbus Day"), + ], + &mut map, + Country::US_ME, + "United States (Maine)", + ); + + 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, 4, 16)?, "Patriots' Day"), + (NaiveDate::from_ymd_res(2018, 10, 8)?, "Columbus Day"), + ], + &mut map, + Country::US_ME, + "United States (Maine)", + ); + + 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, 4, 15)?, "Patriots' Day"), + ( + NaiveDate::from_ymd_res(2019, 10, 14)?, + "Indigenous Peoples' Day", + ), + ], + &mut map, + Country::US_ME, + "United States (Maine)", + ); + + 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, 4, 20)?, "Patriots' Day"), + ( + NaiveDate::from_ymd_res(2020, 10, 12)?, + "Indigenous Peoples' Day", + ), + ], + &mut map, + Country::US_ME, + "United States (Maine)", + ); + + 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, 4, 19)?, "Patriots' Day"), + ( + NaiveDate::from_ymd_res(2021, 10, 11)?, + "Indigenous Peoples' Day", + ), + ], + &mut map, + Country::US_ME, + "United States (Maine)", + ); + + 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, 4, 18)?, "Patriots' Day"), + ( + NaiveDate::from_ymd_res(2022, 10, 10)?, + "Indigenous Peoples' Day", + ), + ], + &mut map, + Country::US_ME, + "United States (Maine)", + ); + + 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, 4, 17)?, "Patriots' Day"), + ( + NaiveDate::from_ymd_res(2023, 10, 9)?, + "Indigenous Peoples' Day", + ), + ], + &mut map, + Country::US_ME, + "United States (Maine)", + ); + + 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, 4, 15)?, "Patriots' Day"), + ( + NaiveDate::from_ymd_res(2024, 10, 14)?, + "Indigenous Peoples' Day", + ), + ], + &mut map, + Country::US_ME, + "United States (Maine)", + ); + + 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, 4, 21)?, "Patriots' Day"), + ( + NaiveDate::from_ymd_res(2025, 10, 13)?, + "Indigenous Peoples' Day", + ), + ], + &mut map, + Country::US_ME, + "United States (Maine)", + ); + + 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, 4, 20)?, "Patriots' Day"), + ( + NaiveDate::from_ymd_res(2026, 10, 12)?, + "Indigenous Peoples' Day", + ), + ], + &mut map, + Country::US_ME, + "United States (Maine)", + ); + + 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, 4, 19)?, "Patriots' Day"), + ( + NaiveDate::from_ymd_res(2027, 10, 11)?, + "Indigenous Peoples' Day", + ), + ], + &mut map, + Country::US_ME, + "United States (Maine)", + ); + + 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, 4, 17)?, "Patriots' Day"), + ( + NaiveDate::from_ymd_res(2028, 10, 9)?, + "Indigenous Peoples' Day", + ), + ], + &mut map, + Country::US_ME, + "United States (Maine)", + ); + + 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, 4, 16)?, "Patriots' Day"), + ( + NaiveDate::from_ymd_res(2029, 10, 8)?, + "Indigenous Peoples' Day", + ), + ], + &mut map, + Country::US_ME, + "United States (Maine)", + ); + + 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, 4, 15)?, "Patriots' Day"), + ( + NaiveDate::from_ymd_res(2030, 10, 14)?, + "Indigenous Peoples' Day", + ), + ], + &mut map, + Country::US_ME, + "United States (Maine)", + ); + + Ok(map) +} diff --git a/src/data/us_mi.rs b/src/data/us_mi.rs new file mode 100644 index 0000000..5ace694 --- /dev/null +++ b/src/data/us_mi.rs @@ -0,0 +1,1043 @@ +//! United States (Michigan) +use super::*; + +/// Generate holiday map for United States (Michigan). +#[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", + ), + ], + &mut map, + Country::US_MI, + "United States (Michigan)", + ); + + 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", + ), + ], + &mut map, + Country::US_MI, + "United States (Michigan)", + ); + + 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", + ), + ], + &mut map, + Country::US_MI, + "United States (Michigan)", + ); + + 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", + ), + ], + &mut map, + Country::US_MI, + "United States (Michigan)", + ); + + 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", + ), + ], + &mut map, + Country::US_MI, + "United States (Michigan)", + ); + + 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", + ), + ], + &mut map, + Country::US_MI, + "United States (Michigan)", + ); + + 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", + ), + ], + &mut map, + Country::US_MI, + "United States (Michigan)", + ); + + 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", + ), + ], + &mut map, + Country::US_MI, + "United States (Michigan)", + ); + + 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", + ), + ], + &mut map, + Country::US_MI, + "United States (Michigan)", + ); + + 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", + ), + ], + &mut map, + Country::US_MI, + "United States (Michigan)", + ); + + 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", + ), + ], + &mut map, + Country::US_MI, + "United States (Michigan)", + ); + + 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", + ), + ], + &mut map, + Country::US_MI, + "United States (Michigan)", + ); + + 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", + ), + ], + &mut map, + Country::US_MI, + "United States (Michigan)", + ); + + 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, 12, 24)?, "Christmas Eve"), + (NaiveDate::from_ymd_res(2013, 12, 31)?, "New Year's Eve"), + ], + &mut map, + Country::US_MI, + "United States (Michigan)", + ); + + 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, 12, 24)?, "Christmas Eve"), + (NaiveDate::from_ymd_res(2014, 12, 31)?, "New Year's Eve"), + ], + &mut map, + Country::US_MI, + "United States (Michigan)", + ); + + 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, 12, 24)?, "Christmas Eve"), + (NaiveDate::from_ymd_res(2015, 12, 31)?, "New Year's Eve"), + ], + &mut map, + Country::US_MI, + "United States (Michigan)", + ); + + 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, 12, 24)?, "Christmas Eve"), + ( + NaiveDate::from_ymd_res(2016, 12, 23)?, + "Christmas Eve (observed)", + ), + (NaiveDate::from_ymd_res(2016, 12, 31)?, "New Year's Eve"), + ( + NaiveDate::from_ymd_res(2016, 12, 30)?, + "New Year's Eve (observed)", + ), + ], + &mut map, + Country::US_MI, + "United States (Michigan)", + ); + + 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, 12, 24)?, "Christmas Eve"), + ( + NaiveDate::from_ymd_res(2017, 12, 22)?, + "Christmas Eve (observed)", + ), + (NaiveDate::from_ymd_res(2017, 12, 31)?, "New Year's Eve"), + ], + &mut map, + Country::US_MI, + "United States (Michigan)", + ); + + 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, 12, 24)?, "Christmas Eve"), + (NaiveDate::from_ymd_res(2018, 12, 31)?, "New Year's Eve"), + ], + &mut map, + Country::US_MI, + "United States (Michigan)", + ); + + 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, 12, 24)?, "Christmas Eve"), + (NaiveDate::from_ymd_res(2019, 12, 31)?, "New Year's Eve"), + ], + &mut map, + Country::US_MI, + "United States (Michigan)", + ); + + 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, 12, 24)?, "Christmas Eve"), + (NaiveDate::from_ymd_res(2020, 12, 31)?, "New Year's Eve"), + ], + &mut map, + Country::US_MI, + "United States (Michigan)", + ); + + 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); New Year's Eve", + ), + (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); Christmas Eve", + ), + ( + 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, 12, 23)?, + "Christmas Eve (observed)", + ), + ], + &mut map, + Country::US_MI, + "United States (Michigan)", + ); + + 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, 12, 24)?, "Christmas Eve"), + ( + NaiveDate::from_ymd_res(2022, 12, 23)?, + "Christmas Eve (observed)", + ), + (NaiveDate::from_ymd_res(2022, 12, 31)?, "New Year's Eve"), + ( + NaiveDate::from_ymd_res(2022, 12, 30)?, + "New Year's Eve (observed)", + ), + ], + &mut map, + Country::US_MI, + "United States (Michigan)", + ); + + 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, 12, 24)?, "Christmas Eve"), + ( + NaiveDate::from_ymd_res(2023, 12, 22)?, + "Christmas Eve (observed)", + ), + (NaiveDate::from_ymd_res(2023, 12, 31)?, "New Year's Eve"), + ], + &mut map, + Country::US_MI, + "United States (Michigan)", + ); + + 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, 12, 24)?, "Christmas Eve"), + (NaiveDate::from_ymd_res(2024, 12, 31)?, "New Year's Eve"), + ], + &mut map, + Country::US_MI, + "United States (Michigan)", + ); + + 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, 12, 24)?, "Christmas Eve"), + (NaiveDate::from_ymd_res(2025, 12, 31)?, "New Year's Eve"), + ], + &mut map, + Country::US_MI, + "United States (Michigan)", + ); + + 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, 12, 24)?, "Christmas Eve"), + (NaiveDate::from_ymd_res(2026, 12, 31)?, "New Year's Eve"), + ], + &mut map, + Country::US_MI, + "United States (Michigan)", + ); + + 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); New Year's Eve", + ), + (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); Christmas Eve", + ), + ( + 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, 12, 23)?, + "Christmas Eve (observed)", + ), + ], + &mut map, + Country::US_MI, + "United States (Michigan)", + ); + + 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, 12, 24)?, "Christmas Eve"), + ( + NaiveDate::from_ymd_res(2028, 12, 22)?, + "Christmas Eve (observed)", + ), + (NaiveDate::from_ymd_res(2028, 12, 31)?, "New Year's Eve"), + ], + &mut map, + Country::US_MI, + "United States (Michigan)", + ); + + 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, 12, 24)?, "Christmas Eve"), + (NaiveDate::from_ymd_res(2029, 12, 31)?, "New Year's Eve"), + ], + &mut map, + Country::US_MI, + "United States (Michigan)", + ); + + 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, 12, 24)?, "Christmas Eve"), + (NaiveDate::from_ymd_res(2030, 12, 31)?, "New Year's Eve"), + ], + &mut map, + Country::US_MI, + "United States (Michigan)", + ); + + Ok(map) +} diff --git a/src/data/us_mn.rs b/src/data/us_mn.rs new file mode 100644 index 0000000..e6e7e89 --- /dev/null +++ b/src/data/us_mn.rs @@ -0,0 +1,975 @@ +//! United States (Minnesota) +use super::*; + +/// Generate holiday map for United States (Minnesota). +#[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", + ), + ], + &mut map, + Country::US_MN, + "United States (Minnesota)", + ); + + 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", + ), + ], + &mut map, + Country::US_MN, + "United States (Minnesota)", + ); + + 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", + ), + ], + &mut map, + Country::US_MN, + "United States (Minnesota)", + ); + + 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", + ), + ], + &mut map, + Country::US_MN, + "United States (Minnesota)", + ); + + 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", + ), + ], + &mut map, + Country::US_MN, + "United States (Minnesota)", + ); + + 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", + ), + ], + &mut map, + Country::US_MN, + "United States (Minnesota)", + ); + + 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", + ), + ], + &mut map, + Country::US_MN, + "United States (Minnesota)", + ); + + 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", + ), + ], + &mut map, + Country::US_MN, + "United States (Minnesota)", + ); + + 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", + ), + ], + &mut map, + Country::US_MN, + "United States (Minnesota)", + ); + + 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", + ), + ], + &mut map, + Country::US_MN, + "United States (Minnesota)", + ); + + 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", + ), + ], + &mut map, + Country::US_MN, + "United States (Minnesota)", + ); + + 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", + ), + ], + &mut map, + Country::US_MN, + "United States (Minnesota)", + ); + + 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", + ), + ], + &mut map, + Country::US_MN, + "United States (Minnesota)", + ); + + 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", + ), + ], + &mut map, + Country::US_MN, + "United States (Minnesota)", + ); + + 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", + ), + ], + &mut map, + Country::US_MN, + "United States (Minnesota)", + ); + + 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", + ), + ], + &mut map, + Country::US_MN, + "United States (Minnesota)", + ); + + 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", + ), + ], + &mut map, + Country::US_MN, + "United States (Minnesota)", + ); + + 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", + ), + ], + &mut map, + Country::US_MN, + "United States (Minnesota)", + ); + + 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", + ), + ], + &mut map, + Country::US_MN, + "United States (Minnesota)", + ); + + 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", + ), + ], + &mut map, + Country::US_MN, + "United States (Minnesota)", + ); + + 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", + ), + ], + &mut map, + Country::US_MN, + "United States (Minnesota)", + ); + + 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", + ), + ], + &mut map, + Country::US_MN, + "United States (Minnesota)", + ); + + 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", + ), + ], + &mut map, + Country::US_MN, + "United States (Minnesota)", + ); + + 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", + ), + ], + &mut map, + Country::US_MN, + "United States (Minnesota)", + ); + + 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", + ), + ], + &mut map, + Country::US_MN, + "United States (Minnesota)", + ); + + 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", + ), + ], + &mut map, + Country::US_MN, + "United States (Minnesota)", + ); + + 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", + ), + ], + &mut map, + Country::US_MN, + "United States (Minnesota)", + ); + + 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", + ), + ], + &mut map, + Country::US_MN, + "United States (Minnesota)", + ); + + 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", + ), + ], + &mut map, + Country::US_MN, + "United States (Minnesota)", + ); + + 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", + ), + ], + &mut map, + Country::US_MN, + "United States (Minnesota)", + ); + + 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", + ), + ], + &mut map, + Country::US_MN, + "United States (Minnesota)", + ); + + Ok(map) +} diff --git a/src/data/us_mo.rs b/src/data/us_mo.rs new file mode 100644 index 0000000..6124d82 --- /dev/null +++ b/src/data/us_mo.rs @@ -0,0 +1,1069 @@ +//! United States (Missouri) +use super::*; + +/// Generate holiday map for United States (Missouri). +#[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"), + (NaiveDate::from_ymd_res(2000, 5, 8)?, "Truman Day"), + ], + &mut map, + Country::US_MO, + "United States (Missouri)", + ); + + 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"), + (NaiveDate::from_ymd_res(2001, 5, 8)?, "Truman Day"), + ], + &mut map, + Country::US_MO, + "United States (Missouri)", + ); + + 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"), + (NaiveDate::from_ymd_res(2002, 5, 8)?, "Truman Day"), + ], + &mut map, + Country::US_MO, + "United States (Missouri)", + ); + + 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"), + (NaiveDate::from_ymd_res(2003, 5, 8)?, "Truman Day"), + ], + &mut map, + Country::US_MO, + "United States (Missouri)", + ); + + 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"), + (NaiveDate::from_ymd_res(2004, 5, 8)?, "Truman Day"), + ( + NaiveDate::from_ymd_res(2004, 5, 7)?, + "Truman Day (observed)", + ), + ], + &mut map, + Country::US_MO, + "United States (Missouri)", + ); + + 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"), + (NaiveDate::from_ymd_res(2005, 5, 8)?, "Truman Day"), + ( + NaiveDate::from_ymd_res(2005, 5, 9)?, + "Truman Day (observed)", + ), + ], + &mut map, + Country::US_MO, + "United States (Missouri)", + ); + + 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"), + (NaiveDate::from_ymd_res(2006, 5, 8)?, "Truman Day"), + ], + &mut map, + Country::US_MO, + "United States (Missouri)", + ); + + 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"), + (NaiveDate::from_ymd_res(2007, 5, 8)?, "Truman Day"), + ], + &mut map, + Country::US_MO, + "United States (Missouri)", + ); + + 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"), + (NaiveDate::from_ymd_res(2008, 5, 8)?, "Truman Day"), + ], + &mut map, + Country::US_MO, + "United States (Missouri)", + ); + + 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"), + (NaiveDate::from_ymd_res(2009, 5, 8)?, "Truman Day"), + ], + &mut map, + Country::US_MO, + "United States (Missouri)", + ); + + 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"), + (NaiveDate::from_ymd_res(2010, 5, 8)?, "Truman Day"), + ( + NaiveDate::from_ymd_res(2010, 5, 7)?, + "Truman Day (observed)", + ), + ], + &mut map, + Country::US_MO, + "United States (Missouri)", + ); + + 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"), + (NaiveDate::from_ymd_res(2011, 5, 8)?, "Truman Day"), + ( + NaiveDate::from_ymd_res(2011, 5, 9)?, + "Truman Day (observed)", + ), + ], + &mut map, + Country::US_MO, + "United States (Missouri)", + ); + + 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"), + (NaiveDate::from_ymd_res(2012, 5, 8)?, "Truman Day"), + ], + &mut map, + Country::US_MO, + "United States (Missouri)", + ); + + 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"), + (NaiveDate::from_ymd_res(2013, 5, 8)?, "Truman Day"), + ], + &mut map, + Country::US_MO, + "United States (Missouri)", + ); + + 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"), + (NaiveDate::from_ymd_res(2014, 5, 8)?, "Truman Day"), + ], + &mut map, + Country::US_MO, + "United States (Missouri)", + ); + + 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"), + (NaiveDate::from_ymd_res(2015, 5, 8)?, "Truman Day"), + ], + &mut map, + Country::US_MO, + "United States (Missouri)", + ); + + 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"), + (NaiveDate::from_ymd_res(2016, 5, 8)?, "Truman Day"), + ( + NaiveDate::from_ymd_res(2016, 5, 9)?, + "Truman Day (observed)", + ), + ], + &mut map, + Country::US_MO, + "United States (Missouri)", + ); + + 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"), + (NaiveDate::from_ymd_res(2017, 5, 8)?, "Truman Day"), + ], + &mut map, + Country::US_MO, + "United States (Missouri)", + ); + + 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"), + (NaiveDate::from_ymd_res(2018, 5, 8)?, "Truman Day"), + ], + &mut map, + Country::US_MO, + "United States (Missouri)", + ); + + 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"), + (NaiveDate::from_ymd_res(2019, 5, 8)?, "Truman Day"), + ], + &mut map, + Country::US_MO, + "United States (Missouri)", + ); + + 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"), + (NaiveDate::from_ymd_res(2020, 5, 8)?, "Truman Day"), + ], + &mut map, + Country::US_MO, + "United States (Missouri)", + ); + + 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"), + (NaiveDate::from_ymd_res(2021, 5, 8)?, "Truman Day"), + ( + NaiveDate::from_ymd_res(2021, 5, 7)?, + "Truman Day (observed)", + ), + ], + &mut map, + Country::US_MO, + "United States (Missouri)", + ); + + 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"), + (NaiveDate::from_ymd_res(2022, 5, 8)?, "Truman Day"), + ( + NaiveDate::from_ymd_res(2022, 5, 9)?, + "Truman Day (observed)", + ), + ], + &mut map, + Country::US_MO, + "United States (Missouri)", + ); + + 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"), + (NaiveDate::from_ymd_res(2023, 5, 8)?, "Truman Day"), + ], + &mut map, + Country::US_MO, + "United States (Missouri)", + ); + + 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"), + (NaiveDate::from_ymd_res(2024, 5, 8)?, "Truman Day"), + ], + &mut map, + Country::US_MO, + "United States (Missouri)", + ); + + 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"), + (NaiveDate::from_ymd_res(2025, 5, 8)?, "Truman Day"), + ], + &mut map, + Country::US_MO, + "United States (Missouri)", + ); + + 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"), + (NaiveDate::from_ymd_res(2026, 5, 8)?, "Truman Day"), + ], + &mut map, + Country::US_MO, + "United States (Missouri)", + ); + + 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"), + (NaiveDate::from_ymd_res(2027, 5, 8)?, "Truman Day"), + ( + NaiveDate::from_ymd_res(2027, 5, 7)?, + "Truman Day (observed)", + ), + ], + &mut map, + Country::US_MO, + "United States (Missouri)", + ); + + 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"), + (NaiveDate::from_ymd_res(2028, 5, 8)?, "Truman Day"), + ], + &mut map, + Country::US_MO, + "United States (Missouri)", + ); + + 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"), + (NaiveDate::from_ymd_res(2029, 5, 8)?, "Truman Day"), + ], + &mut map, + Country::US_MO, + "United States (Missouri)", + ); + + 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"), + (NaiveDate::from_ymd_res(2030, 5, 8)?, "Truman Day"), + ], + &mut map, + Country::US_MO, + "United States (Missouri)", + ); + + Ok(map) +} diff --git a/src/data/us_mp.rs b/src/data/us_mp.rs new file mode 100644 index 0000000..4c727e7 --- /dev/null +++ b/src/data/us_mp.rs @@ -0,0 +1,1452 @@ +//! United States (Northern Mariana Islands) +use super::*; + +/// Generate holiday map for United States (Northern Mariana Islands). +#[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, 3, 24)?, + "Commonwealth Covenant Day", + ), + (NaiveDate::from_ymd_res(2000, 4, 21)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2000, 10, 9)?, + "Commonwealth Cultural Day", + ), + (NaiveDate::from_ymd_res(2000, 11, 4)?, "Citizenship Day"), + ( + NaiveDate::from_ymd_res(2000, 11, 3)?, + "Citizenship Day (observed)", + ), + (NaiveDate::from_ymd_res(2000, 12, 8)?, "Constitution Day"), + ], + &mut map, + Country::US_MP, + "United States (Northern Mariana Islands)", + ); + + 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, 3, 24)?, + "Commonwealth Covenant Day", + ), + ( + NaiveDate::from_ymd_res(2001, 3, 23)?, + "Commonwealth Covenant Day (observed)", + ), + (NaiveDate::from_ymd_res(2001, 4, 13)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2001, 10, 8)?, + "Commonwealth Cultural Day", + ), + (NaiveDate::from_ymd_res(2001, 11, 4)?, "Citizenship Day"), + ( + NaiveDate::from_ymd_res(2001, 11, 5)?, + "Citizenship Day (observed)", + ), + (NaiveDate::from_ymd_res(2001, 12, 8)?, "Constitution Day"), + ( + NaiveDate::from_ymd_res(2001, 12, 7)?, + "Constitution Day (observed)", + ), + ], + &mut map, + Country::US_MP, + "United States (Northern Mariana Islands)", + ); + + 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, 3, 24)?, + "Commonwealth Covenant Day", + ), + ( + NaiveDate::from_ymd_res(2002, 3, 25)?, + "Commonwealth Covenant Day (observed)", + ), + (NaiveDate::from_ymd_res(2002, 3, 29)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2002, 10, 14)?, + "Commonwealth Cultural Day", + ), + (NaiveDate::from_ymd_res(2002, 11, 4)?, "Citizenship Day"), + (NaiveDate::from_ymd_res(2002, 12, 8)?, "Constitution Day"), + ( + NaiveDate::from_ymd_res(2002, 12, 9)?, + "Constitution Day (observed)", + ), + ], + &mut map, + Country::US_MP, + "United States (Northern Mariana Islands)", + ); + + 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, 3, 24)?, + "Commonwealth Covenant Day", + ), + (NaiveDate::from_ymd_res(2003, 4, 18)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2003, 10, 13)?, + "Commonwealth Cultural Day", + ), + (NaiveDate::from_ymd_res(2003, 11, 4)?, "Citizenship Day"), + (NaiveDate::from_ymd_res(2003, 12, 8)?, "Constitution Day"), + ], + &mut map, + Country::US_MP, + "United States (Northern Mariana Islands)", + ); + + 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, 3, 24)?, + "Commonwealth Covenant Day", + ), + (NaiveDate::from_ymd_res(2004, 4, 9)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2004, 10, 11)?, + "Commonwealth Cultural Day", + ), + (NaiveDate::from_ymd_res(2004, 11, 4)?, "Citizenship Day"), + (NaiveDate::from_ymd_res(2004, 12, 8)?, "Constitution Day"), + ], + &mut map, + Country::US_MP, + "United States (Northern Mariana Islands)", + ); + + 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, 3, 24)?, + "Commonwealth Covenant Day", + ), + (NaiveDate::from_ymd_res(2005, 3, 25)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2005, 10, 10)?, + "Commonwealth Cultural Day", + ), + (NaiveDate::from_ymd_res(2005, 11, 4)?, "Citizenship Day"), + (NaiveDate::from_ymd_res(2005, 12, 8)?, "Constitution Day"), + ], + &mut map, + Country::US_MP, + "United States (Northern Mariana Islands)", + ); + + 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, 3, 24)?, + "Commonwealth Covenant Day", + ), + (NaiveDate::from_ymd_res(2006, 4, 14)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2006, 10, 9)?, + "Commonwealth Cultural Day", + ), + (NaiveDate::from_ymd_res(2006, 11, 4)?, "Citizenship Day"), + ( + NaiveDate::from_ymd_res(2006, 11, 3)?, + "Citizenship Day (observed)", + ), + (NaiveDate::from_ymd_res(2006, 12, 8)?, "Constitution Day"), + ], + &mut map, + Country::US_MP, + "United States (Northern Mariana Islands)", + ); + + 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, 3, 24)?, + "Commonwealth Covenant Day", + ), + ( + NaiveDate::from_ymd_res(2007, 3, 23)?, + "Commonwealth Covenant Day (observed)", + ), + (NaiveDate::from_ymd_res(2007, 4, 6)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2007, 10, 8)?, + "Commonwealth Cultural Day", + ), + (NaiveDate::from_ymd_res(2007, 11, 4)?, "Citizenship Day"), + ( + NaiveDate::from_ymd_res(2007, 11, 5)?, + "Citizenship Day (observed)", + ), + (NaiveDate::from_ymd_res(2007, 12, 8)?, "Constitution Day"), + ( + NaiveDate::from_ymd_res(2007, 12, 7)?, + "Constitution Day (observed)", + ), + ], + &mut map, + Country::US_MP, + "United States (Northern Mariana Islands)", + ); + + 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, 3, 24)?, + "Commonwealth Covenant Day", + ), + (NaiveDate::from_ymd_res(2008, 3, 21)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2008, 10, 13)?, + "Commonwealth Cultural Day", + ), + ( + NaiveDate::from_ymd_res(2008, 11, 4)?, + "Citizenship Day; Election Day", + ), + (NaiveDate::from_ymd_res(2008, 12, 8)?, "Constitution Day"), + ], + &mut map, + Country::US_MP, + "United States (Northern Mariana Islands)", + ); + + 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, 3, 24)?, + "Commonwealth Covenant Day", + ), + (NaiveDate::from_ymd_res(2009, 4, 10)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2009, 10, 12)?, + "Commonwealth Cultural Day", + ), + (NaiveDate::from_ymd_res(2009, 11, 4)?, "Citizenship Day"), + (NaiveDate::from_ymd_res(2009, 12, 8)?, "Constitution Day"), + ], + &mut map, + Country::US_MP, + "United States (Northern Mariana Islands)", + ); + + 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, 3, 24)?, + "Commonwealth Covenant Day", + ), + (NaiveDate::from_ymd_res(2010, 4, 2)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2010, 10, 11)?, + "Commonwealth Cultural Day", + ), + (NaiveDate::from_ymd_res(2010, 11, 2)?, "Election Day"), + (NaiveDate::from_ymd_res(2010, 11, 4)?, "Citizenship Day"), + (NaiveDate::from_ymd_res(2010, 12, 8)?, "Constitution Day"), + ], + &mut map, + Country::US_MP, + "United States (Northern Mariana Islands)", + ); + + 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, 3, 24)?, + "Commonwealth Covenant Day", + ), + (NaiveDate::from_ymd_res(2011, 4, 22)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2011, 10, 10)?, + "Commonwealth Cultural Day", + ), + (NaiveDate::from_ymd_res(2011, 11, 4)?, "Citizenship Day"), + (NaiveDate::from_ymd_res(2011, 12, 8)?, "Constitution Day"), + ], + &mut map, + Country::US_MP, + "United States (Northern Mariana Islands)", + ); + + 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, 3, 24)?, + "Commonwealth Covenant Day", + ), + ( + NaiveDate::from_ymd_res(2012, 3, 23)?, + "Commonwealth Covenant Day (observed)", + ), + (NaiveDate::from_ymd_res(2012, 4, 6)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2012, 10, 8)?, + "Commonwealth Cultural Day", + ), + (NaiveDate::from_ymd_res(2012, 11, 6)?, "Election Day"), + (NaiveDate::from_ymd_res(2012, 11, 4)?, "Citizenship Day"), + ( + NaiveDate::from_ymd_res(2012, 11, 5)?, + "Citizenship Day (observed)", + ), + (NaiveDate::from_ymd_res(2012, 12, 8)?, "Constitution Day"), + ( + NaiveDate::from_ymd_res(2012, 12, 7)?, + "Constitution Day (observed)", + ), + ], + &mut map, + Country::US_MP, + "United States (Northern Mariana Islands)", + ); + + 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, 3, 24)?, + "Commonwealth Covenant Day", + ), + ( + NaiveDate::from_ymd_res(2013, 3, 25)?, + "Commonwealth Covenant Day (observed)", + ), + (NaiveDate::from_ymd_res(2013, 3, 29)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2013, 10, 14)?, + "Commonwealth Cultural Day", + ), + (NaiveDate::from_ymd_res(2013, 11, 4)?, "Citizenship Day"), + (NaiveDate::from_ymd_res(2013, 12, 8)?, "Constitution Day"), + ( + NaiveDate::from_ymd_res(2013, 12, 9)?, + "Constitution Day (observed)", + ), + ], + &mut map, + Country::US_MP, + "United States (Northern Mariana Islands)", + ); + + 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, 3, 24)?, + "Commonwealth Covenant Day", + ), + (NaiveDate::from_ymd_res(2014, 4, 18)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2014, 10, 13)?, + "Commonwealth Cultural Day", + ), + ( + NaiveDate::from_ymd_res(2014, 11, 4)?, + "Citizenship Day; Election Day", + ), + (NaiveDate::from_ymd_res(2014, 12, 8)?, "Constitution Day"), + ], + &mut map, + Country::US_MP, + "United States (Northern Mariana Islands)", + ); + + 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, 3, 24)?, + "Commonwealth Covenant Day", + ), + (NaiveDate::from_ymd_res(2015, 4, 3)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2015, 10, 12)?, + "Commonwealth Cultural Day", + ), + (NaiveDate::from_ymd_res(2015, 11, 4)?, "Citizenship Day"), + (NaiveDate::from_ymd_res(2015, 12, 8)?, "Constitution Day"), + ], + &mut map, + Country::US_MP, + "United States (Northern Mariana Islands)", + ); + + 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, 3, 24)?, + "Commonwealth Covenant Day", + ), + (NaiveDate::from_ymd_res(2016, 3, 25)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2016, 10, 10)?, + "Commonwealth Cultural Day", + ), + (NaiveDate::from_ymd_res(2016, 11, 8)?, "Election Day"), + (NaiveDate::from_ymd_res(2016, 11, 4)?, "Citizenship Day"), + (NaiveDate::from_ymd_res(2016, 12, 8)?, "Constitution Day"), + ], + &mut map, + Country::US_MP, + "United States (Northern Mariana Islands)", + ); + + 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, 3, 24)?, + "Commonwealth Covenant Day", + ), + (NaiveDate::from_ymd_res(2017, 4, 14)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2017, 10, 9)?, + "Commonwealth Cultural Day", + ), + (NaiveDate::from_ymd_res(2017, 11, 4)?, "Citizenship Day"), + ( + NaiveDate::from_ymd_res(2017, 11, 3)?, + "Citizenship Day (observed)", + ), + (NaiveDate::from_ymd_res(2017, 12, 8)?, "Constitution Day"), + ], + &mut map, + Country::US_MP, + "United States (Northern Mariana Islands)", + ); + + 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, 3, 24)?, + "Commonwealth Covenant Day", + ), + ( + NaiveDate::from_ymd_res(2018, 3, 23)?, + "Commonwealth Covenant Day (observed)", + ), + (NaiveDate::from_ymd_res(2018, 3, 30)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2018, 10, 8)?, + "Commonwealth Cultural Day", + ), + (NaiveDate::from_ymd_res(2018, 11, 6)?, "Election Day"), + (NaiveDate::from_ymd_res(2018, 11, 4)?, "Citizenship Day"), + ( + NaiveDate::from_ymd_res(2018, 11, 5)?, + "Citizenship Day (observed)", + ), + (NaiveDate::from_ymd_res(2018, 12, 8)?, "Constitution Day"), + ( + NaiveDate::from_ymd_res(2018, 12, 7)?, + "Constitution Day (observed)", + ), + ], + &mut map, + Country::US_MP, + "United States (Northern Mariana Islands)", + ); + + 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, 3, 24)?, + "Commonwealth Covenant Day", + ), + ( + NaiveDate::from_ymd_res(2019, 3, 25)?, + "Commonwealth Covenant Day (observed)", + ), + (NaiveDate::from_ymd_res(2019, 4, 19)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2019, 10, 14)?, + "Commonwealth Cultural Day", + ), + (NaiveDate::from_ymd_res(2019, 11, 4)?, "Citizenship Day"), + (NaiveDate::from_ymd_res(2019, 12, 8)?, "Constitution Day"), + ( + NaiveDate::from_ymd_res(2019, 12, 9)?, + "Constitution Day (observed)", + ), + ], + &mut map, + Country::US_MP, + "United States (Northern Mariana Islands)", + ); + + 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, 3, 24)?, + "Commonwealth Covenant Day", + ), + (NaiveDate::from_ymd_res(2020, 4, 10)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2020, 10, 12)?, + "Commonwealth Cultural Day", + ), + (NaiveDate::from_ymd_res(2020, 11, 3)?, "Election Day"), + (NaiveDate::from_ymd_res(2020, 11, 4)?, "Citizenship Day"), + (NaiveDate::from_ymd_res(2020, 12, 8)?, "Constitution Day"), + ], + &mut map, + Country::US_MP, + "United States (Northern Mariana Islands)", + ); + + 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, 3, 24)?, + "Commonwealth Covenant Day", + ), + (NaiveDate::from_ymd_res(2021, 4, 2)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2021, 10, 11)?, + "Commonwealth Cultural Day", + ), + (NaiveDate::from_ymd_res(2021, 11, 4)?, "Citizenship Day"), + (NaiveDate::from_ymd_res(2021, 12, 8)?, "Constitution Day"), + ], + &mut map, + Country::US_MP, + "United States (Northern Mariana Islands)", + ); + + 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, 3, 24)?, + "Commonwealth Covenant Day", + ), + (NaiveDate::from_ymd_res(2022, 4, 15)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2022, 10, 10)?, + "Commonwealth Cultural Day", + ), + (NaiveDate::from_ymd_res(2022, 11, 8)?, "Election Day"), + (NaiveDate::from_ymd_res(2022, 11, 4)?, "Citizenship Day"), + (NaiveDate::from_ymd_res(2022, 12, 8)?, "Constitution Day"), + ], + &mut map, + Country::US_MP, + "United States (Northern Mariana Islands)", + ); + + 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, 3, 24)?, + "Commonwealth Covenant Day", + ), + (NaiveDate::from_ymd_res(2023, 4, 7)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2023, 10, 9)?, + "Commonwealth Cultural Day", + ), + (NaiveDate::from_ymd_res(2023, 11, 4)?, "Citizenship Day"), + ( + NaiveDate::from_ymd_res(2023, 11, 3)?, + "Citizenship Day (observed)", + ), + (NaiveDate::from_ymd_res(2023, 12, 8)?, "Constitution Day"), + ], + &mut map, + Country::US_MP, + "United States (Northern Mariana Islands)", + ); + + 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, 3, 24)?, + "Commonwealth Covenant Day", + ), + ( + NaiveDate::from_ymd_res(2024, 3, 25)?, + "Commonwealth Covenant Day (observed)", + ), + (NaiveDate::from_ymd_res(2024, 3, 29)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2024, 10, 14)?, + "Commonwealth Cultural Day", + ), + (NaiveDate::from_ymd_res(2024, 11, 5)?, "Election Day"), + (NaiveDate::from_ymd_res(2024, 11, 4)?, "Citizenship Day"), + (NaiveDate::from_ymd_res(2024, 12, 8)?, "Constitution Day"), + ( + NaiveDate::from_ymd_res(2024, 12, 9)?, + "Constitution Day (observed)", + ), + ], + &mut map, + Country::US_MP, + "United States (Northern Mariana Islands)", + ); + + 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, 3, 24)?, + "Commonwealth Covenant Day", + ), + (NaiveDate::from_ymd_res(2025, 4, 18)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2025, 10, 13)?, + "Commonwealth Cultural Day", + ), + (NaiveDate::from_ymd_res(2025, 11, 4)?, "Citizenship Day"), + (NaiveDate::from_ymd_res(2025, 12, 8)?, "Constitution Day"), + ], + &mut map, + Country::US_MP, + "United States (Northern Mariana Islands)", + ); + + 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, 3, 24)?, + "Commonwealth Covenant Day", + ), + (NaiveDate::from_ymd_res(2026, 4, 3)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2026, 10, 12)?, + "Commonwealth Cultural Day", + ), + (NaiveDate::from_ymd_res(2026, 11, 3)?, "Election Day"), + (NaiveDate::from_ymd_res(2026, 11, 4)?, "Citizenship Day"), + (NaiveDate::from_ymd_res(2026, 12, 8)?, "Constitution Day"), + ], + &mut map, + Country::US_MP, + "United States (Northern Mariana Islands)", + ); + + 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, 3, 24)?, + "Commonwealth Covenant Day", + ), + (NaiveDate::from_ymd_res(2027, 3, 26)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2027, 10, 11)?, + "Commonwealth Cultural Day", + ), + (NaiveDate::from_ymd_res(2027, 11, 4)?, "Citizenship Day"), + (NaiveDate::from_ymd_res(2027, 12, 8)?, "Constitution Day"), + ], + &mut map, + Country::US_MP, + "United States (Northern Mariana Islands)", + ); + + 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, 3, 24)?, + "Commonwealth Covenant Day", + ), + (NaiveDate::from_ymd_res(2028, 4, 14)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2028, 10, 9)?, + "Commonwealth Cultural Day", + ), + (NaiveDate::from_ymd_res(2028, 11, 7)?, "Election Day"), + (NaiveDate::from_ymd_res(2028, 11, 4)?, "Citizenship Day"), + ( + NaiveDate::from_ymd_res(2028, 11, 3)?, + "Citizenship Day (observed)", + ), + (NaiveDate::from_ymd_res(2028, 12, 8)?, "Constitution Day"), + ], + &mut map, + Country::US_MP, + "United States (Northern Mariana Islands)", + ); + + 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, 3, 24)?, + "Commonwealth Covenant Day", + ), + ( + NaiveDate::from_ymd_res(2029, 3, 23)?, + "Commonwealth Covenant Day (observed)", + ), + (NaiveDate::from_ymd_res(2029, 3, 30)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2029, 10, 8)?, + "Commonwealth Cultural Day", + ), + (NaiveDate::from_ymd_res(2029, 11, 4)?, "Citizenship Day"), + ( + NaiveDate::from_ymd_res(2029, 11, 5)?, + "Citizenship Day (observed)", + ), + (NaiveDate::from_ymd_res(2029, 12, 8)?, "Constitution Day"), + ( + NaiveDate::from_ymd_res(2029, 12, 7)?, + "Constitution Day (observed)", + ), + ], + &mut map, + Country::US_MP, + "United States (Northern Mariana Islands)", + ); + + 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, 3, 24)?, + "Commonwealth Covenant Day", + ), + ( + NaiveDate::from_ymd_res(2030, 3, 25)?, + "Commonwealth Covenant Day (observed)", + ), + (NaiveDate::from_ymd_res(2030, 4, 19)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2030, 10, 14)?, + "Commonwealth Cultural Day", + ), + (NaiveDate::from_ymd_res(2030, 11, 5)?, "Election Day"), + (NaiveDate::from_ymd_res(2030, 11, 4)?, "Citizenship Day"), + (NaiveDate::from_ymd_res(2030, 12, 8)?, "Constitution Day"), + ( + NaiveDate::from_ymd_res(2030, 12, 9)?, + "Constitution Day (observed)", + ), + ], + &mut map, + Country::US_MP, + "United States (Northern Mariana Islands)", + ); + + Ok(map) +} diff --git a/src/data/us_ms.rs b/src/data/us_ms.rs new file mode 100644 index 0000000..e86bd76 --- /dev/null +++ b/src/data/us_ms.rs @@ -0,0 +1,1099 @@ +//! United States (Mississippi) +use super::*; + +/// Generate holiday map for United States (Mississippi). +#[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, 2, 21)?, + "Washington's Birthday", + ), + ( + NaiveDate::from_ymd_res(2000, 1, 17)?, + "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", + ), + ( + NaiveDate::from_ymd_res(2000, 4, 24)?, + "Confederate Memorial Day", + ), + ], + &mut map, + Country::US_MS, + "United States (Mississippi)", + ); + + 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, 2, 19)?, + "Washington's Birthday", + ), + ( + NaiveDate::from_ymd_res(2001, 1, 15)?, + "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", + ), + ( + NaiveDate::from_ymd_res(2001, 4, 30)?, + "Confederate Memorial Day", + ), + ], + &mut map, + Country::US_MS, + "United States (Mississippi)", + ); + + 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, 2, 18)?, + "Washington's Birthday", + ), + ( + NaiveDate::from_ymd_res(2002, 1, 21)?, + "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", + ), + ( + NaiveDate::from_ymd_res(2002, 4, 29)?, + "Confederate Memorial Day", + ), + ], + &mut map, + Country::US_MS, + "United States (Mississippi)", + ); + + 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, 2, 17)?, + "Washington's Birthday", + ), + ( + NaiveDate::from_ymd_res(2003, 1, 20)?, + "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", + ), + ( + NaiveDate::from_ymd_res(2003, 4, 28)?, + "Confederate Memorial Day", + ), + ], + &mut map, + Country::US_MS, + "United States (Mississippi)", + ); + + 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, 2, 16)?, + "Washington's Birthday", + ), + ( + NaiveDate::from_ymd_res(2004, 1, 19)?, + "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", + ), + ( + NaiveDate::from_ymd_res(2004, 4, 26)?, + "Confederate Memorial Day", + ), + ], + &mut map, + Country::US_MS, + "United States (Mississippi)", + ); + + 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, 2, 21)?, + "Washington's Birthday", + ), + ( + NaiveDate::from_ymd_res(2005, 1, 17)?, + "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", + ), + ( + NaiveDate::from_ymd_res(2005, 4, 25)?, + "Confederate Memorial Day", + ), + ], + &mut map, + Country::US_MS, + "United States (Mississippi)", + ); + + 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, 2, 20)?, + "Washington's Birthday", + ), + ( + NaiveDate::from_ymd_res(2006, 1, 16)?, + "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", + ), + ( + NaiveDate::from_ymd_res(2006, 4, 24)?, + "Confederate Memorial Day", + ), + ], + &mut map, + Country::US_MS, + "United States (Mississippi)", + ); + + 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, 2, 19)?, + "Washington's Birthday", + ), + ( + NaiveDate::from_ymd_res(2007, 1, 15)?, + "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", + ), + ( + NaiveDate::from_ymd_res(2007, 4, 30)?, + "Confederate Memorial Day", + ), + ], + &mut map, + Country::US_MS, + "United States (Mississippi)", + ); + + 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, 2, 18)?, + "Washington's Birthday", + ), + ( + NaiveDate::from_ymd_res(2008, 1, 21)?, + "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", + ), + ( + NaiveDate::from_ymd_res(2008, 4, 28)?, + "Confederate Memorial Day", + ), + ], + &mut map, + Country::US_MS, + "United States (Mississippi)", + ); + + 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, 2, 16)?, + "Washington's Birthday", + ), + ( + NaiveDate::from_ymd_res(2009, 1, 19)?, + "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", + ), + ( + NaiveDate::from_ymd_res(2009, 4, 27)?, + "Confederate Memorial Day", + ), + ], + &mut map, + Country::US_MS, + "United States (Mississippi)", + ); + + 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, 2, 15)?, + "Washington's Birthday", + ), + ( + NaiveDate::from_ymd_res(2010, 1, 18)?, + "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", + ), + ( + NaiveDate::from_ymd_res(2010, 4, 26)?, + "Confederate Memorial Day", + ), + ], + &mut map, + Country::US_MS, + "United States (Mississippi)", + ); + + 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, 2, 21)?, + "Washington's Birthday", + ), + ( + NaiveDate::from_ymd_res(2011, 1, 17)?, + "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", + ), + ( + NaiveDate::from_ymd_res(2011, 4, 25)?, + "Confederate Memorial Day", + ), + ], + &mut map, + Country::US_MS, + "United States (Mississippi)", + ); + + 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, 2, 20)?, + "Washington's Birthday", + ), + ( + NaiveDate::from_ymd_res(2012, 1, 16)?, + "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", + ), + ( + NaiveDate::from_ymd_res(2012, 4, 30)?, + "Confederate Memorial Day", + ), + ], + &mut map, + Country::US_MS, + "United States (Mississippi)", + ); + + 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, 2, 18)?, + "Washington's Birthday", + ), + ( + NaiveDate::from_ymd_res(2013, 1, 21)?, + "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", + ), + ( + NaiveDate::from_ymd_res(2013, 4, 29)?, + "Confederate Memorial Day", + ), + ], + &mut map, + Country::US_MS, + "United States (Mississippi)", + ); + + 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, 2, 17)?, + "Washington's Birthday", + ), + ( + NaiveDate::from_ymd_res(2014, 1, 20)?, + "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", + ), + ( + NaiveDate::from_ymd_res(2014, 4, 28)?, + "Confederate Memorial Day", + ), + ], + &mut map, + Country::US_MS, + "United States (Mississippi)", + ); + + 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, 2, 16)?, + "Washington's Birthday", + ), + ( + NaiveDate::from_ymd_res(2015, 1, 19)?, + "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", + ), + ( + NaiveDate::from_ymd_res(2015, 4, 27)?, + "Confederate Memorial Day", + ), + ], + &mut map, + Country::US_MS, + "United States (Mississippi)", + ); + + 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, 2, 15)?, + "Washington's Birthday", + ), + ( + NaiveDate::from_ymd_res(2016, 1, 18)?, + "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", + ), + ( + NaiveDate::from_ymd_res(2016, 4, 25)?, + "Confederate Memorial Day", + ), + ], + &mut map, + Country::US_MS, + "United States (Mississippi)", + ); + + 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, 2, 20)?, + "Washington's Birthday", + ), + ( + NaiveDate::from_ymd_res(2017, 1, 16)?, + "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", + ), + ( + NaiveDate::from_ymd_res(2017, 4, 24)?, + "Confederate Memorial Day", + ), + ], + &mut map, + Country::US_MS, + "United States (Mississippi)", + ); + + 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, 2, 19)?, + "Washington's Birthday", + ), + ( + NaiveDate::from_ymd_res(2018, 1, 15)?, + "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", + ), + ( + NaiveDate::from_ymd_res(2018, 4, 30)?, + "Confederate Memorial Day", + ), + ], + &mut map, + Country::US_MS, + "United States (Mississippi)", + ); + + 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, 2, 18)?, + "Washington's Birthday", + ), + ( + NaiveDate::from_ymd_res(2019, 1, 21)?, + "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", + ), + ( + NaiveDate::from_ymd_res(2019, 4, 29)?, + "Confederate Memorial Day", + ), + ], + &mut map, + Country::US_MS, + "United States (Mississippi)", + ); + + 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, 2, 17)?, + "Washington's Birthday", + ), + ( + NaiveDate::from_ymd_res(2020, 1, 20)?, + "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", + ), + ( + NaiveDate::from_ymd_res(2020, 4, 27)?, + "Confederate Memorial Day", + ), + ], + &mut map, + Country::US_MS, + "United States (Mississippi)", + ); + + 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, 2, 15)?, + "Washington's Birthday", + ), + ( + NaiveDate::from_ymd_res(2021, 1, 18)?, + "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", + ), + ( + NaiveDate::from_ymd_res(2021, 4, 26)?, + "Confederate Memorial Day", + ), + ], + &mut map, + Country::US_MS, + "United States (Mississippi)", + ); + + 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, 2, 21)?, + "Washington's Birthday", + ), + ( + NaiveDate::from_ymd_res(2022, 1, 17)?, + "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", + ), + ( + NaiveDate::from_ymd_res(2022, 4, 25)?, + "Confederate Memorial Day", + ), + ], + &mut map, + Country::US_MS, + "United States (Mississippi)", + ); + + 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, 2, 20)?, + "Washington's Birthday", + ), + ( + NaiveDate::from_ymd_res(2023, 1, 16)?, + "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", + ), + ( + NaiveDate::from_ymd_res(2023, 4, 24)?, + "Confederate Memorial Day", + ), + ], + &mut map, + Country::US_MS, + "United States (Mississippi)", + ); + + 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, 2, 19)?, + "Washington's Birthday", + ), + ( + NaiveDate::from_ymd_res(2024, 1, 15)?, + "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", + ), + ( + NaiveDate::from_ymd_res(2024, 4, 29)?, + "Confederate Memorial Day", + ), + ], + &mut map, + Country::US_MS, + "United States (Mississippi)", + ); + + 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, 2, 17)?, + "Washington's Birthday", + ), + ( + NaiveDate::from_ymd_res(2025, 1, 20)?, + "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", + ), + ( + NaiveDate::from_ymd_res(2025, 4, 28)?, + "Confederate Memorial Day", + ), + ], + &mut map, + Country::US_MS, + "United States (Mississippi)", + ); + + 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, 2, 16)?, + "Washington's Birthday", + ), + ( + NaiveDate::from_ymd_res(2026, 1, 19)?, + "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", + ), + ( + NaiveDate::from_ymd_res(2026, 4, 27)?, + "Confederate Memorial Day", + ), + ], + &mut map, + Country::US_MS, + "United States (Mississippi)", + ); + + 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, 2, 15)?, + "Washington's Birthday", + ), + ( + NaiveDate::from_ymd_res(2027, 1, 18)?, + "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", + ), + ( + NaiveDate::from_ymd_res(2027, 4, 26)?, + "Confederate Memorial Day", + ), + ], + &mut map, + Country::US_MS, + "United States (Mississippi)", + ); + + 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, 2, 21)?, + "Washington's Birthday", + ), + ( + NaiveDate::from_ymd_res(2028, 1, 17)?, + "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", + ), + ( + NaiveDate::from_ymd_res(2028, 4, 24)?, + "Confederate Memorial Day", + ), + ], + &mut map, + Country::US_MS, + "United States (Mississippi)", + ); + + 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, 2, 19)?, + "Washington's Birthday", + ), + ( + NaiveDate::from_ymd_res(2029, 1, 15)?, + "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", + ), + ( + NaiveDate::from_ymd_res(2029, 4, 30)?, + "Confederate Memorial Day", + ), + ], + &mut map, + Country::US_MS, + "United States (Mississippi)", + ); + + 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, 2, 18)?, + "Washington's Birthday", + ), + ( + NaiveDate::from_ymd_res(2030, 1, 21)?, + "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", + ), + ( + NaiveDate::from_ymd_res(2030, 4, 29)?, + "Confederate Memorial Day", + ), + ], + &mut map, + Country::US_MS, + "United States (Mississippi)", + ); + + Ok(map) +} diff --git a/src/data/us_mt.rs b/src/data/us_mt.rs new file mode 100644 index 0000000..7123104 --- /dev/null +++ b/src/data/us_mt.rs @@ -0,0 +1,1018 @@ +//! United States (Montana) +use super::*; + +/// Generate holiday map for United States (Montana). +#[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_MT, + "United States (Montana)", + ); + + 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_MT, + "United States (Montana)", + ); + + 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_MT, + "United States (Montana)", + ); + + 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_MT, + "United States (Montana)", + ); + + 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_MT, + "United States (Montana)", + ); + + 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_MT, + "United States (Montana)", + ); + + 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_MT, + "United States (Montana)", + ); + + 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_MT, + "United States (Montana)", + ); + + 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"), + (NaiveDate::from_ymd_res(2008, 11, 4)?, "Election Day"), + ], + &mut map, + Country::US_MT, + "United States (Montana)", + ); + + 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_MT, + "United States (Montana)", + ); + + 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"), + (NaiveDate::from_ymd_res(2010, 11, 2)?, "Election Day"), + ], + &mut map, + Country::US_MT, + "United States (Montana)", + ); + + 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_MT, + "United States (Montana)", + ); + + 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"), + (NaiveDate::from_ymd_res(2012, 11, 6)?, "Election Day"), + ], + &mut map, + Country::US_MT, + "United States (Montana)", + ); + + 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_MT, + "United States (Montana)", + ); + + 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"), + (NaiveDate::from_ymd_res(2014, 11, 4)?, "Election Day"), + ], + &mut map, + Country::US_MT, + "United States (Montana)", + ); + + 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_MT, + "United States (Montana)", + ); + + 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"), + (NaiveDate::from_ymd_res(2016, 11, 8)?, "Election Day"), + ], + &mut map, + Country::US_MT, + "United States (Montana)", + ); + + 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_MT, + "United States (Montana)", + ); + + 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"), + (NaiveDate::from_ymd_res(2018, 11, 6)?, "Election Day"), + ], + &mut map, + Country::US_MT, + "United States (Montana)", + ); + + 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_MT, + "United States (Montana)", + ); + + 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"), + (NaiveDate::from_ymd_res(2020, 11, 3)?, "Election Day"), + ], + &mut map, + Country::US_MT, + "United States (Montana)", + ); + + 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_MT, + "United States (Montana)", + ); + + 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"), + (NaiveDate::from_ymd_res(2022, 11, 8)?, "Election Day"), + ], + &mut map, + Country::US_MT, + "United States (Montana)", + ); + + 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_MT, + "United States (Montana)", + ); + + 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"), + (NaiveDate::from_ymd_res(2024, 11, 5)?, "Election Day"), + ], + &mut map, + Country::US_MT, + "United States (Montana)", + ); + + 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_MT, + "United States (Montana)", + ); + + 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"), + (NaiveDate::from_ymd_res(2026, 11, 3)?, "Election Day"), + ], + &mut map, + Country::US_MT, + "United States (Montana)", + ); + + 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_MT, + "United States (Montana)", + ); + + 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"), + (NaiveDate::from_ymd_res(2028, 11, 7)?, "Election Day"), + ], + &mut map, + Country::US_MT, + "United States (Montana)", + ); + + 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_MT, + "United States (Montana)", + ); + + 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"), + (NaiveDate::from_ymd_res(2030, 11, 5)?, "Election Day"), + ], + &mut map, + Country::US_MT, + "United States (Montana)", + ); + + Ok(map) +} diff --git a/src/data/us_nc.rs b/src/data/us_nc.rs new file mode 100644 index 0000000..7e137cd --- /dev/null +++ b/src/data/us_nc.rs @@ -0,0 +1,1266 @@ +//! United States (North Carolina) +use super::*; + +/// Generate holiday map for United States (North Carolina). +#[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, 4, 21)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2000, 11, 24)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_NC, + "United States (North Carolina)", + ); + + 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, 4, 13)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2001, 11, 23)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_NC, + "United States (North Carolina)", + ); + + 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, 3, 29)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2002, 11, 29)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_NC, + "United States (North Carolina)", + ); + + 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, 4, 18)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2003, 11, 28)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_NC, + "United States (North Carolina)", + ); + + 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, 4, 9)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2004, 11, 26)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_NC, + "United States (North Carolina)", + ); + + 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, 3, 25)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2005, 11, 25)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_NC, + "United States (North Carolina)", + ); + + 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, 4, 14)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2006, 11, 24)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_NC, + "United States (North Carolina)", + ); + + 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, 4, 6)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2007, 11, 23)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_NC, + "United States (North Carolina)", + ); + + 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, 3, 21)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2008, 11, 28)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_NC, + "United States (North Carolina)", + ); + + 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, 4, 10)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2009, 11, 27)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_NC, + "United States (North Carolina)", + ); + + 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, 4, 2)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2010, 11, 26)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_NC, + "United States (North Carolina)", + ); + + 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, 4, 22)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2011, 11, 25)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_NC, + "United States (North Carolina)", + ); + + 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, 4, 6)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2012, 11, 23)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_NC, + "United States (North Carolina)", + ); + + 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, 3, 29)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2013, 11, 29)?, + "Day After Thanksgiving", + ), + (NaiveDate::from_ymd_res(2013, 12, 24)?, "Christmas Eve"), + ( + NaiveDate::from_ymd_res(2013, 12, 26)?, + "Day After Christmas", + ), + ], + &mut map, + Country::US_NC, + "United States (North Carolina)", + ); + + 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, 4, 18)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2014, 11, 28)?, + "Day After Thanksgiving", + ), + (NaiveDate::from_ymd_res(2014, 12, 24)?, "Christmas Eve"), + ( + NaiveDate::from_ymd_res(2014, 12, 26)?, + "Day After Christmas", + ), + ], + &mut map, + Country::US_NC, + "United States (North Carolina)", + ); + + 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, 4, 3)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2015, 11, 27)?, + "Day After Thanksgiving", + ), + (NaiveDate::from_ymd_res(2015, 12, 24)?, "Christmas Eve"), + ( + NaiveDate::from_ymd_res(2015, 12, 26)?, + "Day After Christmas", + ), + ( + NaiveDate::from_ymd_res(2015, 12, 28)?, + "Day After Christmas (observed)", + ), + ], + &mut map, + Country::US_NC, + "United States (North Carolina)", + ); + + 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); Day After Christmas", + ), + ( + 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, 3, 25)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2016, 11, 25)?, + "Day After Thanksgiving", + ), + (NaiveDate::from_ymd_res(2016, 12, 24)?, "Christmas Eve"), + ( + NaiveDate::from_ymd_res(2016, 12, 23)?, + "Christmas Eve (observed)", + ), + ( + NaiveDate::from_ymd_res(2016, 12, 27)?, + "Day After Christmas (observed)", + ), + ], + &mut map, + Country::US_NC, + "United States (North Carolina)", + ); + + 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, 4, 14)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2017, 11, 24)?, + "Day After Thanksgiving", + ), + (NaiveDate::from_ymd_res(2017, 12, 24)?, "Christmas Eve"), + ( + NaiveDate::from_ymd_res(2017, 12, 22)?, + "Christmas Eve (observed)", + ), + ( + NaiveDate::from_ymd_res(2017, 12, 26)?, + "Day After Christmas", + ), + ], + &mut map, + Country::US_NC, + "United States (North Carolina)", + ); + + 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, 3, 30)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2018, 11, 23)?, + "Day After Thanksgiving", + ), + (NaiveDate::from_ymd_res(2018, 12, 24)?, "Christmas Eve"), + ( + NaiveDate::from_ymd_res(2018, 12, 26)?, + "Day After Christmas", + ), + ], + &mut map, + Country::US_NC, + "United States (North Carolina)", + ); + + 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, 4, 19)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2019, 11, 29)?, + "Day After Thanksgiving", + ), + (NaiveDate::from_ymd_res(2019, 12, 24)?, "Christmas Eve"), + ( + NaiveDate::from_ymd_res(2019, 12, 26)?, + "Day After Christmas", + ), + ], + &mut map, + Country::US_NC, + "United States (North Carolina)", + ); + + 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, 4, 10)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2020, 11, 27)?, + "Day After Thanksgiving", + ), + (NaiveDate::from_ymd_res(2020, 12, 24)?, "Christmas Eve"), + ( + NaiveDate::from_ymd_res(2020, 12, 26)?, + "Day After Christmas", + ), + ( + NaiveDate::from_ymd_res(2020, 12, 28)?, + "Day After Christmas (observed)", + ), + ], + &mut map, + Country::US_NC, + "United States (North Carolina)", + ); + + 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); Christmas Eve", + ), + ( + 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, 4, 2)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2021, 11, 26)?, + "Day After Thanksgiving", + ), + ( + NaiveDate::from_ymd_res(2021, 12, 23)?, + "Christmas Eve (observed)", + ), + ( + NaiveDate::from_ymd_res(2021, 12, 26)?, + "Day After Christmas", + ), + ( + NaiveDate::from_ymd_res(2021, 12, 27)?, + "Day After Christmas (observed)", + ), + ], + &mut map, + Country::US_NC, + "United States (North Carolina)", + ); + + 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); Day After Christmas", + ), + ( + 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, 4, 15)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2022, 11, 25)?, + "Day After Thanksgiving", + ), + (NaiveDate::from_ymd_res(2022, 12, 24)?, "Christmas Eve"), + ( + NaiveDate::from_ymd_res(2022, 12, 23)?, + "Christmas Eve (observed)", + ), + ( + NaiveDate::from_ymd_res(2022, 12, 27)?, + "Day After Christmas (observed)", + ), + ], + &mut map, + Country::US_NC, + "United States (North Carolina)", + ); + + 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, 4, 7)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2023, 11, 24)?, + "Day After Thanksgiving", + ), + (NaiveDate::from_ymd_res(2023, 12, 24)?, "Christmas Eve"), + ( + NaiveDate::from_ymd_res(2023, 12, 22)?, + "Christmas Eve (observed)", + ), + ( + NaiveDate::from_ymd_res(2023, 12, 26)?, + "Day After Christmas", + ), + ], + &mut map, + Country::US_NC, + "United States (North Carolina)", + ); + + 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, 3, 29)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2024, 11, 29)?, + "Day After Thanksgiving", + ), + (NaiveDate::from_ymd_res(2024, 12, 24)?, "Christmas Eve"), + ( + NaiveDate::from_ymd_res(2024, 12, 26)?, + "Day After Christmas", + ), + ], + &mut map, + Country::US_NC, + "United States (North Carolina)", + ); + + 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, 4, 18)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2025, 11, 28)?, + "Day After Thanksgiving", + ), + (NaiveDate::from_ymd_res(2025, 12, 24)?, "Christmas Eve"), + ( + NaiveDate::from_ymd_res(2025, 12, 26)?, + "Day After Christmas", + ), + ], + &mut map, + Country::US_NC, + "United States (North Carolina)", + ); + + 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, 4, 3)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2026, 11, 27)?, + "Day After Thanksgiving", + ), + (NaiveDate::from_ymd_res(2026, 12, 24)?, "Christmas Eve"), + ( + NaiveDate::from_ymd_res(2026, 12, 26)?, + "Day After Christmas", + ), + ( + NaiveDate::from_ymd_res(2026, 12, 28)?, + "Day After Christmas (observed)", + ), + ], + &mut map, + Country::US_NC, + "United States (North Carolina)", + ); + + 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); Christmas Eve", + ), + ( + 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, 3, 26)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2027, 11, 26)?, + "Day After Thanksgiving", + ), + ( + NaiveDate::from_ymd_res(2027, 12, 23)?, + "Christmas Eve (observed)", + ), + ( + NaiveDate::from_ymd_res(2027, 12, 26)?, + "Day After Christmas", + ), + ( + NaiveDate::from_ymd_res(2027, 12, 27)?, + "Day After Christmas (observed)", + ), + ], + &mut map, + Country::US_NC, + "United States (North Carolina)", + ); + + 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, 4, 14)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2028, 11, 24)?, + "Day After Thanksgiving", + ), + (NaiveDate::from_ymd_res(2028, 12, 24)?, "Christmas Eve"), + ( + NaiveDate::from_ymd_res(2028, 12, 22)?, + "Christmas Eve (observed)", + ), + ( + NaiveDate::from_ymd_res(2028, 12, 26)?, + "Day After Christmas", + ), + ], + &mut map, + Country::US_NC, + "United States (North Carolina)", + ); + + 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, 3, 30)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2029, 11, 23)?, + "Day After Thanksgiving", + ), + (NaiveDate::from_ymd_res(2029, 12, 24)?, "Christmas Eve"), + ( + NaiveDate::from_ymd_res(2029, 12, 26)?, + "Day After Christmas", + ), + ], + &mut map, + Country::US_NC, + "United States (North Carolina)", + ); + + 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, 4, 19)?, "Good Friday"), + ( + NaiveDate::from_ymd_res(2030, 11, 29)?, + "Day After Thanksgiving", + ), + (NaiveDate::from_ymd_res(2030, 12, 24)?, "Christmas Eve"), + ( + NaiveDate::from_ymd_res(2030, 12, 26)?, + "Day After Christmas", + ), + ], + &mut map, + Country::US_NC, + "United States (North Carolina)", + ); + + Ok(map) +} diff --git a/src/data/us_nd.rs b/src/data/us_nd.rs new file mode 100644 index 0000000..9e122f8 --- /dev/null +++ b/src/data/us_nd.rs @@ -0,0 +1,975 @@ +//! United States (North Dakota) +use super::*; + +/// Generate holiday map for United States (North Dakota). +#[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", + ), + ], + &mut map, + Country::US_ND, + "United States (North Dakota)", + ); + + 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", + ), + ], + &mut map, + Country::US_ND, + "United States (North Dakota)", + ); + + 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", + ), + ], + &mut map, + Country::US_ND, + "United States (North Dakota)", + ); + + 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", + ), + ], + &mut map, + Country::US_ND, + "United States (North Dakota)", + ); + + 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", + ), + ], + &mut map, + Country::US_ND, + "United States (North Dakota)", + ); + + 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", + ), + ], + &mut map, + Country::US_ND, + "United States (North Dakota)", + ); + + 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", + ), + ], + &mut map, + Country::US_ND, + "United States (North Dakota)", + ); + + 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", + ), + ], + &mut map, + Country::US_ND, + "United States (North Dakota)", + ); + + 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", + ), + ], + &mut map, + Country::US_ND, + "United States (North Dakota)", + ); + + 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", + ), + ], + &mut map, + Country::US_ND, + "United States (North Dakota)", + ); + + 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", + ), + ], + &mut map, + Country::US_ND, + "United States (North Dakota)", + ); + + 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", + ), + ], + &mut map, + Country::US_ND, + "United States (North Dakota)", + ); + + 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", + ), + ], + &mut map, + Country::US_ND, + "United States (North Dakota)", + ); + + 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", + ), + ], + &mut map, + Country::US_ND, + "United States (North Dakota)", + ); + + 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", + ), + ], + &mut map, + Country::US_ND, + "United States (North Dakota)", + ); + + 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", + ), + ], + &mut map, + Country::US_ND, + "United States (North Dakota)", + ); + + 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", + ), + ], + &mut map, + Country::US_ND, + "United States (North Dakota)", + ); + + 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", + ), + ], + &mut map, + Country::US_ND, + "United States (North Dakota)", + ); + + 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", + ), + ], + &mut map, + Country::US_ND, + "United States (North Dakota)", + ); + + 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", + ), + ], + &mut map, + Country::US_ND, + "United States (North Dakota)", + ); + + 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", + ), + ], + &mut map, + Country::US_ND, + "United States (North Dakota)", + ); + + 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", + ), + ], + &mut map, + Country::US_ND, + "United States (North Dakota)", + ); + + 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", + ), + ], + &mut map, + Country::US_ND, + "United States (North Dakota)", + ); + + 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", + ), + ], + &mut map, + Country::US_ND, + "United States (North Dakota)", + ); + + 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", + ), + ], + &mut map, + Country::US_ND, + "United States (North Dakota)", + ); + + 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", + ), + ], + &mut map, + Country::US_ND, + "United States (North Dakota)", + ); + + 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", + ), + ], + &mut map, + Country::US_ND, + "United States (North Dakota)", + ); + + 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", + ), + ], + &mut map, + Country::US_ND, + "United States (North Dakota)", + ); + + 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", + ), + ], + &mut map, + Country::US_ND, + "United States (North Dakota)", + ); + + 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", + ), + ], + &mut map, + Country::US_ND, + "United States (North Dakota)", + ); + + 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", + ), + ], + &mut map, + Country::US_ND, + "United States (North Dakota)", + ); + + Ok(map) +} diff --git a/src/data/us_ne.rs b/src/data/us_ne.rs new file mode 100644 index 0000000..f3011ad --- /dev/null +++ b/src/data/us_ne.rs @@ -0,0 +1,1070 @@ +//! United States (Nebraska) +use super::*; + +/// Generate holiday map for United States (Nebraska). +#[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, 4, 28)?, "Arbor Day"), + (NaiveDate::from_ymd_res(2000, 10, 9)?, "Columbus Day"), + ], + &mut map, + Country::US_NE, + "United States (Nebraska)", + ); + + 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, 4, 27)?, "Arbor Day"), + (NaiveDate::from_ymd_res(2001, 10, 8)?, "Columbus Day"), + ], + &mut map, + Country::US_NE, + "United States (Nebraska)", + ); + + 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, 4, 26)?, "Arbor Day"), + (NaiveDate::from_ymd_res(2002, 10, 14)?, "Columbus Day"), + ], + &mut map, + Country::US_NE, + "United States (Nebraska)", + ); + + 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, 4, 25)?, "Arbor Day"), + (NaiveDate::from_ymd_res(2003, 10, 13)?, "Columbus Day"), + ], + &mut map, + Country::US_NE, + "United States (Nebraska)", + ); + + 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, 4, 30)?, "Arbor Day"), + (NaiveDate::from_ymd_res(2004, 10, 11)?, "Columbus Day"), + ], + &mut map, + Country::US_NE, + "United States (Nebraska)", + ); + + 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, 4, 29)?, "Arbor Day"), + (NaiveDate::from_ymd_res(2005, 10, 10)?, "Columbus Day"), + ], + &mut map, + Country::US_NE, + "United States (Nebraska)", + ); + + 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, 4, 28)?, "Arbor Day"), + (NaiveDate::from_ymd_res(2006, 10, 9)?, "Columbus Day"), + ], + &mut map, + Country::US_NE, + "United States (Nebraska)", + ); + + 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, 4, 27)?, "Arbor Day"), + (NaiveDate::from_ymd_res(2007, 10, 8)?, "Columbus Day"), + ], + &mut map, + Country::US_NE, + "United States (Nebraska)", + ); + + 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, 4, 25)?, "Arbor Day"), + (NaiveDate::from_ymd_res(2008, 10, 13)?, "Columbus Day"), + ], + &mut map, + Country::US_NE, + "United States (Nebraska)", + ); + + 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, 4, 24)?, "Arbor Day"), + (NaiveDate::from_ymd_res(2009, 10, 12)?, "Columbus Day"), + ], + &mut map, + Country::US_NE, + "United States (Nebraska)", + ); + + 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, 4, 30)?, "Arbor Day"), + (NaiveDate::from_ymd_res(2010, 10, 11)?, "Columbus Day"), + ], + &mut map, + Country::US_NE, + "United States (Nebraska)", + ); + + 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, 4, 29)?, "Arbor Day"), + (NaiveDate::from_ymd_res(2011, 10, 10)?, "Columbus Day"), + ], + &mut map, + Country::US_NE, + "United States (Nebraska)", + ); + + 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, 4, 27)?, "Arbor Day"), + (NaiveDate::from_ymd_res(2012, 10, 8)?, "Columbus Day"), + ], + &mut map, + Country::US_NE, + "United States (Nebraska)", + ); + + 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, 4, 26)?, "Arbor Day"), + (NaiveDate::from_ymd_res(2013, 10, 14)?, "Columbus Day"), + ], + &mut map, + Country::US_NE, + "United States (Nebraska)", + ); + + 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, 4, 25)?, "Arbor Day"), + (NaiveDate::from_ymd_res(2014, 10, 13)?, "Columbus Day"), + ], + &mut map, + Country::US_NE, + "United States (Nebraska)", + ); + + 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, 4, 24)?, "Arbor Day"), + (NaiveDate::from_ymd_res(2015, 10, 12)?, "Columbus Day"), + ], + &mut map, + Country::US_NE, + "United States (Nebraska)", + ); + + 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, 4, 29)?, "Arbor Day"), + (NaiveDate::from_ymd_res(2016, 10, 10)?, "Columbus Day"), + ], + &mut map, + Country::US_NE, + "United States (Nebraska)", + ); + + 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, 4, 28)?, "Arbor Day"), + (NaiveDate::from_ymd_res(2017, 10, 9)?, "Columbus Day"), + ], + &mut map, + Country::US_NE, + "United States (Nebraska)", + ); + + 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, 4, 27)?, "Arbor Day"), + (NaiveDate::from_ymd_res(2018, 10, 8)?, "Columbus Day"), + ], + &mut map, + Country::US_NE, + "United States (Nebraska)", + ); + + 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, 4, 26)?, "Arbor Day"), + (NaiveDate::from_ymd_res(2019, 10, 14)?, "Columbus Day"), + ], + &mut map, + Country::US_NE, + "United States (Nebraska)", + ); + + 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, 4, 24)?, "Arbor Day"), + ( + NaiveDate::from_ymd_res(2020, 10, 12)?, + "Indigenous Peoples' Day", + ), + ], + &mut map, + Country::US_NE, + "United States (Nebraska)", + ); + + 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, 4, 30)?, "Arbor Day"), + ( + NaiveDate::from_ymd_res(2021, 10, 11)?, + "Indigenous Peoples' Day", + ), + ], + &mut map, + Country::US_NE, + "United States (Nebraska)", + ); + + 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, 4, 29)?, "Arbor Day"), + ( + NaiveDate::from_ymd_res(2022, 10, 10)?, + "Indigenous Peoples' Day", + ), + ], + &mut map, + Country::US_NE, + "United States (Nebraska)", + ); + + 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, 4, 28)?, "Arbor Day"), + ( + NaiveDate::from_ymd_res(2023, 10, 9)?, + "Indigenous Peoples' Day", + ), + ], + &mut map, + Country::US_NE, + "United States (Nebraska)", + ); + + 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, 4, 26)?, "Arbor Day"), + ( + NaiveDate::from_ymd_res(2024, 10, 14)?, + "Indigenous Peoples' Day", + ), + ], + &mut map, + Country::US_NE, + "United States (Nebraska)", + ); + + 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, 4, 25)?, "Arbor Day"), + ( + NaiveDate::from_ymd_res(2025, 10, 13)?, + "Indigenous Peoples' Day", + ), + ], + &mut map, + Country::US_NE, + "United States (Nebraska)", + ); + + 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, 4, 24)?, "Arbor Day"), + ( + NaiveDate::from_ymd_res(2026, 10, 12)?, + "Indigenous Peoples' Day", + ), + ], + &mut map, + Country::US_NE, + "United States (Nebraska)", + ); + + 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, 4, 30)?, "Arbor Day"), + ( + NaiveDate::from_ymd_res(2027, 10, 11)?, + "Indigenous Peoples' Day", + ), + ], + &mut map, + Country::US_NE, + "United States (Nebraska)", + ); + + 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, 4, 28)?, "Arbor Day"), + ( + NaiveDate::from_ymd_res(2028, 10, 9)?, + "Indigenous Peoples' Day", + ), + ], + &mut map, + Country::US_NE, + "United States (Nebraska)", + ); + + 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, 4, 27)?, "Arbor Day"), + ( + NaiveDate::from_ymd_res(2029, 10, 8)?, + "Indigenous Peoples' Day", + ), + ], + &mut map, + Country::US_NE, + "United States (Nebraska)", + ); + + 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, 4, 26)?, "Arbor Day"), + ( + NaiveDate::from_ymd_res(2030, 10, 14)?, + "Indigenous Peoples' Day", + ), + ], + &mut map, + Country::US_NE, + "United States (Nebraska)", + ); + + Ok(map) +} diff --git a/src/data/us_nh.rs b/src/data/us_nh.rs new file mode 100644 index 0000000..48da392 --- /dev/null +++ b/src/data/us_nh.rs @@ -0,0 +1,1111 @@ +//! United States (New Hampshire) +use super::*; + +/// Generate holiday map for United States (New Hampshire). +#[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, 2, 21)?, + "Washington's Birthday", + ), + ( + NaiveDate::from_ymd_res(2000, 1, 17)?, + "Dr. Martin Luther King Jr. / Civil Rights Day", + ), + ( + NaiveDate::from_ymd_res(2000, 11, 24)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_NH, + "United States (New Hampshire)", + ); + + 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, 2, 19)?, + "Washington's Birthday", + ), + ( + NaiveDate::from_ymd_res(2001, 1, 15)?, + "Dr. Martin Luther King Jr. / Civil Rights Day", + ), + ( + NaiveDate::from_ymd_res(2001, 11, 23)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_NH, + "United States (New Hampshire)", + ); + + 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, 2, 18)?, + "Washington's Birthday", + ), + ( + NaiveDate::from_ymd_res(2002, 1, 21)?, + "Dr. Martin Luther King Jr. / Civil Rights Day", + ), + ( + NaiveDate::from_ymd_res(2002, 11, 29)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_NH, + "United States (New Hampshire)", + ); + + 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, 2, 17)?, + "Washington's Birthday", + ), + ( + NaiveDate::from_ymd_res(2003, 1, 20)?, + "Dr. Martin Luther King Jr. / Civil Rights Day", + ), + ( + NaiveDate::from_ymd_res(2003, 11, 28)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_NH, + "United States (New Hampshire)", + ); + + 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, 2, 16)?, + "Washington's Birthday", + ), + ( + NaiveDate::from_ymd_res(2004, 1, 19)?, + "Dr. Martin Luther King Jr. / Civil Rights Day", + ), + ( + NaiveDate::from_ymd_res(2004, 11, 26)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_NH, + "United States (New Hampshire)", + ); + + 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, 2, 21)?, + "Washington's Birthday", + ), + ( + NaiveDate::from_ymd_res(2005, 1, 17)?, + "Dr. Martin Luther King Jr. / Civil Rights Day", + ), + ( + NaiveDate::from_ymd_res(2005, 11, 25)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_NH, + "United States (New Hampshire)", + ); + + 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, 2, 20)?, + "Washington's Birthday", + ), + ( + NaiveDate::from_ymd_res(2006, 1, 16)?, + "Dr. Martin Luther King Jr. / Civil Rights Day", + ), + ( + NaiveDate::from_ymd_res(2006, 11, 24)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_NH, + "United States (New Hampshire)", + ); + + 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, 2, 19)?, + "Washington's Birthday", + ), + ( + NaiveDate::from_ymd_res(2007, 1, 15)?, + "Dr. Martin Luther King Jr. / Civil Rights Day", + ), + ( + NaiveDate::from_ymd_res(2007, 11, 23)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_NH, + "United States (New Hampshire)", + ); + + 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, 2, 18)?, + "Washington's Birthday", + ), + ( + NaiveDate::from_ymd_res(2008, 1, 21)?, + "Dr. Martin Luther King Jr. / Civil Rights Day", + ), + (NaiveDate::from_ymd_res(2008, 11, 4)?, "Election Day"), + ( + NaiveDate::from_ymd_res(2008, 11, 28)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_NH, + "United States (New Hampshire)", + ); + + 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, 2, 16)?, + "Washington's Birthday", + ), + ( + NaiveDate::from_ymd_res(2009, 1, 19)?, + "Dr. Martin Luther King Jr. / Civil Rights Day", + ), + ( + NaiveDate::from_ymd_res(2009, 11, 27)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_NH, + "United States (New Hampshire)", + ); + + 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, 2, 15)?, + "Washington's Birthday", + ), + ( + NaiveDate::from_ymd_res(2010, 1, 18)?, + "Dr. Martin Luther King Jr. / Civil Rights Day", + ), + (NaiveDate::from_ymd_res(2010, 11, 2)?, "Election Day"), + ( + NaiveDate::from_ymd_res(2010, 11, 26)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_NH, + "United States (New Hampshire)", + ); + + 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, 2, 21)?, + "Washington's Birthday", + ), + ( + NaiveDate::from_ymd_res(2011, 1, 17)?, + "Dr. Martin Luther King Jr. / Civil Rights Day", + ), + ( + NaiveDate::from_ymd_res(2011, 11, 25)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_NH, + "United States (New Hampshire)", + ); + + 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, 2, 20)?, + "Washington's Birthday", + ), + ( + NaiveDate::from_ymd_res(2012, 1, 16)?, + "Dr. Martin Luther King Jr. / Civil Rights Day", + ), + (NaiveDate::from_ymd_res(2012, 11, 6)?, "Election Day"), + ( + NaiveDate::from_ymd_res(2012, 11, 23)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_NH, + "United States (New Hampshire)", + ); + + 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, 2, 18)?, + "Washington's Birthday", + ), + ( + NaiveDate::from_ymd_res(2013, 1, 21)?, + "Dr. Martin Luther King Jr. / Civil Rights Day", + ), + ( + NaiveDate::from_ymd_res(2013, 11, 29)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_NH, + "United States (New Hampshire)", + ); + + 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, 2, 17)?, + "Washington's Birthday", + ), + ( + NaiveDate::from_ymd_res(2014, 1, 20)?, + "Dr. Martin Luther King Jr. / Civil Rights Day", + ), + (NaiveDate::from_ymd_res(2014, 11, 4)?, "Election Day"), + ( + NaiveDate::from_ymd_res(2014, 11, 28)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_NH, + "United States (New Hampshire)", + ); + + 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, 2, 16)?, + "Washington's Birthday", + ), + ( + NaiveDate::from_ymd_res(2015, 1, 19)?, + "Dr. Martin Luther King Jr. / Civil Rights Day", + ), + ( + NaiveDate::from_ymd_res(2015, 11, 27)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_NH, + "United States (New Hampshire)", + ); + + 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, 2, 15)?, + "Washington's Birthday", + ), + ( + NaiveDate::from_ymd_res(2016, 1, 18)?, + "Dr. Martin Luther King Jr. / Civil Rights Day", + ), + (NaiveDate::from_ymd_res(2016, 11, 8)?, "Election Day"), + ( + NaiveDate::from_ymd_res(2016, 11, 25)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_NH, + "United States (New Hampshire)", + ); + + 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, 2, 20)?, + "Washington's Birthday", + ), + ( + NaiveDate::from_ymd_res(2017, 1, 16)?, + "Dr. Martin Luther King Jr. / Civil Rights Day", + ), + ( + NaiveDate::from_ymd_res(2017, 11, 24)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_NH, + "United States (New Hampshire)", + ); + + 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, 2, 19)?, + "Washington's Birthday", + ), + ( + NaiveDate::from_ymd_res(2018, 1, 15)?, + "Dr. Martin Luther King Jr. / Civil Rights Day", + ), + (NaiveDate::from_ymd_res(2018, 11, 6)?, "Election Day"), + ( + NaiveDate::from_ymd_res(2018, 11, 23)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_NH, + "United States (New Hampshire)", + ); + + 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, 2, 18)?, + "Washington's Birthday", + ), + ( + NaiveDate::from_ymd_res(2019, 1, 21)?, + "Dr. Martin Luther King Jr. / Civil Rights Day", + ), + ( + NaiveDate::from_ymd_res(2019, 11, 29)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_NH, + "United States (New Hampshire)", + ); + + 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, 2, 17)?, + "Washington's Birthday", + ), + ( + NaiveDate::from_ymd_res(2020, 1, 20)?, + "Dr. Martin Luther King Jr. / Civil Rights Day", + ), + (NaiveDate::from_ymd_res(2020, 11, 3)?, "Election Day"), + ( + NaiveDate::from_ymd_res(2020, 11, 27)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_NH, + "United States (New Hampshire)", + ); + + 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, 2, 15)?, + "Washington's Birthday", + ), + ( + NaiveDate::from_ymd_res(2021, 1, 18)?, + "Dr. Martin Luther King Jr. / Civil Rights Day", + ), + ( + NaiveDate::from_ymd_res(2021, 11, 26)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_NH, + "United States (New Hampshire)", + ); + + 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, 2, 21)?, + "Washington's Birthday", + ), + ( + NaiveDate::from_ymd_res(2022, 1, 17)?, + "Dr. Martin Luther King Jr. / Civil Rights Day", + ), + (NaiveDate::from_ymd_res(2022, 11, 8)?, "Election Day"), + ( + NaiveDate::from_ymd_res(2022, 11, 25)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_NH, + "United States (New Hampshire)", + ); + + 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, 2, 20)?, + "Washington's Birthday", + ), + ( + NaiveDate::from_ymd_res(2023, 1, 16)?, + "Dr. Martin Luther King Jr. / Civil Rights Day", + ), + ( + NaiveDate::from_ymd_res(2023, 11, 24)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_NH, + "United States (New Hampshire)", + ); + + 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, 2, 19)?, + "Washington's Birthday", + ), + ( + NaiveDate::from_ymd_res(2024, 1, 15)?, + "Dr. Martin Luther King Jr. / Civil Rights Day", + ), + (NaiveDate::from_ymd_res(2024, 11, 5)?, "Election Day"), + ( + NaiveDate::from_ymd_res(2024, 11, 29)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_NH, + "United States (New Hampshire)", + ); + + 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, 2, 17)?, + "Washington's Birthday", + ), + ( + NaiveDate::from_ymd_res(2025, 1, 20)?, + "Dr. Martin Luther King Jr. / Civil Rights Day", + ), + ( + NaiveDate::from_ymd_res(2025, 11, 28)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_NH, + "United States (New Hampshire)", + ); + + 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, 2, 16)?, + "Washington's Birthday", + ), + ( + NaiveDate::from_ymd_res(2026, 1, 19)?, + "Dr. Martin Luther King Jr. / Civil Rights Day", + ), + (NaiveDate::from_ymd_res(2026, 11, 3)?, "Election Day"), + ( + NaiveDate::from_ymd_res(2026, 11, 27)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_NH, + "United States (New Hampshire)", + ); + + 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, 2, 15)?, + "Washington's Birthday", + ), + ( + NaiveDate::from_ymd_res(2027, 1, 18)?, + "Dr. Martin Luther King Jr. / Civil Rights Day", + ), + ( + NaiveDate::from_ymd_res(2027, 11, 26)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_NH, + "United States (New Hampshire)", + ); + + 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, 2, 21)?, + "Washington's Birthday", + ), + ( + NaiveDate::from_ymd_res(2028, 1, 17)?, + "Dr. Martin Luther King Jr. / Civil Rights Day", + ), + (NaiveDate::from_ymd_res(2028, 11, 7)?, "Election Day"), + ( + NaiveDate::from_ymd_res(2028, 11, 24)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_NH, + "United States (New Hampshire)", + ); + + 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, 2, 19)?, + "Washington's Birthday", + ), + ( + NaiveDate::from_ymd_res(2029, 1, 15)?, + "Dr. Martin Luther King Jr. / Civil Rights Day", + ), + ( + NaiveDate::from_ymd_res(2029, 11, 23)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_NH, + "United States (New Hampshire)", + ); + + 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, 2, 18)?, + "Washington's Birthday", + ), + ( + NaiveDate::from_ymd_res(2030, 1, 21)?, + "Dr. Martin Luther King Jr. / Civil Rights Day", + ), + (NaiveDate::from_ymd_res(2030, 11, 5)?, "Election Day"), + ( + NaiveDate::from_ymd_res(2030, 11, 29)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_NH, + "United States (New Hampshire)", + ); + + Ok(map) +} diff --git a/src/data/us_nj.rs b/src/data/us_nj.rs new file mode 100644 index 0000000..f2faa1a --- /dev/null +++ b/src/data/us_nj.rs @@ -0,0 +1,1116 @@ +//! United States (New Jersey) +use super::*; + +/// Generate holiday map for United States (New Jersey). +#[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"), + (NaiveDate::from_ymd_res(2000, 2, 12)?, "Lincoln's Birthday"), + ( + NaiveDate::from_ymd_res(2000, 2, 11)?, + "Lincoln's Birthday (observed)", + ), + (NaiveDate::from_ymd_res(2000, 4, 21)?, "Good Friday"), + ], + &mut map, + Country::US_NJ, + "United States (New Jersey)", + ); + + 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"), + (NaiveDate::from_ymd_res(2001, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2001, 4, 13)?, "Good Friday"), + ], + &mut map, + Country::US_NJ, + "United States (New Jersey)", + ); + + 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"), + (NaiveDate::from_ymd_res(2002, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2002, 3, 29)?, "Good Friday"), + ], + &mut map, + Country::US_NJ, + "United States (New Jersey)", + ); + + 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"), + (NaiveDate::from_ymd_res(2003, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2003, 4, 18)?, "Good Friday"), + ], + &mut map, + Country::US_NJ, + "United States (New Jersey)", + ); + + 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"), + (NaiveDate::from_ymd_res(2004, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2004, 4, 9)?, "Good Friday"), + ], + &mut map, + Country::US_NJ, + "United States (New Jersey)", + ); + + 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"), + (NaiveDate::from_ymd_res(2005, 2, 12)?, "Lincoln's Birthday"), + ( + NaiveDate::from_ymd_res(2005, 2, 11)?, + "Lincoln's Birthday (observed)", + ), + (NaiveDate::from_ymd_res(2005, 3, 25)?, "Good Friday"), + ], + &mut map, + Country::US_NJ, + "United States (New Jersey)", + ); + + 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"), + (NaiveDate::from_ymd_res(2006, 2, 12)?, "Lincoln's Birthday"), + ( + NaiveDate::from_ymd_res(2006, 2, 13)?, + "Lincoln's Birthday (observed)", + ), + (NaiveDate::from_ymd_res(2006, 4, 14)?, "Good Friday"), + ], + &mut map, + Country::US_NJ, + "United States (New Jersey)", + ); + + 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"), + (NaiveDate::from_ymd_res(2007, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2007, 4, 6)?, "Good Friday"), + ], + &mut map, + Country::US_NJ, + "United States (New Jersey)", + ); + + 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"), + (NaiveDate::from_ymd_res(2008, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2008, 3, 21)?, "Good Friday"), + (NaiveDate::from_ymd_res(2008, 11, 4)?, "Election Day"), + ], + &mut map, + Country::US_NJ, + "United States (New Jersey)", + ); + + 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"), + (NaiveDate::from_ymd_res(2009, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2009, 4, 10)?, "Good Friday"), + ], + &mut map, + Country::US_NJ, + "United States (New Jersey)", + ); + + 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"), + (NaiveDate::from_ymd_res(2010, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2010, 4, 2)?, "Good Friday"), + (NaiveDate::from_ymd_res(2010, 11, 2)?, "Election Day"), + ], + &mut map, + Country::US_NJ, + "United States (New Jersey)", + ); + + 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"), + (NaiveDate::from_ymd_res(2011, 2, 12)?, "Lincoln's Birthday"), + ( + NaiveDate::from_ymd_res(2011, 2, 11)?, + "Lincoln's Birthday (observed)", + ), + (NaiveDate::from_ymd_res(2011, 4, 22)?, "Good Friday"), + ], + &mut map, + Country::US_NJ, + "United States (New Jersey)", + ); + + 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"), + (NaiveDate::from_ymd_res(2012, 2, 12)?, "Lincoln's Birthday"), + ( + NaiveDate::from_ymd_res(2012, 2, 13)?, + "Lincoln's Birthday (observed)", + ), + (NaiveDate::from_ymd_res(2012, 4, 6)?, "Good Friday"), + (NaiveDate::from_ymd_res(2012, 11, 6)?, "Election Day"), + ], + &mut map, + Country::US_NJ, + "United States (New Jersey)", + ); + + 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"), + (NaiveDate::from_ymd_res(2013, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2013, 3, 29)?, "Good Friday"), + ], + &mut map, + Country::US_NJ, + "United States (New Jersey)", + ); + + 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"), + (NaiveDate::from_ymd_res(2014, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2014, 4, 18)?, "Good Friday"), + (NaiveDate::from_ymd_res(2014, 11, 4)?, "Election Day"), + ], + &mut map, + Country::US_NJ, + "United States (New Jersey)", + ); + + 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"), + (NaiveDate::from_ymd_res(2015, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2015, 4, 3)?, "Good Friday"), + ], + &mut map, + Country::US_NJ, + "United States (New Jersey)", + ); + + 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"), + (NaiveDate::from_ymd_res(2016, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2016, 3, 25)?, "Good Friday"), + (NaiveDate::from_ymd_res(2016, 11, 8)?, "Election Day"), + ], + &mut map, + Country::US_NJ, + "United States (New Jersey)", + ); + + 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"), + (NaiveDate::from_ymd_res(2017, 2, 12)?, "Lincoln's Birthday"), + ( + NaiveDate::from_ymd_res(2017, 2, 13)?, + "Lincoln's Birthday (observed)", + ), + (NaiveDate::from_ymd_res(2017, 4, 14)?, "Good Friday"), + ], + &mut map, + Country::US_NJ, + "United States (New Jersey)", + ); + + 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"), + (NaiveDate::from_ymd_res(2018, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2018, 3, 30)?, "Good Friday"), + (NaiveDate::from_ymd_res(2018, 11, 6)?, "Election Day"), + ], + &mut map, + Country::US_NJ, + "United States (New Jersey)", + ); + + 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"), + (NaiveDate::from_ymd_res(2019, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2019, 4, 19)?, "Good Friday"), + ], + &mut map, + Country::US_NJ, + "United States (New Jersey)", + ); + + 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"), + (NaiveDate::from_ymd_res(2020, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2020, 4, 10)?, "Good Friday"), + (NaiveDate::from_ymd_res(2020, 11, 3)?, "Election Day"), + ], + &mut map, + Country::US_NJ, + "United States (New Jersey)", + ); + + 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"), + (NaiveDate::from_ymd_res(2021, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2021, 4, 2)?, "Good Friday"), + ], + &mut map, + Country::US_NJ, + "United States (New Jersey)", + ); + + 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"), + (NaiveDate::from_ymd_res(2022, 2, 12)?, "Lincoln's Birthday"), + ( + NaiveDate::from_ymd_res(2022, 2, 11)?, + "Lincoln's Birthday (observed)", + ), + (NaiveDate::from_ymd_res(2022, 4, 15)?, "Good Friday"), + (NaiveDate::from_ymd_res(2022, 11, 8)?, "Election Day"), + ], + &mut map, + Country::US_NJ, + "United States (New Jersey)", + ); + + 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"), + (NaiveDate::from_ymd_res(2023, 2, 12)?, "Lincoln's Birthday"), + ( + NaiveDate::from_ymd_res(2023, 2, 13)?, + "Lincoln's Birthday (observed)", + ), + (NaiveDate::from_ymd_res(2023, 4, 7)?, "Good Friday"), + ], + &mut map, + Country::US_NJ, + "United States (New Jersey)", + ); + + 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"), + (NaiveDate::from_ymd_res(2024, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2024, 3, 29)?, "Good Friday"), + (NaiveDate::from_ymd_res(2024, 11, 5)?, "Election Day"), + ], + &mut map, + Country::US_NJ, + "United States (New Jersey)", + ); + + 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"), + (NaiveDate::from_ymd_res(2025, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2025, 4, 18)?, "Good Friday"), + ], + &mut map, + Country::US_NJ, + "United States (New Jersey)", + ); + + 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"), + (NaiveDate::from_ymd_res(2026, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2026, 4, 3)?, "Good Friday"), + (NaiveDate::from_ymd_res(2026, 11, 3)?, "Election Day"), + ], + &mut map, + Country::US_NJ, + "United States (New Jersey)", + ); + + 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"), + (NaiveDate::from_ymd_res(2027, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2027, 3, 26)?, "Good Friday"), + ], + &mut map, + Country::US_NJ, + "United States (New Jersey)", + ); + + 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"), + (NaiveDate::from_ymd_res(2028, 2, 12)?, "Lincoln's Birthday"), + ( + NaiveDate::from_ymd_res(2028, 2, 11)?, + "Lincoln's Birthday (observed)", + ), + (NaiveDate::from_ymd_res(2028, 4, 14)?, "Good Friday"), + (NaiveDate::from_ymd_res(2028, 11, 7)?, "Election Day"), + ], + &mut map, + Country::US_NJ, + "United States (New Jersey)", + ); + + 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"), + (NaiveDate::from_ymd_res(2029, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2029, 3, 30)?, "Good Friday"), + ], + &mut map, + Country::US_NJ, + "United States (New Jersey)", + ); + + 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"), + (NaiveDate::from_ymd_res(2030, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2030, 4, 19)?, "Good Friday"), + (NaiveDate::from_ymd_res(2030, 11, 5)?, "Election Day"), + ], + &mut map, + Country::US_NJ, + "United States (New Jersey)", + ); + + Ok(map) +} diff --git a/src/data/us_nm.rs b/src/data/us_nm.rs new file mode 100644 index 0000000..474bf16 --- /dev/null +++ b/src/data/us_nm.rs @@ -0,0 +1,949 @@ +//! United States (New Mexico) +use super::*; + +/// Generate holiday map for United States (New 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)?, "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, 10, 9)?, "Columbus Day"), + (NaiveDate::from_ymd_res(2000, 11, 24)?, "Presidents' Day"), + ], + &mut map, + Country::US_NM, + "United States (New Mexico)", + ); + + 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, 10, 8)?, "Columbus Day"), + (NaiveDate::from_ymd_res(2001, 11, 23)?, "Presidents' Day"), + ], + &mut map, + Country::US_NM, + "United States (New Mexico)", + ); + + 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, 10, 14)?, "Columbus Day"), + (NaiveDate::from_ymd_res(2002, 11, 29)?, "Presidents' Day"), + ], + &mut map, + Country::US_NM, + "United States (New Mexico)", + ); + + 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, 10, 13)?, "Columbus Day"), + (NaiveDate::from_ymd_res(2003, 11, 28)?, "Presidents' Day"), + ], + &mut map, + Country::US_NM, + "United States (New Mexico)", + ); + + 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, 10, 11)?, "Columbus Day"), + (NaiveDate::from_ymd_res(2004, 11, 26)?, "Presidents' Day"), + ], + &mut map, + Country::US_NM, + "United States (New Mexico)", + ); + + 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, 10, 10)?, "Columbus Day"), + (NaiveDate::from_ymd_res(2005, 11, 25)?, "Presidents' Day"), + ], + &mut map, + Country::US_NM, + "United States (New Mexico)", + ); + + 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, 10, 9)?, "Columbus Day"), + (NaiveDate::from_ymd_res(2006, 11, 24)?, "Presidents' Day"), + ], + &mut map, + Country::US_NM, + "United States (New Mexico)", + ); + + 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, 10, 8)?, "Columbus Day"), + (NaiveDate::from_ymd_res(2007, 11, 23)?, "Presidents' Day"), + ], + &mut map, + Country::US_NM, + "United States (New Mexico)", + ); + + 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, 10, 13)?, "Columbus Day"), + (NaiveDate::from_ymd_res(2008, 11, 28)?, "Presidents' Day"), + ], + &mut map, + Country::US_NM, + "United States (New Mexico)", + ); + + 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, 10, 12)?, "Columbus Day"), + (NaiveDate::from_ymd_res(2009, 11, 27)?, "Presidents' Day"), + ], + &mut map, + Country::US_NM, + "United States (New Mexico)", + ); + + 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, 10, 11)?, "Columbus Day"), + (NaiveDate::from_ymd_res(2010, 11, 26)?, "Presidents' Day"), + ], + &mut map, + Country::US_NM, + "United States (New Mexico)", + ); + + 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, 10, 10)?, "Columbus Day"), + (NaiveDate::from_ymd_res(2011, 11, 25)?, "Presidents' Day"), + ], + &mut map, + Country::US_NM, + "United States (New Mexico)", + ); + + 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, 10, 8)?, "Columbus Day"), + (NaiveDate::from_ymd_res(2012, 11, 23)?, "Presidents' Day"), + ], + &mut map, + Country::US_NM, + "United States (New Mexico)", + ); + + 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, 10, 14)?, "Columbus Day"), + (NaiveDate::from_ymd_res(2013, 11, 29)?, "Presidents' Day"), + ], + &mut map, + Country::US_NM, + "United States (New Mexico)", + ); + + 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, 10, 13)?, "Columbus Day"), + (NaiveDate::from_ymd_res(2014, 11, 28)?, "Presidents' Day"), + ], + &mut map, + Country::US_NM, + "United States (New Mexico)", + ); + + 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, 10, 12)?, "Columbus Day"), + (NaiveDate::from_ymd_res(2015, 11, 27)?, "Presidents' Day"), + ], + &mut map, + Country::US_NM, + "United States (New Mexico)", + ); + + 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, 10, 10)?, "Columbus Day"), + (NaiveDate::from_ymd_res(2016, 11, 25)?, "Presidents' Day"), + ], + &mut map, + Country::US_NM, + "United States (New Mexico)", + ); + + 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, 10, 9)?, "Columbus Day"), + (NaiveDate::from_ymd_res(2017, 11, 24)?, "Presidents' Day"), + ], + &mut map, + Country::US_NM, + "United States (New Mexico)", + ); + + 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, 10, 8)?, "Columbus Day"), + (NaiveDate::from_ymd_res(2018, 11, 23)?, "Presidents' Day"), + ], + &mut map, + Country::US_NM, + "United States (New Mexico)", + ); + + 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, 10, 14)?, + "Indigenous Peoples' Day", + ), + (NaiveDate::from_ymd_res(2019, 11, 29)?, "Presidents' Day"), + ], + &mut map, + Country::US_NM, + "United States (New Mexico)", + ); + + 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, 10, 12)?, + "Indigenous Peoples' Day", + ), + (NaiveDate::from_ymd_res(2020, 11, 27)?, "Presidents' Day"), + ], + &mut map, + Country::US_NM, + "United States (New Mexico)", + ); + + 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, 10, 11)?, + "Indigenous Peoples' Day", + ), + (NaiveDate::from_ymd_res(2021, 11, 26)?, "Presidents' Day"), + ], + &mut map, + Country::US_NM, + "United States (New Mexico)", + ); + + 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, 10, 10)?, + "Indigenous Peoples' Day", + ), + (NaiveDate::from_ymd_res(2022, 11, 25)?, "Presidents' Day"), + ], + &mut map, + Country::US_NM, + "United States (New Mexico)", + ); + + 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, 10, 9)?, + "Indigenous Peoples' Day", + ), + (NaiveDate::from_ymd_res(2023, 11, 24)?, "Presidents' Day"), + ], + &mut map, + Country::US_NM, + "United States (New Mexico)", + ); + + 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, 10, 14)?, + "Indigenous Peoples' Day", + ), + (NaiveDate::from_ymd_res(2024, 11, 29)?, "Presidents' Day"), + ], + &mut map, + Country::US_NM, + "United States (New Mexico)", + ); + + 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, 10, 13)?, + "Indigenous Peoples' Day", + ), + (NaiveDate::from_ymd_res(2025, 11, 28)?, "Presidents' Day"), + ], + &mut map, + Country::US_NM, + "United States (New Mexico)", + ); + + 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, 10, 12)?, + "Indigenous Peoples' Day", + ), + (NaiveDate::from_ymd_res(2026, 11, 27)?, "Presidents' Day"), + ], + &mut map, + Country::US_NM, + "United States (New Mexico)", + ); + + 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, 10, 11)?, + "Indigenous Peoples' Day", + ), + (NaiveDate::from_ymd_res(2027, 11, 26)?, "Presidents' Day"), + ], + &mut map, + Country::US_NM, + "United States (New Mexico)", + ); + + 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, 10, 9)?, + "Indigenous Peoples' Day", + ), + (NaiveDate::from_ymd_res(2028, 11, 24)?, "Presidents' Day"), + ], + &mut map, + Country::US_NM, + "United States (New Mexico)", + ); + + 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, 10, 8)?, + "Indigenous Peoples' Day", + ), + (NaiveDate::from_ymd_res(2029, 11, 23)?, "Presidents' Day"), + ], + &mut map, + Country::US_NM, + "United States (New Mexico)", + ); + + 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, 10, 14)?, + "Indigenous Peoples' Day", + ), + (NaiveDate::from_ymd_res(2030, 11, 29)?, "Presidents' Day"), + ], + &mut map, + Country::US_NM, + "United States (New Mexico)", + ); + + Ok(map) +} diff --git a/src/data/us_nv.rs b/src/data/us_nv.rs new file mode 100644 index 0000000..5b92de7 --- /dev/null +++ b/src/data/us_nv.rs @@ -0,0 +1,1037 @@ +//! United States (Nevada) +use super::*; + +/// Generate holiday map for United States (Nevada). +#[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, 27)?, "Nevada Day"), + (NaiveDate::from_ymd_res(2000, 11, 24)?, "Family Day"), + ], + &mut map, + Country::US_NV, + "United States (Nevada)", + ); + + 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, 26)?, "Nevada Day"), + (NaiveDate::from_ymd_res(2001, 11, 23)?, "Family Day"), + ], + &mut map, + Country::US_NV, + "United States (Nevada)", + ); + + 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, 25)?, "Nevada Day"), + (NaiveDate::from_ymd_res(2002, 11, 29)?, "Family Day"), + ], + &mut map, + Country::US_NV, + "United States (Nevada)", + ); + + 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, 31)?, "Nevada Day"), + (NaiveDate::from_ymd_res(2003, 11, 28)?, "Family Day"), + ], + &mut map, + Country::US_NV, + "United States (Nevada)", + ); + + 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, 29)?, "Nevada Day"), + (NaiveDate::from_ymd_res(2004, 11, 26)?, "Family Day"), + ], + &mut map, + Country::US_NV, + "United States (Nevada)", + ); + + 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, 28)?, "Nevada Day"), + (NaiveDate::from_ymd_res(2005, 11, 25)?, "Family Day"), + ], + &mut map, + Country::US_NV, + "United States (Nevada)", + ); + + 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, 27)?, "Nevada Day"), + (NaiveDate::from_ymd_res(2006, 11, 24)?, "Family Day"), + ], + &mut map, + Country::US_NV, + "United States (Nevada)", + ); + + 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, 26)?, "Nevada Day"), + (NaiveDate::from_ymd_res(2007, 11, 23)?, "Family Day"), + ], + &mut map, + Country::US_NV, + "United States (Nevada)", + ); + + 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, 31)?, "Nevada Day"), + (NaiveDate::from_ymd_res(2008, 11, 28)?, "Family Day"), + ], + &mut map, + Country::US_NV, + "United States (Nevada)", + ); + + 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, 30)?, "Nevada Day"), + (NaiveDate::from_ymd_res(2009, 11, 27)?, "Family Day"), + ], + &mut map, + Country::US_NV, + "United States (Nevada)", + ); + + 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, 29)?, "Nevada Day"), + (NaiveDate::from_ymd_res(2010, 11, 26)?, "Family Day"), + ], + &mut map, + Country::US_NV, + "United States (Nevada)", + ); + + 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, 28)?, "Nevada Day"), + (NaiveDate::from_ymd_res(2011, 11, 25)?, "Family Day"), + ], + &mut map, + Country::US_NV, + "United States (Nevada)", + ); + + 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, 26)?, "Nevada Day"), + (NaiveDate::from_ymd_res(2012, 11, 23)?, "Family Day"), + ], + &mut map, + Country::US_NV, + "United States (Nevada)", + ); + + 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, 25)?, "Nevada Day"), + (NaiveDate::from_ymd_res(2013, 11, 29)?, "Family Day"), + ], + &mut map, + Country::US_NV, + "United States (Nevada)", + ); + + 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, 31)?, "Nevada Day"), + (NaiveDate::from_ymd_res(2014, 11, 28)?, "Family Day"), + ], + &mut map, + Country::US_NV, + "United States (Nevada)", + ); + + 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, 30)?, "Nevada Day"), + (NaiveDate::from_ymd_res(2015, 11, 27)?, "Family Day"), + ], + &mut map, + Country::US_NV, + "United States (Nevada)", + ); + + 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, 28)?, "Nevada Day"), + (NaiveDate::from_ymd_res(2016, 11, 25)?, "Family Day"), + ], + &mut map, + Country::US_NV, + "United States (Nevada)", + ); + + 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, 27)?, "Nevada Day"), + (NaiveDate::from_ymd_res(2017, 11, 24)?, "Family Day"), + ], + &mut map, + Country::US_NV, + "United States (Nevada)", + ); + + 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, 26)?, "Nevada Day"), + (NaiveDate::from_ymd_res(2018, 11, 23)?, "Family Day"), + ], + &mut map, + Country::US_NV, + "United States (Nevada)", + ); + + 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, 25)?, "Nevada Day"), + (NaiveDate::from_ymd_res(2019, 11, 29)?, "Family Day"), + ], + &mut map, + Country::US_NV, + "United States (Nevada)", + ); + + 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, 30)?, "Nevada Day"), + (NaiveDate::from_ymd_res(2020, 11, 27)?, "Family Day"), + ], + &mut map, + Country::US_NV, + "United States (Nevada)", + ); + + 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, 29)?, "Nevada Day"), + (NaiveDate::from_ymd_res(2021, 11, 26)?, "Family Day"), + ], + &mut map, + Country::US_NV, + "United States (Nevada)", + ); + + 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, 28)?, "Nevada Day"), + (NaiveDate::from_ymd_res(2022, 11, 25)?, "Family Day"), + ], + &mut map, + Country::US_NV, + "United States (Nevada)", + ); + + 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, 27)?, "Nevada Day"), + (NaiveDate::from_ymd_res(2023, 11, 24)?, "Family Day"), + ], + &mut map, + Country::US_NV, + "United States (Nevada)", + ); + + 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, 25)?, "Nevada Day"), + (NaiveDate::from_ymd_res(2024, 11, 29)?, "Family Day"), + ], + &mut map, + Country::US_NV, + "United States (Nevada)", + ); + + 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, 31)?, "Nevada Day"), + (NaiveDate::from_ymd_res(2025, 11, 28)?, "Family Day"), + ], + &mut map, + Country::US_NV, + "United States (Nevada)", + ); + + 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, 30)?, "Nevada Day"), + (NaiveDate::from_ymd_res(2026, 11, 27)?, "Family Day"), + ], + &mut map, + Country::US_NV, + "United States (Nevada)", + ); + + 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, 29)?, "Nevada Day"), + (NaiveDate::from_ymd_res(2027, 11, 26)?, "Family Day"), + ], + &mut map, + Country::US_NV, + "United States (Nevada)", + ); + + 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, 27)?, "Nevada Day"), + (NaiveDate::from_ymd_res(2028, 11, 24)?, "Family Day"), + ], + &mut map, + Country::US_NV, + "United States (Nevada)", + ); + + 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, 26)?, "Nevada Day"), + (NaiveDate::from_ymd_res(2029, 11, 23)?, "Family Day"), + ], + &mut map, + Country::US_NV, + "United States (Nevada)", + ); + + 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, 25)?, "Nevada Day"), + (NaiveDate::from_ymd_res(2030, 11, 29)?, "Family Day"), + ], + &mut map, + Country::US_NV, + "United States (Nevada)", + ); + + Ok(map) +} diff --git a/src/data/us_ny.rs b/src/data/us_ny.rs new file mode 100644 index 0000000..fdbb88f --- /dev/null +++ b/src/data/us_ny.rs @@ -0,0 +1,1185 @@ +//! United States (New York) +use super::*; + +/// Generate holiday map for United States (New York). +#[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"), + (NaiveDate::from_ymd_res(2000, 2, 12)?, "Lincoln's Birthday"), + ( + NaiveDate::from_ymd_res(2000, 2, 11)?, + "Lincoln's Birthday (observed)", + ), + ], + &mut map, + Country::US_NY, + "United States (New York)", + ); + + 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"), + (NaiveDate::from_ymd_res(2001, 2, 12)?, "Lincoln's Birthday"), + ], + &mut map, + Country::US_NY, + "United States (New York)", + ); + + 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"), + (NaiveDate::from_ymd_res(2002, 2, 12)?, "Lincoln's Birthday"), + ], + &mut map, + Country::US_NY, + "United States (New York)", + ); + + 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"), + (NaiveDate::from_ymd_res(2003, 2, 12)?, "Lincoln's Birthday"), + ], + &mut map, + Country::US_NY, + "United States (New York)", + ); + + 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"), + (NaiveDate::from_ymd_res(2004, 2, 12)?, "Lincoln's Birthday"), + ( + NaiveDate::from_ymd_res(2004, 2, 15)?, + "Susan B. Anthony Day", + ), + ], + &mut map, + Country::US_NY, + "United States (New York)", + ); + + 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"), + (NaiveDate::from_ymd_res(2005, 2, 12)?, "Lincoln's Birthday"), + ( + NaiveDate::from_ymd_res(2005, 2, 11)?, + "Lincoln's Birthday (observed)", + ), + ( + NaiveDate::from_ymd_res(2005, 2, 15)?, + "Susan B. Anthony Day", + ), + ], + &mut map, + Country::US_NY, + "United States (New York)", + ); + + 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"), + (NaiveDate::from_ymd_res(2006, 2, 12)?, "Lincoln's Birthday"), + ( + NaiveDate::from_ymd_res(2006, 2, 13)?, + "Lincoln's Birthday (observed)", + ), + ( + NaiveDate::from_ymd_res(2006, 2, 15)?, + "Susan B. Anthony Day", + ), + ], + &mut map, + Country::US_NY, + "United States (New York)", + ); + + 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"), + (NaiveDate::from_ymd_res(2007, 2, 12)?, "Lincoln's Birthday"), + ( + NaiveDate::from_ymd_res(2007, 2, 15)?, + "Susan B. Anthony Day", + ), + ], + &mut map, + Country::US_NY, + "United States (New York)", + ); + + 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"), + (NaiveDate::from_ymd_res(2008, 2, 12)?, "Lincoln's Birthday"), + ( + NaiveDate::from_ymd_res(2008, 2, 15)?, + "Susan B. Anthony Day", + ), + (NaiveDate::from_ymd_res(2008, 11, 4)?, "Election Day"), + ], + &mut map, + Country::US_NY, + "United States (New York)", + ); + + 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"), + (NaiveDate::from_ymd_res(2009, 2, 12)?, "Lincoln's Birthday"), + ( + NaiveDate::from_ymd_res(2009, 2, 15)?, + "Susan B. Anthony Day", + ), + ], + &mut map, + Country::US_NY, + "United States (New York)", + ); + + 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)?, + "Susan B. Anthony Day; Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2010, 10, 11)?, "Columbus Day"), + (NaiveDate::from_ymd_res(2010, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2010, 11, 2)?, "Election Day"), + ], + &mut map, + Country::US_NY, + "United States (New York)", + ); + + 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"), + (NaiveDate::from_ymd_res(2011, 2, 12)?, "Lincoln's Birthday"), + ( + NaiveDate::from_ymd_res(2011, 2, 11)?, + "Lincoln's Birthday (observed)", + ), + ( + NaiveDate::from_ymd_res(2011, 2, 15)?, + "Susan B. Anthony Day", + ), + ], + &mut map, + Country::US_NY, + "United States (New York)", + ); + + 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"), + (NaiveDate::from_ymd_res(2012, 2, 12)?, "Lincoln's Birthday"), + ( + NaiveDate::from_ymd_res(2012, 2, 13)?, + "Lincoln's Birthday (observed)", + ), + ( + NaiveDate::from_ymd_res(2012, 2, 15)?, + "Susan B. Anthony Day", + ), + (NaiveDate::from_ymd_res(2012, 11, 6)?, "Election Day"), + ], + &mut map, + Country::US_NY, + "United States (New York)", + ); + + 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"), + (NaiveDate::from_ymd_res(2013, 2, 12)?, "Lincoln's Birthday"), + ( + NaiveDate::from_ymd_res(2013, 2, 15)?, + "Susan B. Anthony Day", + ), + ], + &mut map, + Country::US_NY, + "United States (New York)", + ); + + 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"), + (NaiveDate::from_ymd_res(2014, 2, 12)?, "Lincoln's Birthday"), + ( + NaiveDate::from_ymd_res(2014, 2, 15)?, + "Susan B. Anthony Day", + ), + (NaiveDate::from_ymd_res(2014, 11, 4)?, "Election Day"), + ], + &mut map, + Country::US_NY, + "United States (New York)", + ); + + 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"), + (NaiveDate::from_ymd_res(2015, 2, 12)?, "Lincoln's Birthday"), + ( + NaiveDate::from_ymd_res(2015, 2, 15)?, + "Susan B. Anthony Day", + ), + (NaiveDate::from_ymd_res(2015, 11, 3)?, "Election Day"), + ], + &mut map, + Country::US_NY, + "United States (New York)", + ); + + 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)?, + "Susan B. Anthony Day; Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2016, 10, 10)?, "Columbus Day"), + (NaiveDate::from_ymd_res(2016, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2016, 11, 8)?, "Election Day"), + ], + &mut map, + Country::US_NY, + "United States (New York)", + ); + + 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"), + (NaiveDate::from_ymd_res(2017, 2, 12)?, "Lincoln's Birthday"), + ( + NaiveDate::from_ymd_res(2017, 2, 13)?, + "Lincoln's Birthday (observed)", + ), + ( + NaiveDate::from_ymd_res(2017, 2, 15)?, + "Susan B. Anthony Day", + ), + (NaiveDate::from_ymd_res(2017, 11, 7)?, "Election Day"), + ], + &mut map, + Country::US_NY, + "United States (New York)", + ); + + 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"), + (NaiveDate::from_ymd_res(2018, 2, 12)?, "Lincoln's Birthday"), + ( + NaiveDate::from_ymd_res(2018, 2, 15)?, + "Susan B. Anthony Day", + ), + (NaiveDate::from_ymd_res(2018, 11, 6)?, "Election Day"), + ], + &mut map, + Country::US_NY, + "United States (New York)", + ); + + 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"), + (NaiveDate::from_ymd_res(2019, 2, 12)?, "Lincoln's Birthday"), + ( + NaiveDate::from_ymd_res(2019, 2, 15)?, + "Susan B. Anthony Day", + ), + (NaiveDate::from_ymd_res(2019, 11, 5)?, "Election Day"), + ], + &mut map, + Country::US_NY, + "United States (New York)", + ); + + 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"), + (NaiveDate::from_ymd_res(2020, 2, 12)?, "Lincoln's Birthday"), + ( + NaiveDate::from_ymd_res(2020, 2, 15)?, + "Susan B. Anthony Day", + ), + (NaiveDate::from_ymd_res(2020, 11, 3)?, "Election Day"), + ], + &mut map, + Country::US_NY, + "United States (New York)", + ); + + 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)?, + "Susan B. Anthony Day; Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2021, 10, 11)?, "Columbus Day"), + (NaiveDate::from_ymd_res(2021, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2021, 11, 2)?, "Election Day"), + ], + &mut map, + Country::US_NY, + "United States (New York)", + ); + + 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"), + (NaiveDate::from_ymd_res(2022, 2, 12)?, "Lincoln's Birthday"), + ( + NaiveDate::from_ymd_res(2022, 2, 11)?, + "Lincoln's Birthday (observed)", + ), + ( + NaiveDate::from_ymd_res(2022, 2, 15)?, + "Susan B. Anthony Day", + ), + (NaiveDate::from_ymd_res(2022, 11, 8)?, "Election Day"), + ], + &mut map, + Country::US_NY, + "United States (New York)", + ); + + 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"), + (NaiveDate::from_ymd_res(2023, 2, 12)?, "Lincoln's Birthday"), + ( + NaiveDate::from_ymd_res(2023, 2, 13)?, + "Lincoln's Birthday (observed)", + ), + ( + NaiveDate::from_ymd_res(2023, 2, 15)?, + "Susan B. Anthony Day", + ), + (NaiveDate::from_ymd_res(2023, 11, 7)?, "Election Day"), + ], + &mut map, + Country::US_NY, + "United States (New York)", + ); + + 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"), + (NaiveDate::from_ymd_res(2024, 2, 12)?, "Lincoln's Birthday"), + ( + NaiveDate::from_ymd_res(2024, 2, 15)?, + "Susan B. Anthony Day", + ), + (NaiveDate::from_ymd_res(2024, 11, 5)?, "Election Day"), + ], + &mut map, + Country::US_NY, + "United States (New York)", + ); + + 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"), + (NaiveDate::from_ymd_res(2025, 2, 12)?, "Lincoln's Birthday"), + ( + NaiveDate::from_ymd_res(2025, 2, 15)?, + "Susan B. Anthony Day", + ), + (NaiveDate::from_ymd_res(2025, 11, 4)?, "Election Day"), + ], + &mut map, + Country::US_NY, + "United States (New York)", + ); + + 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"), + (NaiveDate::from_ymd_res(2026, 2, 12)?, "Lincoln's Birthday"), + ( + NaiveDate::from_ymd_res(2026, 2, 15)?, + "Susan B. Anthony Day", + ), + (NaiveDate::from_ymd_res(2026, 11, 3)?, "Election Day"), + ], + &mut map, + Country::US_NY, + "United States (New York)", + ); + + 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)?, + "Susan B. Anthony Day; Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2027, 10, 11)?, "Columbus Day"), + (NaiveDate::from_ymd_res(2027, 2, 12)?, "Lincoln's Birthday"), + (NaiveDate::from_ymd_res(2027, 11, 2)?, "Election Day"), + ], + &mut map, + Country::US_NY, + "United States (New York)", + ); + + 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"), + (NaiveDate::from_ymd_res(2028, 2, 12)?, "Lincoln's Birthday"), + ( + NaiveDate::from_ymd_res(2028, 2, 11)?, + "Lincoln's Birthday (observed)", + ), + ( + NaiveDate::from_ymd_res(2028, 2, 15)?, + "Susan B. Anthony Day", + ), + (NaiveDate::from_ymd_res(2028, 11, 7)?, "Election Day"), + ], + &mut map, + Country::US_NY, + "United States (New York)", + ); + + 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"), + (NaiveDate::from_ymd_res(2029, 2, 12)?, "Lincoln's Birthday"), + ( + NaiveDate::from_ymd_res(2029, 2, 15)?, + "Susan B. Anthony Day", + ), + (NaiveDate::from_ymd_res(2029, 11, 6)?, "Election Day"), + ], + &mut map, + Country::US_NY, + "United States (New York)", + ); + + 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"), + (NaiveDate::from_ymd_res(2030, 2, 12)?, "Lincoln's Birthday"), + ( + NaiveDate::from_ymd_res(2030, 2, 15)?, + "Susan B. Anthony Day", + ), + (NaiveDate::from_ymd_res(2030, 11, 5)?, "Election Day"), + ], + &mut map, + Country::US_NY, + "United States (New York)", + ); + + Ok(map) +} diff --git a/src/data/us_oh.rs b/src/data/us_oh.rs new file mode 100644 index 0000000..aeffd5d --- /dev/null +++ b/src/data/us_oh.rs @@ -0,0 +1,1006 @@ +//! United States (Ohio) +use super::*; + +/// Generate holiday map for United States (Ohio). +#[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_OH, + "United States (Ohio)", + ); + + 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_OH, + "United States (Ohio)", + ); + + 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_OH, + "United States (Ohio)", + ); + + 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_OH, + "United States (Ohio)", + ); + + 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_OH, + "United States (Ohio)", + ); + + 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_OH, + "United States (Ohio)", + ); + + 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_OH, + "United States (Ohio)", + ); + + 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_OH, + "United States (Ohio)", + ); + + 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_OH, + "United States (Ohio)", + ); + + 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_OH, + "United States (Ohio)", + ); + + 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_OH, + "United States (Ohio)", + ); + + 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_OH, + "United States (Ohio)", + ); + + 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_OH, + "United States (Ohio)", + ); + + 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_OH, + "United States (Ohio)", + ); + + 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_OH, + "United States (Ohio)", + ); + + 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_OH, + "United States (Ohio)", + ); + + 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_OH, + "United States (Ohio)", + ); + + 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_OH, + "United States (Ohio)", + ); + + 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_OH, + "United States (Ohio)", + ); + + 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_OH, + "United States (Ohio)", + ); + + 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_OH, + "United States (Ohio)", + ); + + 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_OH, + "United States (Ohio)", + ); + + 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_OH, + "United States (Ohio)", + ); + + 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_OH, + "United States (Ohio)", + ); + + 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_OH, + "United States (Ohio)", + ); + + 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_OH, + "United States (Ohio)", + ); + + 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_OH, + "United States (Ohio)", + ); + + 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_OH, + "United States (Ohio)", + ); + + 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_OH, + "United States (Ohio)", + ); + + 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_OH, + "United States (Ohio)", + ); + + 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_OH, + "United States (Ohio)", + ); + + Ok(map) +} diff --git a/src/data/us_ok.rs b/src/data/us_ok.rs new file mode 100644 index 0000000..7dabbb7 --- /dev/null +++ b/src/data/us_ok.rs @@ -0,0 +1,1099 @@ +//! United States (Oklahoma) +use super::*; + +/// Generate holiday map for United States (Oklahoma). +#[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, 11, 24)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_OK, + "United States (Oklahoma)", + ); + + 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, 11, 23)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_OK, + "United States (Oklahoma)", + ); + + 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, 11, 29)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_OK, + "United States (Oklahoma)", + ); + + 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, 11, 28)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_OK, + "United States (Oklahoma)", + ); + + 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, 11, 26)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_OK, + "United States (Oklahoma)", + ); + + 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, 11, 25)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_OK, + "United States (Oklahoma)", + ); + + 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, 11, 24)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_OK, + "United States (Oklahoma)", + ); + + 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, 11, 23)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_OK, + "United States (Oklahoma)", + ); + + 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, 11, 28)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_OK, + "United States (Oklahoma)", + ); + + 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, 11, 27)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_OK, + "United States (Oklahoma)", + ); + + 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, 11, 26)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_OK, + "United States (Oklahoma)", + ); + + 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, 11, 25)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_OK, + "United States (Oklahoma)", + ); + + 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, 11, 23)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_OK, + "United States (Oklahoma)", + ); + + 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, 11, 29)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_OK, + "United States (Oklahoma)", + ); + + 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, 11, 28)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_OK, + "United States (Oklahoma)", + ); + + 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, 11, 27)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_OK, + "United States (Oklahoma)", + ); + + 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, 11, 25)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_OK, + "United States (Oklahoma)", + ); + + 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, 11, 24)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_OK, + "United States (Oklahoma)", + ); + + 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, 11, 23)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_OK, + "United States (Oklahoma)", + ); + + 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, 11, 29)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_OK, + "United States (Oklahoma)", + ); + + 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, 11, 27)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_OK, + "United States (Oklahoma)", + ); + + 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, 11, 26)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_OK, + "United States (Oklahoma)", + ); + + 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, 11, 25)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_OK, + "United States (Oklahoma)", + ); + + 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, 11, 24)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_OK, + "United States (Oklahoma)", + ); + + 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, 11, 29)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_OK, + "United States (Oklahoma)", + ); + + 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, 11, 28)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_OK, + "United States (Oklahoma)", + ); + + 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, 11, 27)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_OK, + "United States (Oklahoma)", + ); + + 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, 11, 26)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_OK, + "United States (Oklahoma)", + ); + + 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, 11, 24)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_OK, + "United States (Oklahoma)", + ); + + 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, 11, 23)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_OK, + "United States (Oklahoma)", + ); + + 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, 11, 29)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_OK, + "United States (Oklahoma)", + ); + + Ok(map) +} diff --git a/src/data/us_or.rs b/src/data/us_or.rs new file mode 100644 index 0000000..e0a99c8 --- /dev/null +++ b/src/data/us_or.rs @@ -0,0 +1,975 @@ +//! United States (Oregon) +use super::*; + +/// Generate holiday map for United States (Oregon). +#[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", + ), + ], + &mut map, + Country::US_OR, + "United States (Oregon)", + ); + + 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", + ), + ], + &mut map, + Country::US_OR, + "United States (Oregon)", + ); + + 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", + ), + ], + &mut map, + Country::US_OR, + "United States (Oregon)", + ); + + 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", + ), + ], + &mut map, + Country::US_OR, + "United States (Oregon)", + ); + + 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", + ), + ], + &mut map, + Country::US_OR, + "United States (Oregon)", + ); + + 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", + ), + ], + &mut map, + Country::US_OR, + "United States (Oregon)", + ); + + 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", + ), + ], + &mut map, + Country::US_OR, + "United States (Oregon)", + ); + + 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", + ), + ], + &mut map, + Country::US_OR, + "United States (Oregon)", + ); + + 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", + ), + ], + &mut map, + Country::US_OR, + "United States (Oregon)", + ); + + 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", + ), + ], + &mut map, + Country::US_OR, + "United States (Oregon)", + ); + + 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", + ), + ], + &mut map, + Country::US_OR, + "United States (Oregon)", + ); + + 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", + ), + ], + &mut map, + Country::US_OR, + "United States (Oregon)", + ); + + 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", + ), + ], + &mut map, + Country::US_OR, + "United States (Oregon)", + ); + + 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", + ), + ], + &mut map, + Country::US_OR, + "United States (Oregon)", + ); + + 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", + ), + ], + &mut map, + Country::US_OR, + "United States (Oregon)", + ); + + 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", + ), + ], + &mut map, + Country::US_OR, + "United States (Oregon)", + ); + + 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", + ), + ], + &mut map, + Country::US_OR, + "United States (Oregon)", + ); + + 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", + ), + ], + &mut map, + Country::US_OR, + "United States (Oregon)", + ); + + 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", + ), + ], + &mut map, + Country::US_OR, + "United States (Oregon)", + ); + + 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", + ), + ], + &mut map, + Country::US_OR, + "United States (Oregon)", + ); + + 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", + ), + ], + &mut map, + Country::US_OR, + "United States (Oregon)", + ); + + 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", + ), + ], + &mut map, + Country::US_OR, + "United States (Oregon)", + ); + + 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", + ), + ], + &mut map, + Country::US_OR, + "United States (Oregon)", + ); + + 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", + ), + ], + &mut map, + Country::US_OR, + "United States (Oregon)", + ); + + 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", + ), + ], + &mut map, + Country::US_OR, + "United States (Oregon)", + ); + + 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", + ), + ], + &mut map, + Country::US_OR, + "United States (Oregon)", + ); + + 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", + ), + ], + &mut map, + Country::US_OR, + "United States (Oregon)", + ); + + 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", + ), + ], + &mut map, + Country::US_OR, + "United States (Oregon)", + ); + + 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", + ), + ], + &mut map, + Country::US_OR, + "United States (Oregon)", + ); + + 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", + ), + ], + &mut map, + Country::US_OR, + "United States (Oregon)", + ); + + 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", + ), + ], + &mut map, + Country::US_OR, + "United States (Oregon)", + ); + + Ok(map) +} diff --git a/src/data/us_pa.rs b/src/data/us_pa.rs new file mode 100644 index 0000000..898b63e --- /dev/null +++ b/src/data/us_pa.rs @@ -0,0 +1,1130 @@ +//! United States (Pennsylvania) +use super::*; + +/// Generate holiday map for United States (Pennsylvania). +#[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"), + ( + NaiveDate::from_ymd_res(2000, 11, 24)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_PA, + "United States (Pennsylvania)", + ); + + 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"), + ( + NaiveDate::from_ymd_res(2001, 11, 23)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_PA, + "United States (Pennsylvania)", + ); + + 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"), + ( + NaiveDate::from_ymd_res(2002, 11, 29)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_PA, + "United States (Pennsylvania)", + ); + + 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"), + ( + NaiveDate::from_ymd_res(2003, 11, 28)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_PA, + "United States (Pennsylvania)", + ); + + 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"), + ( + NaiveDate::from_ymd_res(2004, 11, 26)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_PA, + "United States (Pennsylvania)", + ); + + 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"), + ( + NaiveDate::from_ymd_res(2005, 11, 25)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_PA, + "United States (Pennsylvania)", + ); + + 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"), + ( + NaiveDate::from_ymd_res(2006, 11, 24)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_PA, + "United States (Pennsylvania)", + ); + + 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"), + ( + NaiveDate::from_ymd_res(2007, 11, 23)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_PA, + "United States (Pennsylvania)", + ); + + 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"), + ( + NaiveDate::from_ymd_res(2008, 11, 28)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_PA, + "United States (Pennsylvania)", + ); + + 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"), + ( + NaiveDate::from_ymd_res(2009, 11, 27)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_PA, + "United States (Pennsylvania)", + ); + + 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"), + ( + NaiveDate::from_ymd_res(2010, 11, 26)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_PA, + "United States (Pennsylvania)", + ); + + 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"), + ( + NaiveDate::from_ymd_res(2011, 11, 25)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_PA, + "United States (Pennsylvania)", + ); + + 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"), + ( + NaiveDate::from_ymd_res(2012, 11, 23)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_PA, + "United States (Pennsylvania)", + ); + + 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"), + ( + NaiveDate::from_ymd_res(2013, 11, 29)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_PA, + "United States (Pennsylvania)", + ); + + 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"), + ( + NaiveDate::from_ymd_res(2014, 11, 28)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_PA, + "United States (Pennsylvania)", + ); + + 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"), + ( + NaiveDate::from_ymd_res(2015, 11, 27)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_PA, + "United States (Pennsylvania)", + ); + + 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"), + ( + NaiveDate::from_ymd_res(2016, 11, 25)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_PA, + "United States (Pennsylvania)", + ); + + 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"), + ( + NaiveDate::from_ymd_res(2017, 11, 24)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_PA, + "United States (Pennsylvania)", + ); + + 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"), + ( + NaiveDate::from_ymd_res(2018, 11, 23)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_PA, + "United States (Pennsylvania)", + ); + + 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"), + ( + NaiveDate::from_ymd_res(2019, 11, 29)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_PA, + "United States (Pennsylvania)", + ); + + 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"), + ( + NaiveDate::from_ymd_res(2020, 11, 27)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_PA, + "United States (Pennsylvania)", + ); + + 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"), + ( + NaiveDate::from_ymd_res(2021, 11, 26)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_PA, + "United States (Pennsylvania)", + ); + + 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"), + ( + NaiveDate::from_ymd_res(2022, 11, 25)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_PA, + "United States (Pennsylvania)", + ); + + 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"), + ( + NaiveDate::from_ymd_res(2023, 11, 24)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_PA, + "United States (Pennsylvania)", + ); + + 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"), + ( + NaiveDate::from_ymd_res(2024, 11, 29)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_PA, + "United States (Pennsylvania)", + ); + + 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"), + ( + NaiveDate::from_ymd_res(2025, 11, 28)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_PA, + "United States (Pennsylvania)", + ); + + 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"), + ( + NaiveDate::from_ymd_res(2026, 11, 27)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_PA, + "United States (Pennsylvania)", + ); + + 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"), + ( + NaiveDate::from_ymd_res(2027, 11, 26)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_PA, + "United States (Pennsylvania)", + ); + + 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"), + ( + NaiveDate::from_ymd_res(2028, 11, 24)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_PA, + "United States (Pennsylvania)", + ); + + 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"), + ( + NaiveDate::from_ymd_res(2029, 11, 23)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_PA, + "United States (Pennsylvania)", + ); + + 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"), + ( + NaiveDate::from_ymd_res(2030, 11, 29)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_PA, + "United States (Pennsylvania)", + ); + + Ok(map) +} diff --git a/src/data/us_pr.rs b/src/data/us_pr.rs new file mode 100644 index 0000000..4ed249d --- /dev/null +++ b/src/data/us_pr.rs @@ -0,0 +1,1089 @@ +//! United States (Puerto Rico) +use super::*; + +/// Generate holiday map for United States (Puerto Rico). +#[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, 1, 6)?, "Epiphany"), + (NaiveDate::from_ymd_res(2000, 2, 21)?, "Presidents' Day"), + (NaiveDate::from_ymd_res(2000, 3, 22)?, "Emancipation Day"), + (NaiveDate::from_ymd_res(2000, 4, 21)?, "Good Friday"), + (NaiveDate::from_ymd_res(2000, 7, 25)?, "Constitution Day"), + (NaiveDate::from_ymd_res(2000, 11, 19)?, "Discovery Day"), + ( + NaiveDate::from_ymd_res(2000, 11, 20)?, + "Discovery Day (observed)", + ), + ], + &mut map, + Country::US_PR, + "United States (Puerto Rico)", + ); + + 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, 1, 6)?, "Epiphany"), + (NaiveDate::from_ymd_res(2001, 2, 19)?, "Presidents' Day"), + (NaiveDate::from_ymd_res(2001, 3, 22)?, "Emancipation Day"), + (NaiveDate::from_ymd_res(2001, 4, 13)?, "Good Friday"), + (NaiveDate::from_ymd_res(2001, 7, 25)?, "Constitution Day"), + (NaiveDate::from_ymd_res(2001, 11, 19)?, "Discovery Day"), + ], + &mut map, + Country::US_PR, + "United States (Puerto Rico)", + ); + + 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, 1, 6)?, "Epiphany"), + (NaiveDate::from_ymd_res(2002, 2, 18)?, "Presidents' Day"), + (NaiveDate::from_ymd_res(2002, 3, 22)?, "Emancipation Day"), + (NaiveDate::from_ymd_res(2002, 3, 29)?, "Good Friday"), + (NaiveDate::from_ymd_res(2002, 7, 25)?, "Constitution Day"), + (NaiveDate::from_ymd_res(2002, 11, 19)?, "Discovery Day"), + ], + &mut map, + Country::US_PR, + "United States (Puerto Rico)", + ); + + 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, 1, 6)?, "Epiphany"), + (NaiveDate::from_ymd_res(2003, 2, 17)?, "Presidents' Day"), + (NaiveDate::from_ymd_res(2003, 3, 22)?, "Emancipation Day"), + (NaiveDate::from_ymd_res(2003, 4, 18)?, "Good Friday"), + (NaiveDate::from_ymd_res(2003, 7, 25)?, "Constitution Day"), + (NaiveDate::from_ymd_res(2003, 11, 19)?, "Discovery Day"), + ], + &mut map, + Country::US_PR, + "United States (Puerto Rico)", + ); + + 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, 1, 6)?, "Epiphany"), + (NaiveDate::from_ymd_res(2004, 2, 16)?, "Presidents' Day"), + (NaiveDate::from_ymd_res(2004, 3, 22)?, "Emancipation Day"), + (NaiveDate::from_ymd_res(2004, 4, 9)?, "Good Friday"), + (NaiveDate::from_ymd_res(2004, 7, 25)?, "Constitution Day"), + ( + NaiveDate::from_ymd_res(2004, 7, 26)?, + "Constitution Day (observed)", + ), + (NaiveDate::from_ymd_res(2004, 11, 19)?, "Discovery Day"), + ], + &mut map, + Country::US_PR, + "United States (Puerto Rico)", + ); + + 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, 1, 6)?, "Epiphany"), + (NaiveDate::from_ymd_res(2005, 2, 21)?, "Presidents' Day"), + (NaiveDate::from_ymd_res(2005, 3, 22)?, "Emancipation Day"), + (NaiveDate::from_ymd_res(2005, 3, 25)?, "Good Friday"), + (NaiveDate::from_ymd_res(2005, 7, 25)?, "Constitution Day"), + (NaiveDate::from_ymd_res(2005, 11, 19)?, "Discovery Day"), + ], + &mut map, + Country::US_PR, + "United States (Puerto Rico)", + ); + + 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, 1, 6)?, "Epiphany"), + (NaiveDate::from_ymd_res(2006, 2, 20)?, "Presidents' Day"), + (NaiveDate::from_ymd_res(2006, 3, 22)?, "Emancipation Day"), + (NaiveDate::from_ymd_res(2006, 4, 14)?, "Good Friday"), + (NaiveDate::from_ymd_res(2006, 7, 25)?, "Constitution Day"), + (NaiveDate::from_ymd_res(2006, 11, 19)?, "Discovery Day"), + ( + NaiveDate::from_ymd_res(2006, 11, 20)?, + "Discovery Day (observed)", + ), + ], + &mut map, + Country::US_PR, + "United States (Puerto Rico)", + ); + + 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, 1, 6)?, "Epiphany"), + (NaiveDate::from_ymd_res(2007, 2, 19)?, "Presidents' Day"), + (NaiveDate::from_ymd_res(2007, 3, 22)?, "Emancipation Day"), + (NaiveDate::from_ymd_res(2007, 4, 6)?, "Good Friday"), + (NaiveDate::from_ymd_res(2007, 7, 25)?, "Constitution Day"), + (NaiveDate::from_ymd_res(2007, 11, 19)?, "Discovery Day"), + ], + &mut map, + Country::US_PR, + "United States (Puerto Rico)", + ); + + 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, 1, 6)?, "Epiphany"), + (NaiveDate::from_ymd_res(2008, 2, 18)?, "Presidents' Day"), + (NaiveDate::from_ymd_res(2008, 3, 22)?, "Emancipation Day"), + (NaiveDate::from_ymd_res(2008, 3, 21)?, "Good Friday"), + (NaiveDate::from_ymd_res(2008, 7, 25)?, "Constitution Day"), + (NaiveDate::from_ymd_res(2008, 11, 19)?, "Discovery Day"), + ], + &mut map, + Country::US_PR, + "United States (Puerto Rico)", + ); + + 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, 1, 6)?, "Epiphany"), + (NaiveDate::from_ymd_res(2009, 2, 16)?, "Presidents' Day"), + (NaiveDate::from_ymd_res(2009, 3, 22)?, "Emancipation Day"), + ( + NaiveDate::from_ymd_res(2009, 3, 23)?, + "Emancipation Day (observed)", + ), + (NaiveDate::from_ymd_res(2009, 4, 10)?, "Good Friday"), + (NaiveDate::from_ymd_res(2009, 7, 25)?, "Constitution Day"), + (NaiveDate::from_ymd_res(2009, 11, 19)?, "Discovery Day"), + ], + &mut map, + Country::US_PR, + "United States (Puerto Rico)", + ); + + 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, 1, 6)?, "Epiphany"), + (NaiveDate::from_ymd_res(2010, 2, 15)?, "Presidents' Day"), + (NaiveDate::from_ymd_res(2010, 3, 22)?, "Emancipation Day"), + (NaiveDate::from_ymd_res(2010, 4, 2)?, "Good Friday"), + (NaiveDate::from_ymd_res(2010, 7, 25)?, "Constitution Day"), + ( + NaiveDate::from_ymd_res(2010, 7, 26)?, + "Constitution Day (observed)", + ), + (NaiveDate::from_ymd_res(2010, 11, 19)?, "Discovery Day"), + ], + &mut map, + Country::US_PR, + "United States (Puerto Rico)", + ); + + 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, 1, 6)?, "Epiphany"), + (NaiveDate::from_ymd_res(2011, 2, 21)?, "Presidents' Day"), + (NaiveDate::from_ymd_res(2011, 3, 22)?, "Emancipation Day"), + (NaiveDate::from_ymd_res(2011, 4, 22)?, "Good Friday"), + (NaiveDate::from_ymd_res(2011, 7, 25)?, "Constitution Day"), + (NaiveDate::from_ymd_res(2011, 11, 19)?, "Discovery Day"), + ], + &mut map, + Country::US_PR, + "United States (Puerto Rico)", + ); + + 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, 1, 6)?, "Epiphany"), + (NaiveDate::from_ymd_res(2012, 2, 20)?, "Presidents' Day"), + (NaiveDate::from_ymd_res(2012, 3, 22)?, "Emancipation Day"), + (NaiveDate::from_ymd_res(2012, 4, 6)?, "Good Friday"), + (NaiveDate::from_ymd_res(2012, 7, 25)?, "Constitution Day"), + (NaiveDate::from_ymd_res(2012, 11, 19)?, "Discovery Day"), + ], + &mut map, + Country::US_PR, + "United States (Puerto Rico)", + ); + + 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, 1, 6)?, "Epiphany"), + (NaiveDate::from_ymd_res(2013, 2, 18)?, "Presidents' Day"), + (NaiveDate::from_ymd_res(2013, 3, 22)?, "Emancipation Day"), + (NaiveDate::from_ymd_res(2013, 3, 29)?, "Good Friday"), + (NaiveDate::from_ymd_res(2013, 7, 25)?, "Constitution Day"), + (NaiveDate::from_ymd_res(2013, 11, 19)?, "Discovery Day"), + ], + &mut map, + Country::US_PR, + "United States (Puerto Rico)", + ); + + 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, 1, 6)?, "Epiphany"), + (NaiveDate::from_ymd_res(2014, 2, 17)?, "Presidents' Day"), + (NaiveDate::from_ymd_res(2014, 3, 22)?, "Emancipation Day"), + (NaiveDate::from_ymd_res(2014, 4, 18)?, "Good Friday"), + (NaiveDate::from_ymd_res(2014, 7, 25)?, "Constitution Day"), + (NaiveDate::from_ymd_res(2014, 11, 19)?, "Discovery Day"), + ], + &mut map, + Country::US_PR, + "United States (Puerto Rico)", + ); + + 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, 1, 6)?, "Epiphany"), + (NaiveDate::from_ymd_res(2015, 2, 16)?, "Presidents' Day"), + (NaiveDate::from_ymd_res(2015, 3, 22)?, "Emancipation Day"), + ( + NaiveDate::from_ymd_res(2015, 3, 23)?, + "Emancipation Day (observed)", + ), + (NaiveDate::from_ymd_res(2015, 4, 3)?, "Good Friday"), + (NaiveDate::from_ymd_res(2015, 7, 25)?, "Constitution Day"), + (NaiveDate::from_ymd_res(2015, 11, 19)?, "Discovery Day"), + ], + &mut map, + Country::US_PR, + "United States (Puerto Rico)", + ); + + 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, 1, 6)?, "Epiphany"), + (NaiveDate::from_ymd_res(2016, 2, 15)?, "Presidents' Day"), + (NaiveDate::from_ymd_res(2016, 3, 22)?, "Emancipation Day"), + (NaiveDate::from_ymd_res(2016, 3, 25)?, "Good Friday"), + (NaiveDate::from_ymd_res(2016, 7, 25)?, "Constitution Day"), + (NaiveDate::from_ymd_res(2016, 11, 19)?, "Discovery Day"), + ], + &mut map, + Country::US_PR, + "United States (Puerto Rico)", + ); + + 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, 1, 6)?, "Epiphany"), + (NaiveDate::from_ymd_res(2017, 2, 20)?, "Presidents' Day"), + (NaiveDate::from_ymd_res(2017, 3, 22)?, "Emancipation Day"), + (NaiveDate::from_ymd_res(2017, 4, 14)?, "Good Friday"), + (NaiveDate::from_ymd_res(2017, 7, 25)?, "Constitution Day"), + (NaiveDate::from_ymd_res(2017, 11, 19)?, "Discovery Day"), + ( + NaiveDate::from_ymd_res(2017, 11, 20)?, + "Discovery Day (observed)", + ), + ], + &mut map, + Country::US_PR, + "United States (Puerto Rico)", + ); + + 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, 1, 6)?, "Epiphany"), + (NaiveDate::from_ymd_res(2018, 2, 19)?, "Presidents' Day"), + (NaiveDate::from_ymd_res(2018, 3, 22)?, "Emancipation Day"), + (NaiveDate::from_ymd_res(2018, 3, 30)?, "Good Friday"), + (NaiveDate::from_ymd_res(2018, 7, 25)?, "Constitution Day"), + (NaiveDate::from_ymd_res(2018, 11, 19)?, "Discovery Day"), + ], + &mut map, + Country::US_PR, + "United States (Puerto Rico)", + ); + + 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, 1, 6)?, "Epiphany"), + (NaiveDate::from_ymd_res(2019, 2, 18)?, "Presidents' Day"), + (NaiveDate::from_ymd_res(2019, 3, 22)?, "Emancipation Day"), + (NaiveDate::from_ymd_res(2019, 4, 19)?, "Good Friday"), + (NaiveDate::from_ymd_res(2019, 7, 25)?, "Constitution Day"), + (NaiveDate::from_ymd_res(2019, 11, 19)?, "Discovery Day"), + ], + &mut map, + Country::US_PR, + "United States (Puerto Rico)", + ); + + 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, 1, 6)?, "Epiphany"), + (NaiveDate::from_ymd_res(2020, 2, 17)?, "Presidents' Day"), + (NaiveDate::from_ymd_res(2020, 3, 22)?, "Emancipation Day"), + ( + NaiveDate::from_ymd_res(2020, 3, 23)?, + "Emancipation Day (observed)", + ), + (NaiveDate::from_ymd_res(2020, 4, 10)?, "Good Friday"), + (NaiveDate::from_ymd_res(2020, 7, 25)?, "Constitution Day"), + (NaiveDate::from_ymd_res(2020, 11, 19)?, "Discovery Day"), + ], + &mut map, + Country::US_PR, + "United States (Puerto Rico)", + ); + + 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, 1, 6)?, "Epiphany"), + (NaiveDate::from_ymd_res(2021, 2, 15)?, "Presidents' Day"), + (NaiveDate::from_ymd_res(2021, 3, 22)?, "Emancipation Day"), + (NaiveDate::from_ymd_res(2021, 4, 2)?, "Good Friday"), + (NaiveDate::from_ymd_res(2021, 7, 25)?, "Constitution Day"), + ( + NaiveDate::from_ymd_res(2021, 7, 26)?, + "Constitution Day (observed)", + ), + (NaiveDate::from_ymd_res(2021, 11, 19)?, "Discovery Day"), + ], + &mut map, + Country::US_PR, + "United States (Puerto Rico)", + ); + + 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, 1, 6)?, "Epiphany"), + (NaiveDate::from_ymd_res(2022, 2, 21)?, "Presidents' Day"), + (NaiveDate::from_ymd_res(2022, 3, 22)?, "Emancipation Day"), + (NaiveDate::from_ymd_res(2022, 4, 15)?, "Good Friday"), + (NaiveDate::from_ymd_res(2022, 7, 25)?, "Constitution Day"), + (NaiveDate::from_ymd_res(2022, 11, 19)?, "Discovery Day"), + ], + &mut map, + Country::US_PR, + "United States (Puerto Rico)", + ); + + 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, 1, 6)?, "Epiphany"), + (NaiveDate::from_ymd_res(2023, 2, 20)?, "Presidents' Day"), + (NaiveDate::from_ymd_res(2023, 3, 22)?, "Emancipation Day"), + (NaiveDate::from_ymd_res(2023, 4, 7)?, "Good Friday"), + (NaiveDate::from_ymd_res(2023, 7, 25)?, "Constitution Day"), + (NaiveDate::from_ymd_res(2023, 11, 19)?, "Discovery Day"), + ( + NaiveDate::from_ymd_res(2023, 11, 20)?, + "Discovery Day (observed)", + ), + ], + &mut map, + Country::US_PR, + "United States (Puerto Rico)", + ); + + 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, 1, 6)?, "Epiphany"), + (NaiveDate::from_ymd_res(2024, 2, 19)?, "Presidents' Day"), + (NaiveDate::from_ymd_res(2024, 3, 22)?, "Emancipation Day"), + (NaiveDate::from_ymd_res(2024, 3, 29)?, "Good Friday"), + (NaiveDate::from_ymd_res(2024, 7, 25)?, "Constitution Day"), + (NaiveDate::from_ymd_res(2024, 11, 19)?, "Discovery Day"), + ], + &mut map, + Country::US_PR, + "United States (Puerto Rico)", + ); + + 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, 1, 6)?, "Epiphany"), + (NaiveDate::from_ymd_res(2025, 2, 17)?, "Presidents' Day"), + (NaiveDate::from_ymd_res(2025, 3, 22)?, "Emancipation Day"), + (NaiveDate::from_ymd_res(2025, 4, 18)?, "Good Friday"), + (NaiveDate::from_ymd_res(2025, 7, 25)?, "Constitution Day"), + (NaiveDate::from_ymd_res(2025, 11, 19)?, "Discovery Day"), + ], + &mut map, + Country::US_PR, + "United States (Puerto Rico)", + ); + + 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, 1, 6)?, "Epiphany"), + (NaiveDate::from_ymd_res(2026, 2, 16)?, "Presidents' Day"), + (NaiveDate::from_ymd_res(2026, 3, 22)?, "Emancipation Day"), + ( + NaiveDate::from_ymd_res(2026, 3, 23)?, + "Emancipation Day (observed)", + ), + (NaiveDate::from_ymd_res(2026, 4, 3)?, "Good Friday"), + (NaiveDate::from_ymd_res(2026, 7, 25)?, "Constitution Day"), + (NaiveDate::from_ymd_res(2026, 11, 19)?, "Discovery Day"), + ], + &mut map, + Country::US_PR, + "United States (Puerto Rico)", + ); + + 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, 1, 6)?, "Epiphany"), + (NaiveDate::from_ymd_res(2027, 2, 15)?, "Presidents' Day"), + (NaiveDate::from_ymd_res(2027, 3, 22)?, "Emancipation Day"), + (NaiveDate::from_ymd_res(2027, 3, 26)?, "Good Friday"), + (NaiveDate::from_ymd_res(2027, 7, 25)?, "Constitution Day"), + ( + NaiveDate::from_ymd_res(2027, 7, 26)?, + "Constitution Day (observed)", + ), + (NaiveDate::from_ymd_res(2027, 11, 19)?, "Discovery Day"), + ], + &mut map, + Country::US_PR, + "United States (Puerto Rico)", + ); + + 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, 1, 6)?, "Epiphany"), + (NaiveDate::from_ymd_res(2028, 2, 21)?, "Presidents' Day"), + (NaiveDate::from_ymd_res(2028, 3, 22)?, "Emancipation Day"), + (NaiveDate::from_ymd_res(2028, 4, 14)?, "Good Friday"), + (NaiveDate::from_ymd_res(2028, 7, 25)?, "Constitution Day"), + (NaiveDate::from_ymd_res(2028, 11, 19)?, "Discovery Day"), + ( + NaiveDate::from_ymd_res(2028, 11, 20)?, + "Discovery Day (observed)", + ), + ], + &mut map, + Country::US_PR, + "United States (Puerto Rico)", + ); + + 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, 1, 6)?, "Epiphany"), + (NaiveDate::from_ymd_res(2029, 2, 19)?, "Presidents' Day"), + (NaiveDate::from_ymd_res(2029, 3, 22)?, "Emancipation Day"), + (NaiveDate::from_ymd_res(2029, 3, 30)?, "Good Friday"), + (NaiveDate::from_ymd_res(2029, 7, 25)?, "Constitution Day"), + (NaiveDate::from_ymd_res(2029, 11, 19)?, "Discovery Day"), + ], + &mut map, + Country::US_PR, + "United States (Puerto Rico)", + ); + + 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, 1, 6)?, "Epiphany"), + (NaiveDate::from_ymd_res(2030, 2, 18)?, "Presidents' Day"), + (NaiveDate::from_ymd_res(2030, 3, 22)?, "Emancipation Day"), + (NaiveDate::from_ymd_res(2030, 4, 19)?, "Good Friday"), + (NaiveDate::from_ymd_res(2030, 7, 25)?, "Constitution Day"), + (NaiveDate::from_ymd_res(2030, 11, 19)?, "Discovery Day"), + ], + &mut map, + Country::US_PR, + "United States (Puerto Rico)", + ); + + Ok(map) +} diff --git a/src/data/us_ri.rs b/src/data/us_ri.rs new file mode 100644 index 0000000..1cb3135 --- /dev/null +++ b/src/data/us_ri.rs @@ -0,0 +1,1064 @@ +//! United States (Rhode Island) +use super::*; + +/// Generate holiday map for United States (Rhode Island). +#[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, 8, 14)?, "Victory Day"), + (NaiveDate::from_ymd_res(2000, 10, 9)?, "Columbus Day"), + ], + &mut map, + Country::US_RI, + "United States (Rhode Island)", + ); + + 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, 8, 13)?, "Victory Day"), + (NaiveDate::from_ymd_res(2001, 10, 8)?, "Columbus Day"), + ], + &mut map, + Country::US_RI, + "United States (Rhode Island)", + ); + + 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, 8, 12)?, "Victory Day"), + (NaiveDate::from_ymd_res(2002, 10, 14)?, "Columbus Day"), + ], + &mut map, + Country::US_RI, + "United States (Rhode Island)", + ); + + 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, 8, 11)?, "Victory Day"), + (NaiveDate::from_ymd_res(2003, 10, 13)?, "Columbus Day"), + ], + &mut map, + Country::US_RI, + "United States (Rhode Island)", + ); + + 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, 8, 9)?, "Victory Day"), + (NaiveDate::from_ymd_res(2004, 10, 11)?, "Columbus Day"), + ], + &mut map, + Country::US_RI, + "United States (Rhode Island)", + ); + + 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, 8, 8)?, "Victory Day"), + (NaiveDate::from_ymd_res(2005, 10, 10)?, "Columbus Day"), + ], + &mut map, + Country::US_RI, + "United States (Rhode Island)", + ); + + 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, 8, 14)?, "Victory Day"), + (NaiveDate::from_ymd_res(2006, 10, 9)?, "Columbus Day"), + ], + &mut map, + Country::US_RI, + "United States (Rhode Island)", + ); + + 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, 8, 13)?, "Victory Day"), + (NaiveDate::from_ymd_res(2007, 10, 8)?, "Columbus Day"), + ], + &mut map, + Country::US_RI, + "United States (Rhode Island)", + ); + + 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, 8, 11)?, "Victory Day"), + (NaiveDate::from_ymd_res(2008, 10, 13)?, "Columbus Day"), + ], + &mut map, + Country::US_RI, + "United States (Rhode Island)", + ); + + 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, 8, 10)?, "Victory Day"), + (NaiveDate::from_ymd_res(2009, 10, 12)?, "Columbus Day"), + ], + &mut map, + Country::US_RI, + "United States (Rhode Island)", + ); + + 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, 8, 9)?, "Victory Day"), + (NaiveDate::from_ymd_res(2010, 10, 11)?, "Columbus Day"), + ], + &mut map, + Country::US_RI, + "United States (Rhode Island)", + ); + + 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, 8, 8)?, "Victory Day"), + (NaiveDate::from_ymd_res(2011, 10, 10)?, "Columbus Day"), + ], + &mut map, + Country::US_RI, + "United States (Rhode Island)", + ); + + 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, 8, 13)?, "Victory Day"), + (NaiveDate::from_ymd_res(2012, 10, 8)?, "Columbus Day"), + ], + &mut map, + Country::US_RI, + "United States (Rhode Island)", + ); + + 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, 8, 12)?, "Victory Day"), + (NaiveDate::from_ymd_res(2013, 10, 14)?, "Columbus Day"), + ], + &mut map, + Country::US_RI, + "United States (Rhode Island)", + ); + + 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, 8, 11)?, "Victory Day"), + (NaiveDate::from_ymd_res(2014, 10, 13)?, "Columbus Day"), + ], + &mut map, + Country::US_RI, + "United States (Rhode Island)", + ); + + 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, 8, 10)?, "Victory Day"), + (NaiveDate::from_ymd_res(2015, 10, 12)?, "Columbus Day"), + ], + &mut map, + Country::US_RI, + "United States (Rhode Island)", + ); + + 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, 8, 8)?, "Victory Day"), + (NaiveDate::from_ymd_res(2016, 10, 10)?, "Columbus Day"), + ], + &mut map, + Country::US_RI, + "United States (Rhode Island)", + ); + + 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, 8, 14)?, "Victory Day"), + (NaiveDate::from_ymd_res(2017, 10, 9)?, "Columbus Day"), + ], + &mut map, + Country::US_RI, + "United States (Rhode Island)", + ); + + 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, 8, 13)?, "Victory Day"), + (NaiveDate::from_ymd_res(2018, 10, 8)?, "Columbus Day"), + ], + &mut map, + Country::US_RI, + "United States (Rhode Island)", + ); + + 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, 8, 12)?, "Victory Day"), + (NaiveDate::from_ymd_res(2019, 10, 14)?, "Columbus Day"), + ], + &mut map, + Country::US_RI, + "United States (Rhode Island)", + ); + + 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, 8, 10)?, "Victory Day"), + (NaiveDate::from_ymd_res(2020, 10, 12)?, "Columbus Day"), + ], + &mut map, + Country::US_RI, + "United States (Rhode Island)", + ); + + 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, 8, 9)?, "Victory Day"), + (NaiveDate::from_ymd_res(2021, 10, 11)?, "Columbus Day"), + ], + &mut map, + Country::US_RI, + "United States (Rhode Island)", + ); + + 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, 8, 8)?, "Victory Day"), + ( + NaiveDate::from_ymd_res(2022, 10, 10)?, + "Indigenous Peoples' Day / Columbus Day", + ), + ], + &mut map, + Country::US_RI, + "United States (Rhode Island)", + ); + + 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, 8, 14)?, "Victory Day"), + ( + NaiveDate::from_ymd_res(2023, 10, 9)?, + "Indigenous Peoples' Day / Columbus Day", + ), + ], + &mut map, + Country::US_RI, + "United States (Rhode Island)", + ); + + 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, 8, 12)?, "Victory Day"), + ( + NaiveDate::from_ymd_res(2024, 10, 14)?, + "Indigenous Peoples' Day / Columbus Day", + ), + ], + &mut map, + Country::US_RI, + "United States (Rhode Island)", + ); + + 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, 8, 11)?, "Victory Day"), + ( + NaiveDate::from_ymd_res(2025, 10, 13)?, + "Indigenous Peoples' Day / Columbus Day", + ), + ], + &mut map, + Country::US_RI, + "United States (Rhode Island)", + ); + + 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, 8, 10)?, "Victory Day"), + ( + NaiveDate::from_ymd_res(2026, 10, 12)?, + "Indigenous Peoples' Day / Columbus Day", + ), + ], + &mut map, + Country::US_RI, + "United States (Rhode Island)", + ); + + 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, 8, 9)?, "Victory Day"), + ( + NaiveDate::from_ymd_res(2027, 10, 11)?, + "Indigenous Peoples' Day / Columbus Day", + ), + ], + &mut map, + Country::US_RI, + "United States (Rhode Island)", + ); + + 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, 8, 14)?, "Victory Day"), + ( + NaiveDate::from_ymd_res(2028, 10, 9)?, + "Indigenous Peoples' Day / Columbus Day", + ), + ], + &mut map, + Country::US_RI, + "United States (Rhode Island)", + ); + + 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, 8, 13)?, "Victory Day"), + ( + NaiveDate::from_ymd_res(2029, 10, 8)?, + "Indigenous Peoples' Day / Columbus Day", + ), + ], + &mut map, + Country::US_RI, + "United States (Rhode Island)", + ); + + 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, 8, 12)?, "Victory Day"), + ( + NaiveDate::from_ymd_res(2030, 10, 14)?, + "Indigenous Peoples' Day / Columbus Day", + ), + ], + &mut map, + Country::US_RI, + "United States (Rhode Island)", + ); + + Ok(map) +} diff --git a/src/data/us_sc.rs b/src/data/us_sc.rs new file mode 100644 index 0000000..78d2d18 --- /dev/null +++ b/src/data/us_sc.rs @@ -0,0 +1,1099 @@ +//! United States (South Carolina) +use super::*; + +/// Generate holiday map for United States (South Carolina). +#[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, 4, 24)?, + "Confederate Memorial Day", + ), + ], + &mut map, + Country::US_SC, + "United States (South Carolina)", + ); + + 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, 4, 23)?, + "Confederate Memorial Day", + ), + ], + &mut map, + Country::US_SC, + "United States (South Carolina)", + ); + + 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, 4, 22)?, + "Confederate Memorial Day", + ), + ], + &mut map, + Country::US_SC, + "United States (South Carolina)", + ); + + 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, 4, 28)?, + "Confederate Memorial Day", + ), + ], + &mut map, + Country::US_SC, + "United States (South Carolina)", + ); + + 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, 4, 26)?, + "Confederate Memorial Day", + ), + ], + &mut map, + Country::US_SC, + "United States (South Carolina)", + ); + + 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, 4, 25)?, + "Confederate Memorial Day", + ), + ], + &mut map, + Country::US_SC, + "United States (South Carolina)", + ); + + 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, 4, 24)?, + "Confederate Memorial Day", + ), + ], + &mut map, + Country::US_SC, + "United States (South Carolina)", + ); + + 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, 4, 23)?, + "Confederate Memorial Day", + ), + ], + &mut map, + Country::US_SC, + "United States (South Carolina)", + ); + + 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, 4, 28)?, + "Confederate Memorial Day", + ), + ], + &mut map, + Country::US_SC, + "United States (South Carolina)", + ); + + 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, 4, 27)?, + "Confederate Memorial Day", + ), + ], + &mut map, + Country::US_SC, + "United States (South Carolina)", + ); + + 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, 4, 26)?, + "Confederate Memorial Day", + ), + ], + &mut map, + Country::US_SC, + "United States (South Carolina)", + ); + + 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, 4, 25)?, + "Confederate Memorial Day", + ), + ], + &mut map, + Country::US_SC, + "United States (South Carolina)", + ); + + 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, 4, 23)?, + "Confederate Memorial Day", + ), + ], + &mut map, + Country::US_SC, + "United States (South Carolina)", + ); + + 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, 4, 22)?, + "Confederate Memorial Day", + ), + ], + &mut map, + Country::US_SC, + "United States (South Carolina)", + ); + + 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, 4, 28)?, + "Confederate Memorial Day", + ), + ], + &mut map, + Country::US_SC, + "United States (South Carolina)", + ); + + 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, 4, 27)?, + "Confederate Memorial Day", + ), + ], + &mut map, + Country::US_SC, + "United States (South Carolina)", + ); + + 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, 4, 25)?, + "Confederate Memorial Day", + ), + ], + &mut map, + Country::US_SC, + "United States (South Carolina)", + ); + + 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, 4, 24)?, + "Confederate Memorial Day", + ), + ], + &mut map, + Country::US_SC, + "United States (South Carolina)", + ); + + 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, 4, 23)?, + "Confederate Memorial Day", + ), + ], + &mut map, + Country::US_SC, + "United States (South Carolina)", + ); + + 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, 4, 22)?, + "Confederate Memorial Day", + ), + ], + &mut map, + Country::US_SC, + "United States (South Carolina)", + ); + + 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, 4, 27)?, + "Confederate Memorial Day", + ), + ], + &mut map, + Country::US_SC, + "United States (South Carolina)", + ); + + 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, 4, 26)?, + "Confederate Memorial Day", + ), + ], + &mut map, + Country::US_SC, + "United States (South Carolina)", + ); + + 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, 4, 25)?, + "Confederate Memorial Day", + ), + ], + &mut map, + Country::US_SC, + "United States (South Carolina)", + ); + + 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, 4, 24)?, + "Confederate Memorial Day", + ), + ], + &mut map, + Country::US_SC, + "United States (South Carolina)", + ); + + 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, 4, 22)?, + "Confederate Memorial Day", + ), + ], + &mut map, + Country::US_SC, + "United States (South Carolina)", + ); + + 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, 4, 28)?, + "Confederate Memorial Day", + ), + ], + &mut map, + Country::US_SC, + "United States (South Carolina)", + ); + + 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, 4, 27)?, + "Confederate Memorial Day", + ), + ], + &mut map, + Country::US_SC, + "United States (South Carolina)", + ); + + 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, 4, 26)?, + "Confederate Memorial Day", + ), + ], + &mut map, + Country::US_SC, + "United States (South Carolina)", + ); + + 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, 4, 24)?, + "Confederate Memorial Day", + ), + ], + &mut map, + Country::US_SC, + "United States (South Carolina)", + ); + + 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, 4, 23)?, + "Confederate Memorial Day", + ), + ], + &mut map, + Country::US_SC, + "United States (South Carolina)", + ); + + 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, 4, 22)?, + "Confederate Memorial Day", + ), + ], + &mut map, + Country::US_SC, + "United States (South Carolina)", + ); + + Ok(map) +} diff --git a/src/data/us_sd.rs b/src/data/us_sd.rs new file mode 100644 index 0000000..8d97405 --- /dev/null +++ b/src/data/us_sd.rs @@ -0,0 +1,1099 @@ +//! United States (South Dakota) +use super::*; + +/// Generate holiday map for United States (South Dakota). +#[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)?, + "Native Americans' Day", + ), + ], + &mut map, + Country::US_SD, + "United States (South Dakota)", + ); + + 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)?, + "Native Americans' Day", + ), + ], + &mut map, + Country::US_SD, + "United States (South Dakota)", + ); + + 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)?, + "Native Americans' Day", + ), + ], + &mut map, + Country::US_SD, + "United States (South Dakota)", + ); + + 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)?, + "Native Americans' Day", + ), + ], + &mut map, + Country::US_SD, + "United States (South Dakota)", + ); + + 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)?, + "Native Americans' Day", + ), + ], + &mut map, + Country::US_SD, + "United States (South Dakota)", + ); + + 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)?, + "Native Americans' Day", + ), + ], + &mut map, + Country::US_SD, + "United States (South Dakota)", + ); + + 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)?, + "Native Americans' Day", + ), + ], + &mut map, + Country::US_SD, + "United States (South Dakota)", + ); + + 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)?, + "Native Americans' Day", + ), + ], + &mut map, + Country::US_SD, + "United States (South Dakota)", + ); + + 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)?, + "Native Americans' Day", + ), + ], + &mut map, + Country::US_SD, + "United States (South Dakota)", + ); + + 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)?, + "Native Americans' Day", + ), + ], + &mut map, + Country::US_SD, + "United States (South Dakota)", + ); + + 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)?, + "Native Americans' Day", + ), + ], + &mut map, + Country::US_SD, + "United States (South Dakota)", + ); + + 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)?, + "Native Americans' Day", + ), + ], + &mut map, + Country::US_SD, + "United States (South Dakota)", + ); + + 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)?, + "Native Americans' Day", + ), + ], + &mut map, + Country::US_SD, + "United States (South Dakota)", + ); + + 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)?, + "Native Americans' Day", + ), + ], + &mut map, + Country::US_SD, + "United States (South Dakota)", + ); + + 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)?, + "Native Americans' Day", + ), + ], + &mut map, + Country::US_SD, + "United States (South Dakota)", + ); + + 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)?, + "Native Americans' Day", + ), + ], + &mut map, + Country::US_SD, + "United States (South Dakota)", + ); + + 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)?, + "Native Americans' Day", + ), + ], + &mut map, + Country::US_SD, + "United States (South Dakota)", + ); + + 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)?, + "Native Americans' Day", + ), + ], + &mut map, + Country::US_SD, + "United States (South Dakota)", + ); + + 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)?, + "Native Americans' Day", + ), + ], + &mut map, + Country::US_SD, + "United States (South Dakota)", + ); + + 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)?, + "Native Americans' Day", + ), + ], + &mut map, + Country::US_SD, + "United States (South Dakota)", + ); + + 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)?, + "Native Americans' Day", + ), + ], + &mut map, + Country::US_SD, + "United States (South Dakota)", + ); + + 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)?, + "Native Americans' Day", + ), + ], + &mut map, + Country::US_SD, + "United States (South Dakota)", + ); + + 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)?, + "Native Americans' Day", + ), + ], + &mut map, + Country::US_SD, + "United States (South Dakota)", + ); + + 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)?, + "Native Americans' Day", + ), + ], + &mut map, + Country::US_SD, + "United States (South Dakota)", + ); + + 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)?, + "Native Americans' Day", + ), + ], + &mut map, + Country::US_SD, + "United States (South Dakota)", + ); + + 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)?, + "Native Americans' Day", + ), + ], + &mut map, + Country::US_SD, + "United States (South Dakota)", + ); + + 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)?, + "Native Americans' Day", + ), + ], + &mut map, + Country::US_SD, + "United States (South Dakota)", + ); + + 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)?, + "Native Americans' Day", + ), + ], + &mut map, + Country::US_SD, + "United States (South Dakota)", + ); + + 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)?, + "Native Americans' Day", + ), + ], + &mut map, + Country::US_SD, + "United States (South Dakota)", + ); + + 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)?, + "Native Americans' Day", + ), + ], + &mut map, + Country::US_SD, + "United States (South Dakota)", + ); + + 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)?, + "Native Americans' Day", + ), + ], + &mut map, + Country::US_SD, + "United States (South Dakota)", + ); + + Ok(map) +} diff --git a/src/data/us_tn.rs b/src/data/us_tn.rs new file mode 100644 index 0000000..0168f0a --- /dev/null +++ b/src/data/us_tn.rs @@ -0,0 +1,1006 @@ +//! United States (Tennessee) +use super::*; + +/// Generate holiday map for United States (Tennessee). +#[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, 4, 21)?, "Good Friday"), + ], + &mut map, + Country::US_TN, + "United States (Tennessee)", + ); + + 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, 4, 13)?, "Good Friday"), + ], + &mut map, + Country::US_TN, + "United States (Tennessee)", + ); + + 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, 3, 29)?, "Good Friday"), + ], + &mut map, + Country::US_TN, + "United States (Tennessee)", + ); + + 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, 4, 18)?, "Good Friday"), + ], + &mut map, + Country::US_TN, + "United States (Tennessee)", + ); + + 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, 4, 9)?, "Good Friday"), + ], + &mut map, + Country::US_TN, + "United States (Tennessee)", + ); + + 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, 3, 25)?, "Good Friday"), + ], + &mut map, + Country::US_TN, + "United States (Tennessee)", + ); + + 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, 4, 14)?, "Good Friday"), + ], + &mut map, + Country::US_TN, + "United States (Tennessee)", + ); + + 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, 4, 6)?, "Good Friday"), + ], + &mut map, + Country::US_TN, + "United States (Tennessee)", + ); + + 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, 3, 21)?, "Good Friday"), + ], + &mut map, + Country::US_TN, + "United States (Tennessee)", + ); + + 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, 4, 10)?, "Good Friday"), + ], + &mut map, + Country::US_TN, + "United States (Tennessee)", + ); + + 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, 4, 2)?, "Good Friday"), + ], + &mut map, + Country::US_TN, + "United States (Tennessee)", + ); + + 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, 4, 22)?, "Good Friday"), + ], + &mut map, + Country::US_TN, + "United States (Tennessee)", + ); + + 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, 4, 6)?, "Good Friday"), + ], + &mut map, + Country::US_TN, + "United States (Tennessee)", + ); + + 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, 3, 29)?, "Good Friday"), + ], + &mut map, + Country::US_TN, + "United States (Tennessee)", + ); + + 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, 4, 18)?, "Good Friday"), + ], + &mut map, + Country::US_TN, + "United States (Tennessee)", + ); + + 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, 4, 3)?, "Good Friday"), + ], + &mut map, + Country::US_TN, + "United States (Tennessee)", + ); + + 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, 3, 25)?, "Good Friday"), + ], + &mut map, + Country::US_TN, + "United States (Tennessee)", + ); + + 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, 4, 14)?, "Good Friday"), + ], + &mut map, + Country::US_TN, + "United States (Tennessee)", + ); + + 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, 3, 30)?, "Good Friday"), + ], + &mut map, + Country::US_TN, + "United States (Tennessee)", + ); + + 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, 4, 19)?, "Good Friday"), + ], + &mut map, + Country::US_TN, + "United States (Tennessee)", + ); + + 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, 4, 10)?, "Good Friday"), + ], + &mut map, + Country::US_TN, + "United States (Tennessee)", + ); + + 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, 4, 2)?, "Good Friday"), + ], + &mut map, + Country::US_TN, + "United States (Tennessee)", + ); + + 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, 4, 15)?, "Good Friday"), + ], + &mut map, + Country::US_TN, + "United States (Tennessee)", + ); + + 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, 4, 7)?, "Good Friday"), + ], + &mut map, + Country::US_TN, + "United States (Tennessee)", + ); + + 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, 3, 29)?, "Good Friday"), + ], + &mut map, + Country::US_TN, + "United States (Tennessee)", + ); + + 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, 4, 18)?, "Good Friday"), + ], + &mut map, + Country::US_TN, + "United States (Tennessee)", + ); + + 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, 4, 3)?, "Good Friday"), + ], + &mut map, + Country::US_TN, + "United States (Tennessee)", + ); + + 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, 3, 26)?, "Good Friday"), + ], + &mut map, + Country::US_TN, + "United States (Tennessee)", + ); + + 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, 4, 14)?, "Good Friday"), + ], + &mut map, + Country::US_TN, + "United States (Tennessee)", + ); + + 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, 3, 30)?, "Good Friday"), + ], + &mut map, + Country::US_TN, + "United States (Tennessee)", + ); + + 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, 4, 19)?, "Good Friday"), + ], + &mut map, + Country::US_TN, + "United States (Tennessee)", + ); + + Ok(map) +} diff --git a/src/data/us_tx.rs b/src/data/us_tx.rs new file mode 100644 index 0000000..e97a6a2 --- /dev/null +++ b/src/data/us_tx.rs @@ -0,0 +1,1821 @@ +//! United States (Texas) +use super::*; + +/// Generate holiday map for United States (Texas). +#[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, 1, 19)?, + "Confederate Memorial Day", + ), + ( + NaiveDate::from_ymd_res(2000, 3, 2)?, + "Texas Independence Day", + ), + (NaiveDate::from_ymd_res(2000, 3, 31)?, "Cesar Chavez Day"), + ( + NaiveDate::from_ymd_res(2000, 4, 21)?, + "Good Friday; San Jacinto Day", + ), + ( + NaiveDate::from_ymd_res(2000, 6, 19)?, + "Emancipation Day In Texas", + ), + ( + NaiveDate::from_ymd_res(2000, 8, 27)?, + "Lyndon Baines Johnson Day", + ), + ( + NaiveDate::from_ymd_res(2000, 11, 24)?, + "Friday After Thanksgiving", + ), + (NaiveDate::from_ymd_res(2000, 12, 24)?, "Christmas Eve"), + ( + NaiveDate::from_ymd_res(2000, 12, 22)?, + "Christmas Eve (observed)", + ), + ( + NaiveDate::from_ymd_res(2000, 12, 26)?, + "Day After Christmas", + ), + ], + &mut map, + Country::US_TX, + "United States (Texas)", + ); + + 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, 1, 19)?, + "Confederate Memorial Day", + ), + ( + NaiveDate::from_ymd_res(2001, 3, 2)?, + "Texas Independence Day", + ), + (NaiveDate::from_ymd_res(2001, 3, 31)?, "Cesar Chavez Day"), + (NaiveDate::from_ymd_res(2001, 4, 13)?, "Good Friday"), + (NaiveDate::from_ymd_res(2001, 4, 21)?, "San Jacinto Day"), + ( + NaiveDate::from_ymd_res(2001, 6, 19)?, + "Emancipation Day In Texas", + ), + ( + NaiveDate::from_ymd_res(2001, 8, 27)?, + "Lyndon Baines Johnson Day", + ), + ( + NaiveDate::from_ymd_res(2001, 11, 23)?, + "Friday After Thanksgiving", + ), + (NaiveDate::from_ymd_res(2001, 12, 24)?, "Christmas Eve"), + ( + NaiveDate::from_ymd_res(2001, 12, 26)?, + "Day After Christmas", + ), + ], + &mut map, + Country::US_TX, + "United States (Texas)", + ); + + 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, 1, 19)?, + "Confederate Memorial Day", + ), + ( + NaiveDate::from_ymd_res(2002, 3, 2)?, + "Texas Independence Day", + ), + (NaiveDate::from_ymd_res(2002, 3, 31)?, "Cesar Chavez Day"), + (NaiveDate::from_ymd_res(2002, 3, 29)?, "Good Friday"), + (NaiveDate::from_ymd_res(2002, 4, 21)?, "San Jacinto Day"), + ( + NaiveDate::from_ymd_res(2002, 6, 19)?, + "Emancipation Day In Texas", + ), + ( + NaiveDate::from_ymd_res(2002, 8, 27)?, + "Lyndon Baines Johnson Day", + ), + ( + NaiveDate::from_ymd_res(2002, 11, 29)?, + "Friday After Thanksgiving", + ), + (NaiveDate::from_ymd_res(2002, 12, 24)?, "Christmas Eve"), + ( + NaiveDate::from_ymd_res(2002, 12, 26)?, + "Day After Christmas", + ), + ], + &mut map, + Country::US_TX, + "United States (Texas)", + ); + + 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, 1, 19)?, + "Confederate Memorial Day", + ), + ( + NaiveDate::from_ymd_res(2003, 3, 2)?, + "Texas Independence Day", + ), + (NaiveDate::from_ymd_res(2003, 3, 31)?, "Cesar Chavez Day"), + (NaiveDate::from_ymd_res(2003, 4, 18)?, "Good Friday"), + (NaiveDate::from_ymd_res(2003, 4, 21)?, "San Jacinto Day"), + ( + NaiveDate::from_ymd_res(2003, 6, 19)?, + "Emancipation Day In Texas", + ), + ( + NaiveDate::from_ymd_res(2003, 8, 27)?, + "Lyndon Baines Johnson Day", + ), + ( + NaiveDate::from_ymd_res(2003, 11, 28)?, + "Friday After Thanksgiving", + ), + (NaiveDate::from_ymd_res(2003, 12, 24)?, "Christmas Eve"), + ( + NaiveDate::from_ymd_res(2003, 12, 26)?, + "Day After Christmas", + ), + ], + &mut map, + Country::US_TX, + "United States (Texas)", + ); + + 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); Christmas Eve", + ), + ( + NaiveDate::from_ymd_res(2004, 1, 19)?, + "Confederate Memorial Day; Martin Luther King Jr. Day", + ), + ( + NaiveDate::from_ymd_res(2004, 2, 16)?, + "Washington's Birthday", + ), + ( + NaiveDate::from_ymd_res(2004, 3, 2)?, + "Texas Independence Day", + ), + (NaiveDate::from_ymd_res(2004, 3, 31)?, "Cesar Chavez Day"), + (NaiveDate::from_ymd_res(2004, 4, 9)?, "Good Friday"), + (NaiveDate::from_ymd_res(2004, 4, 21)?, "San Jacinto Day"), + ( + NaiveDate::from_ymd_res(2004, 6, 19)?, + "Emancipation Day In Texas", + ), + ( + NaiveDate::from_ymd_res(2004, 8, 27)?, + "Lyndon Baines Johnson Day", + ), + ( + NaiveDate::from_ymd_res(2004, 11, 26)?, + "Friday After Thanksgiving", + ), + ( + NaiveDate::from_ymd_res(2004, 12, 23)?, + "Christmas Eve (observed)", + ), + ( + NaiveDate::from_ymd_res(2004, 12, 26)?, + "Day After Christmas", + ), + ], + &mut map, + Country::US_TX, + "United States (Texas)", + ); + + 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); Day After Christmas", + ), + ( + 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, 1, 19)?, + "Confederate Memorial Day", + ), + ( + NaiveDate::from_ymd_res(2005, 3, 2)?, + "Texas Independence Day", + ), + (NaiveDate::from_ymd_res(2005, 3, 31)?, "Cesar Chavez Day"), + (NaiveDate::from_ymd_res(2005, 3, 25)?, "Good Friday"), + (NaiveDate::from_ymd_res(2005, 4, 21)?, "San Jacinto Day"), + ( + NaiveDate::from_ymd_res(2005, 6, 19)?, + "Emancipation Day In Texas", + ), + ( + NaiveDate::from_ymd_res(2005, 8, 27)?, + "Lyndon Baines Johnson Day", + ), + ( + NaiveDate::from_ymd_res(2005, 11, 25)?, + "Friday After Thanksgiving", + ), + (NaiveDate::from_ymd_res(2005, 12, 24)?, "Christmas Eve"), + ( + NaiveDate::from_ymd_res(2005, 12, 23)?, + "Christmas Eve (observed)", + ), + ], + &mut map, + Country::US_TX, + "United States (Texas)", + ); + + 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, 1, 19)?, + "Confederate Memorial Day", + ), + ( + NaiveDate::from_ymd_res(2006, 3, 2)?, + "Texas Independence Day", + ), + (NaiveDate::from_ymd_res(2006, 3, 31)?, "Cesar Chavez Day"), + (NaiveDate::from_ymd_res(2006, 4, 14)?, "Good Friday"), + (NaiveDate::from_ymd_res(2006, 4, 21)?, "San Jacinto Day"), + ( + NaiveDate::from_ymd_res(2006, 6, 19)?, + "Emancipation Day In Texas", + ), + ( + NaiveDate::from_ymd_res(2006, 8, 27)?, + "Lyndon Baines Johnson Day", + ), + ( + NaiveDate::from_ymd_res(2006, 11, 24)?, + "Friday After Thanksgiving", + ), + (NaiveDate::from_ymd_res(2006, 12, 24)?, "Christmas Eve"), + ( + NaiveDate::from_ymd_res(2006, 12, 22)?, + "Christmas Eve (observed)", + ), + ( + NaiveDate::from_ymd_res(2006, 12, 26)?, + "Day After Christmas", + ), + ], + &mut map, + Country::US_TX, + "United States (Texas)", + ); + + 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, 1, 19)?, + "Confederate Memorial Day", + ), + ( + NaiveDate::from_ymd_res(2007, 3, 2)?, + "Texas Independence Day", + ), + (NaiveDate::from_ymd_res(2007, 3, 31)?, "Cesar Chavez Day"), + (NaiveDate::from_ymd_res(2007, 4, 6)?, "Good Friday"), + (NaiveDate::from_ymd_res(2007, 4, 21)?, "San Jacinto Day"), + ( + NaiveDate::from_ymd_res(2007, 6, 19)?, + "Emancipation Day In Texas", + ), + ( + NaiveDate::from_ymd_res(2007, 8, 27)?, + "Lyndon Baines Johnson Day", + ), + ( + NaiveDate::from_ymd_res(2007, 11, 23)?, + "Friday After Thanksgiving", + ), + (NaiveDate::from_ymd_res(2007, 12, 24)?, "Christmas Eve"), + ( + NaiveDate::from_ymd_res(2007, 12, 26)?, + "Day After Christmas", + ), + ], + &mut map, + Country::US_TX, + "United States (Texas)", + ); + + 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, 1, 19)?, + "Confederate Memorial Day", + ), + ( + NaiveDate::from_ymd_res(2008, 3, 2)?, + "Texas Independence Day", + ), + (NaiveDate::from_ymd_res(2008, 3, 31)?, "Cesar Chavez Day"), + (NaiveDate::from_ymd_res(2008, 3, 21)?, "Good Friday"), + (NaiveDate::from_ymd_res(2008, 4, 21)?, "San Jacinto Day"), + ( + NaiveDate::from_ymd_res(2008, 6, 19)?, + "Emancipation Day In Texas", + ), + ( + NaiveDate::from_ymd_res(2008, 8, 27)?, + "Lyndon Baines Johnson Day", + ), + ( + NaiveDate::from_ymd_res(2008, 11, 28)?, + "Friday After Thanksgiving", + ), + (NaiveDate::from_ymd_res(2008, 12, 24)?, "Christmas Eve"), + ( + NaiveDate::from_ymd_res(2008, 12, 26)?, + "Day After Christmas", + ), + ], + &mut map, + Country::US_TX, + "United States (Texas)", + ); + + 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)?, + "Confederate Memorial Day; Martin Luther King Jr. Day", + ), + ( + NaiveDate::from_ymd_res(2009, 2, 16)?, + "Washington's Birthday", + ), + ( + NaiveDate::from_ymd_res(2009, 3, 2)?, + "Texas Independence Day", + ), + (NaiveDate::from_ymd_res(2009, 3, 31)?, "Cesar Chavez Day"), + (NaiveDate::from_ymd_res(2009, 4, 10)?, "Good Friday"), + (NaiveDate::from_ymd_res(2009, 4, 21)?, "San Jacinto Day"), + ( + NaiveDate::from_ymd_res(2009, 6, 19)?, + "Emancipation Day In Texas", + ), + ( + NaiveDate::from_ymd_res(2009, 8, 27)?, + "Lyndon Baines Johnson Day", + ), + ( + NaiveDate::from_ymd_res(2009, 11, 27)?, + "Friday After Thanksgiving", + ), + (NaiveDate::from_ymd_res(2009, 12, 24)?, "Christmas Eve"), + ( + NaiveDate::from_ymd_res(2009, 12, 26)?, + "Day After Christmas", + ), + ], + &mut map, + Country::US_TX, + "United States (Texas)", + ); + + 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); Christmas Eve", + ), + ( + 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, 1, 19)?, + "Confederate Memorial Day", + ), + ( + NaiveDate::from_ymd_res(2010, 3, 2)?, + "Texas Independence Day", + ), + (NaiveDate::from_ymd_res(2010, 3, 31)?, "Cesar Chavez Day"), + (NaiveDate::from_ymd_res(2010, 4, 2)?, "Good Friday"), + (NaiveDate::from_ymd_res(2010, 4, 21)?, "San Jacinto Day"), + ( + NaiveDate::from_ymd_res(2010, 6, 19)?, + "Emancipation Day In Texas", + ), + ( + NaiveDate::from_ymd_res(2010, 8, 27)?, + "Lyndon Baines Johnson Day", + ), + ( + NaiveDate::from_ymd_res(2010, 11, 26)?, + "Friday After Thanksgiving", + ), + ( + NaiveDate::from_ymd_res(2010, 12, 23)?, + "Christmas Eve (observed)", + ), + ( + NaiveDate::from_ymd_res(2010, 12, 26)?, + "Day After Christmas", + ), + ], + &mut map, + Country::US_TX, + "United States (Texas)", + ); + + 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); Day After Christmas", + ), + ( + 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, 1, 19)?, + "Confederate Memorial Day", + ), + ( + NaiveDate::from_ymd_res(2011, 3, 2)?, + "Texas Independence Day", + ), + (NaiveDate::from_ymd_res(2011, 3, 31)?, "Cesar Chavez Day"), + (NaiveDate::from_ymd_res(2011, 4, 22)?, "Good Friday"), + (NaiveDate::from_ymd_res(2011, 4, 21)?, "San Jacinto Day"), + ( + NaiveDate::from_ymd_res(2011, 6, 19)?, + "Emancipation Day In Texas", + ), + ( + NaiveDate::from_ymd_res(2011, 8, 27)?, + "Lyndon Baines Johnson Day", + ), + ( + NaiveDate::from_ymd_res(2011, 11, 25)?, + "Friday After Thanksgiving", + ), + (NaiveDate::from_ymd_res(2011, 12, 24)?, "Christmas Eve"), + ( + NaiveDate::from_ymd_res(2011, 12, 23)?, + "Christmas Eve (observed)", + ), + ], + &mut map, + Country::US_TX, + "United States (Texas)", + ); + + 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, 1, 19)?, + "Confederate Memorial Day", + ), + ( + NaiveDate::from_ymd_res(2012, 3, 2)?, + "Texas Independence Day", + ), + (NaiveDate::from_ymd_res(2012, 3, 31)?, "Cesar Chavez Day"), + (NaiveDate::from_ymd_res(2012, 4, 6)?, "Good Friday"), + (NaiveDate::from_ymd_res(2012, 4, 21)?, "San Jacinto Day"), + ( + NaiveDate::from_ymd_res(2012, 6, 19)?, + "Emancipation Day In Texas", + ), + ( + NaiveDate::from_ymd_res(2012, 8, 27)?, + "Lyndon Baines Johnson Day", + ), + ( + NaiveDate::from_ymd_res(2012, 11, 23)?, + "Friday After Thanksgiving", + ), + (NaiveDate::from_ymd_res(2012, 12, 24)?, "Christmas Eve"), + ( + NaiveDate::from_ymd_res(2012, 12, 26)?, + "Day After Christmas", + ), + ], + &mut map, + Country::US_TX, + "United States (Texas)", + ); + + 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, 1, 19)?, + "Confederate Memorial Day", + ), + ( + NaiveDate::from_ymd_res(2013, 3, 2)?, + "Texas Independence Day", + ), + (NaiveDate::from_ymd_res(2013, 3, 31)?, "Cesar Chavez Day"), + (NaiveDate::from_ymd_res(2013, 3, 29)?, "Good Friday"), + (NaiveDate::from_ymd_res(2013, 4, 21)?, "San Jacinto Day"), + ( + NaiveDate::from_ymd_res(2013, 6, 19)?, + "Emancipation Day In Texas", + ), + ( + NaiveDate::from_ymd_res(2013, 8, 27)?, + "Lyndon Baines Johnson Day", + ), + ( + NaiveDate::from_ymd_res(2013, 11, 29)?, + "Friday After Thanksgiving", + ), + (NaiveDate::from_ymd_res(2013, 12, 24)?, "Christmas Eve"), + ( + NaiveDate::from_ymd_res(2013, 12, 26)?, + "Day After Christmas", + ), + ], + &mut map, + Country::US_TX, + "United States (Texas)", + ); + + 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, 1, 19)?, + "Confederate Memorial Day", + ), + ( + NaiveDate::from_ymd_res(2014, 3, 2)?, + "Texas Independence Day", + ), + (NaiveDate::from_ymd_res(2014, 3, 31)?, "Cesar Chavez Day"), + (NaiveDate::from_ymd_res(2014, 4, 18)?, "Good Friday"), + (NaiveDate::from_ymd_res(2014, 4, 21)?, "San Jacinto Day"), + ( + NaiveDate::from_ymd_res(2014, 6, 19)?, + "Emancipation Day In Texas", + ), + ( + NaiveDate::from_ymd_res(2014, 8, 27)?, + "Lyndon Baines Johnson Day", + ), + ( + NaiveDate::from_ymd_res(2014, 11, 28)?, + "Friday After Thanksgiving", + ), + (NaiveDate::from_ymd_res(2014, 12, 24)?, "Christmas Eve"), + ( + NaiveDate::from_ymd_res(2014, 12, 26)?, + "Day After Christmas", + ), + ], + &mut map, + Country::US_TX, + "United States (Texas)", + ); + + 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)?, + "Confederate Memorial Day; Martin Luther King Jr. Day", + ), + ( + NaiveDate::from_ymd_res(2015, 2, 16)?, + "Washington's Birthday", + ), + ( + NaiveDate::from_ymd_res(2015, 3, 2)?, + "Texas Independence Day", + ), + (NaiveDate::from_ymd_res(2015, 3, 31)?, "Cesar Chavez Day"), + (NaiveDate::from_ymd_res(2015, 4, 3)?, "Good Friday"), + (NaiveDate::from_ymd_res(2015, 4, 21)?, "San Jacinto Day"), + ( + NaiveDate::from_ymd_res(2015, 6, 19)?, + "Emancipation Day In Texas", + ), + ( + NaiveDate::from_ymd_res(2015, 8, 27)?, + "Lyndon Baines Johnson Day", + ), + ( + NaiveDate::from_ymd_res(2015, 11, 27)?, + "Friday After Thanksgiving", + ), + (NaiveDate::from_ymd_res(2015, 12, 24)?, "Christmas Eve"), + ( + NaiveDate::from_ymd_res(2015, 12, 26)?, + "Day After Christmas", + ), + ], + &mut map, + Country::US_TX, + "United States (Texas)", + ); + + 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); Day After Christmas", + ), + ( + 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, 1, 19)?, + "Confederate Memorial Day", + ), + ( + NaiveDate::from_ymd_res(2016, 3, 2)?, + "Texas Independence Day", + ), + (NaiveDate::from_ymd_res(2016, 3, 31)?, "Cesar Chavez Day"), + (NaiveDate::from_ymd_res(2016, 3, 25)?, "Good Friday"), + (NaiveDate::from_ymd_res(2016, 4, 21)?, "San Jacinto Day"), + ( + NaiveDate::from_ymd_res(2016, 6, 19)?, + "Emancipation Day In Texas", + ), + ( + NaiveDate::from_ymd_res(2016, 8, 27)?, + "Lyndon Baines Johnson Day", + ), + ( + NaiveDate::from_ymd_res(2016, 11, 25)?, + "Friday After Thanksgiving", + ), + (NaiveDate::from_ymd_res(2016, 12, 24)?, "Christmas Eve"), + ( + NaiveDate::from_ymd_res(2016, 12, 23)?, + "Christmas Eve (observed)", + ), + ], + &mut map, + Country::US_TX, + "United States (Texas)", + ); + + 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, 1, 19)?, + "Confederate Memorial Day", + ), + ( + NaiveDate::from_ymd_res(2017, 3, 2)?, + "Texas Independence Day", + ), + (NaiveDate::from_ymd_res(2017, 3, 31)?, "Cesar Chavez Day"), + (NaiveDate::from_ymd_res(2017, 4, 14)?, "Good Friday"), + (NaiveDate::from_ymd_res(2017, 4, 21)?, "San Jacinto Day"), + ( + NaiveDate::from_ymd_res(2017, 6, 19)?, + "Emancipation Day In Texas", + ), + ( + NaiveDate::from_ymd_res(2017, 8, 27)?, + "Lyndon Baines Johnson Day", + ), + ( + NaiveDate::from_ymd_res(2017, 11, 24)?, + "Friday After Thanksgiving", + ), + (NaiveDate::from_ymd_res(2017, 12, 24)?, "Christmas Eve"), + ( + NaiveDate::from_ymd_res(2017, 12, 22)?, + "Christmas Eve (observed)", + ), + ( + NaiveDate::from_ymd_res(2017, 12, 26)?, + "Day After Christmas", + ), + ], + &mut map, + Country::US_TX, + "United States (Texas)", + ); + + 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, 1, 19)?, + "Confederate Memorial Day", + ), + ( + NaiveDate::from_ymd_res(2018, 3, 2)?, + "Texas Independence Day", + ), + (NaiveDate::from_ymd_res(2018, 3, 31)?, "Cesar Chavez Day"), + (NaiveDate::from_ymd_res(2018, 3, 30)?, "Good Friday"), + (NaiveDate::from_ymd_res(2018, 4, 21)?, "San Jacinto Day"), + ( + NaiveDate::from_ymd_res(2018, 6, 19)?, + "Emancipation Day In Texas", + ), + ( + NaiveDate::from_ymd_res(2018, 8, 27)?, + "Lyndon Baines Johnson Day", + ), + ( + NaiveDate::from_ymd_res(2018, 11, 23)?, + "Friday After Thanksgiving", + ), + (NaiveDate::from_ymd_res(2018, 12, 24)?, "Christmas Eve"), + ( + NaiveDate::from_ymd_res(2018, 12, 26)?, + "Day After Christmas", + ), + ], + &mut map, + Country::US_TX, + "United States (Texas)", + ); + + 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, 1, 19)?, + "Confederate Memorial Day", + ), + ( + NaiveDate::from_ymd_res(2019, 3, 2)?, + "Texas Independence Day", + ), + (NaiveDate::from_ymd_res(2019, 3, 31)?, "Cesar Chavez Day"), + (NaiveDate::from_ymd_res(2019, 4, 19)?, "Good Friday"), + (NaiveDate::from_ymd_res(2019, 4, 21)?, "San Jacinto Day"), + ( + NaiveDate::from_ymd_res(2019, 6, 19)?, + "Emancipation Day In Texas", + ), + ( + NaiveDate::from_ymd_res(2019, 8, 27)?, + "Lyndon Baines Johnson Day", + ), + ( + NaiveDate::from_ymd_res(2019, 11, 29)?, + "Friday After Thanksgiving", + ), + (NaiveDate::from_ymd_res(2019, 12, 24)?, "Christmas Eve"), + ( + NaiveDate::from_ymd_res(2019, 12, 26)?, + "Day After Christmas", + ), + ], + &mut map, + Country::US_TX, + "United States (Texas)", + ); + + 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, 1, 19)?, + "Confederate Memorial Day", + ), + ( + NaiveDate::from_ymd_res(2020, 3, 2)?, + "Texas Independence Day", + ), + (NaiveDate::from_ymd_res(2020, 3, 31)?, "Cesar Chavez Day"), + (NaiveDate::from_ymd_res(2020, 4, 10)?, "Good Friday"), + (NaiveDate::from_ymd_res(2020, 4, 21)?, "San Jacinto Day"), + ( + NaiveDate::from_ymd_res(2020, 6, 19)?, + "Emancipation Day In Texas", + ), + ( + NaiveDate::from_ymd_res(2020, 8, 27)?, + "Lyndon Baines Johnson Day", + ), + ( + NaiveDate::from_ymd_res(2020, 11, 27)?, + "Friday After Thanksgiving", + ), + (NaiveDate::from_ymd_res(2020, 12, 24)?, "Christmas Eve"), + ( + NaiveDate::from_ymd_res(2020, 12, 26)?, + "Day After Christmas", + ), + ], + &mut map, + Country::US_TX, + "United States (Texas)", + ); + + 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)?, + "Emancipation Day In Texas; 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); Christmas Eve", + ), + ( + 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, 1, 19)?, + "Confederate Memorial Day", + ), + ( + NaiveDate::from_ymd_res(2021, 3, 2)?, + "Texas Independence Day", + ), + (NaiveDate::from_ymd_res(2021, 3, 31)?, "Cesar Chavez Day"), + (NaiveDate::from_ymd_res(2021, 4, 2)?, "Good Friday"), + (NaiveDate::from_ymd_res(2021, 4, 21)?, "San Jacinto Day"), + ( + NaiveDate::from_ymd_res(2021, 8, 27)?, + "Lyndon Baines Johnson Day", + ), + ( + NaiveDate::from_ymd_res(2021, 11, 26)?, + "Friday After Thanksgiving", + ), + ( + NaiveDate::from_ymd_res(2021, 12, 23)?, + "Christmas Eve (observed)", + ), + ( + NaiveDate::from_ymd_res(2021, 12, 26)?, + "Day After Christmas", + ), + ], + &mut map, + Country::US_TX, + "United States (Texas)", + ); + + 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)?, + "Emancipation Day In Texas; 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); Day After Christmas", + ), + ( + 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, 1, 19)?, + "Confederate Memorial Day", + ), + ( + NaiveDate::from_ymd_res(2022, 3, 2)?, + "Texas Independence Day", + ), + (NaiveDate::from_ymd_res(2022, 3, 31)?, "Cesar Chavez Day"), + (NaiveDate::from_ymd_res(2022, 4, 15)?, "Good Friday"), + (NaiveDate::from_ymd_res(2022, 4, 21)?, "San Jacinto Day"), + ( + NaiveDate::from_ymd_res(2022, 8, 27)?, + "Lyndon Baines Johnson Day", + ), + ( + NaiveDate::from_ymd_res(2022, 11, 25)?, + "Friday After Thanksgiving", + ), + (NaiveDate::from_ymd_res(2022, 12, 24)?, "Christmas Eve"), + ( + NaiveDate::from_ymd_res(2022, 12, 23)?, + "Christmas Eve (observed)", + ), + ], + &mut map, + Country::US_TX, + "United States (Texas)", + ); + + 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)?, + "Emancipation Day In Texas; 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, 1, 19)?, + "Confederate Memorial Day", + ), + ( + NaiveDate::from_ymd_res(2023, 3, 2)?, + "Texas Independence Day", + ), + (NaiveDate::from_ymd_res(2023, 3, 31)?, "Cesar Chavez Day"), + (NaiveDate::from_ymd_res(2023, 4, 7)?, "Good Friday"), + (NaiveDate::from_ymd_res(2023, 4, 21)?, "San Jacinto Day"), + ( + NaiveDate::from_ymd_res(2023, 8, 27)?, + "Lyndon Baines Johnson Day", + ), + ( + NaiveDate::from_ymd_res(2023, 11, 24)?, + "Friday After Thanksgiving", + ), + (NaiveDate::from_ymd_res(2023, 12, 24)?, "Christmas Eve"), + ( + NaiveDate::from_ymd_res(2023, 12, 22)?, + "Christmas Eve (observed)", + ), + ( + NaiveDate::from_ymd_res(2023, 12, 26)?, + "Day After Christmas", + ), + ], + &mut map, + Country::US_TX, + "United States (Texas)", + ); + + 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)?, + "Emancipation Day In Texas; 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, 1, 19)?, + "Confederate Memorial Day", + ), + ( + NaiveDate::from_ymd_res(2024, 3, 2)?, + "Texas Independence Day", + ), + (NaiveDate::from_ymd_res(2024, 3, 31)?, "Cesar Chavez Day"), + (NaiveDate::from_ymd_res(2024, 3, 29)?, "Good Friday"), + (NaiveDate::from_ymd_res(2024, 4, 21)?, "San Jacinto Day"), + ( + NaiveDate::from_ymd_res(2024, 8, 27)?, + "Lyndon Baines Johnson Day", + ), + ( + NaiveDate::from_ymd_res(2024, 11, 29)?, + "Friday After Thanksgiving", + ), + (NaiveDate::from_ymd_res(2024, 12, 24)?, "Christmas Eve"), + ( + NaiveDate::from_ymd_res(2024, 12, 26)?, + "Day After Christmas", + ), + ], + &mut map, + Country::US_TX, + "United States (Texas)", + ); + + 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)?, + "Emancipation Day In Texas; 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, 1, 19)?, + "Confederate Memorial Day", + ), + ( + NaiveDate::from_ymd_res(2025, 3, 2)?, + "Texas Independence Day", + ), + (NaiveDate::from_ymd_res(2025, 3, 31)?, "Cesar Chavez Day"), + (NaiveDate::from_ymd_res(2025, 4, 18)?, "Good Friday"), + (NaiveDate::from_ymd_res(2025, 4, 21)?, "San Jacinto Day"), + ( + NaiveDate::from_ymd_res(2025, 8, 27)?, + "Lyndon Baines Johnson Day", + ), + ( + NaiveDate::from_ymd_res(2025, 11, 28)?, + "Friday After Thanksgiving", + ), + (NaiveDate::from_ymd_res(2025, 12, 24)?, "Christmas Eve"), + ( + NaiveDate::from_ymd_res(2025, 12, 26)?, + "Day After Christmas", + ), + ], + &mut map, + Country::US_TX, + "United States (Texas)", + ); + + 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)?, + "Emancipation Day In Texas; 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)?, + "Confederate Memorial Day; Martin Luther King Jr. Day", + ), + ( + NaiveDate::from_ymd_res(2026, 2, 16)?, + "Washington's Birthday", + ), + ( + NaiveDate::from_ymd_res(2026, 3, 2)?, + "Texas Independence Day", + ), + (NaiveDate::from_ymd_res(2026, 3, 31)?, "Cesar Chavez Day"), + (NaiveDate::from_ymd_res(2026, 4, 3)?, "Good Friday"), + (NaiveDate::from_ymd_res(2026, 4, 21)?, "San Jacinto Day"), + ( + NaiveDate::from_ymd_res(2026, 8, 27)?, + "Lyndon Baines Johnson Day", + ), + ( + NaiveDate::from_ymd_res(2026, 11, 27)?, + "Friday After Thanksgiving", + ), + (NaiveDate::from_ymd_res(2026, 12, 24)?, "Christmas Eve"), + ( + NaiveDate::from_ymd_res(2026, 12, 26)?, + "Day After Christmas", + ), + ], + &mut map, + Country::US_TX, + "United States (Texas)", + ); + + 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)?, + "Emancipation Day In Texas; 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); Christmas Eve", + ), + ( + 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, 1, 19)?, + "Confederate Memorial Day", + ), + ( + NaiveDate::from_ymd_res(2027, 3, 2)?, + "Texas Independence Day", + ), + (NaiveDate::from_ymd_res(2027, 3, 31)?, "Cesar Chavez Day"), + (NaiveDate::from_ymd_res(2027, 3, 26)?, "Good Friday"), + (NaiveDate::from_ymd_res(2027, 4, 21)?, "San Jacinto Day"), + ( + NaiveDate::from_ymd_res(2027, 8, 27)?, + "Lyndon Baines Johnson Day", + ), + ( + NaiveDate::from_ymd_res(2027, 11, 26)?, + "Friday After Thanksgiving", + ), + ( + NaiveDate::from_ymd_res(2027, 12, 23)?, + "Christmas Eve (observed)", + ), + ( + NaiveDate::from_ymd_res(2027, 12, 26)?, + "Day After Christmas", + ), + ], + &mut map, + Country::US_TX, + "United States (Texas)", + ); + + 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)?, + "Emancipation Day In Texas; 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, 1, 19)?, + "Confederate Memorial Day", + ), + ( + NaiveDate::from_ymd_res(2028, 3, 2)?, + "Texas Independence Day", + ), + (NaiveDate::from_ymd_res(2028, 3, 31)?, "Cesar Chavez Day"), + (NaiveDate::from_ymd_res(2028, 4, 14)?, "Good Friday"), + (NaiveDate::from_ymd_res(2028, 4, 21)?, "San Jacinto Day"), + ( + NaiveDate::from_ymd_res(2028, 8, 27)?, + "Lyndon Baines Johnson Day", + ), + ( + NaiveDate::from_ymd_res(2028, 11, 24)?, + "Friday After Thanksgiving", + ), + (NaiveDate::from_ymd_res(2028, 12, 24)?, "Christmas Eve"), + ( + NaiveDate::from_ymd_res(2028, 12, 22)?, + "Christmas Eve (observed)", + ), + ( + NaiveDate::from_ymd_res(2028, 12, 26)?, + "Day After Christmas", + ), + ], + &mut map, + Country::US_TX, + "United States (Texas)", + ); + + 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)?, + "Emancipation Day In Texas; 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, 1, 19)?, + "Confederate Memorial Day", + ), + ( + NaiveDate::from_ymd_res(2029, 3, 2)?, + "Texas Independence Day", + ), + (NaiveDate::from_ymd_res(2029, 3, 31)?, "Cesar Chavez Day"), + (NaiveDate::from_ymd_res(2029, 3, 30)?, "Good Friday"), + (NaiveDate::from_ymd_res(2029, 4, 21)?, "San Jacinto Day"), + ( + NaiveDate::from_ymd_res(2029, 8, 27)?, + "Lyndon Baines Johnson Day", + ), + ( + NaiveDate::from_ymd_res(2029, 11, 23)?, + "Friday After Thanksgiving", + ), + (NaiveDate::from_ymd_res(2029, 12, 24)?, "Christmas Eve"), + ( + NaiveDate::from_ymd_res(2029, 12, 26)?, + "Day After Christmas", + ), + ], + &mut map, + Country::US_TX, + "United States (Texas)", + ); + + 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)?, + "Emancipation Day In Texas; 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, 1, 19)?, + "Confederate Memorial Day", + ), + ( + NaiveDate::from_ymd_res(2030, 3, 2)?, + "Texas Independence Day", + ), + (NaiveDate::from_ymd_res(2030, 3, 31)?, "Cesar Chavez Day"), + (NaiveDate::from_ymd_res(2030, 4, 19)?, "Good Friday"), + (NaiveDate::from_ymd_res(2030, 4, 21)?, "San Jacinto Day"), + ( + NaiveDate::from_ymd_res(2030, 8, 27)?, + "Lyndon Baines Johnson Day", + ), + ( + NaiveDate::from_ymd_res(2030, 11, 29)?, + "Friday After Thanksgiving", + ), + (NaiveDate::from_ymd_res(2030, 12, 24)?, "Christmas Eve"), + ( + NaiveDate::from_ymd_res(2030, 12, 26)?, + "Day After Christmas", + ), + ], + &mut map, + Country::US_TX, + "United States (Texas)", + ); + + Ok(map) +} diff --git a/src/data/us_um.rs b/src/data/us_um.rs new file mode 100644 index 0000000..49abdb9 --- /dev/null +++ b/src/data/us_um.rs @@ -0,0 +1,975 @@ +//! United States (United States Minor Outlying Islands) +use super::*; + +/// Generate holiday map for United States (United States Minor Outlying Islands). +#[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", + ), + ], + &mut map, + Country::US_UM, + "United States (United States Minor Outlying Islands)", + ); + + 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", + ), + ], + &mut map, + Country::US_UM, + "United States (United States Minor Outlying Islands)", + ); + + 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", + ), + ], + &mut map, + Country::US_UM, + "United States (United States Minor Outlying Islands)", + ); + + 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", + ), + ], + &mut map, + Country::US_UM, + "United States (United States Minor Outlying Islands)", + ); + + 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", + ), + ], + &mut map, + Country::US_UM, + "United States (United States Minor Outlying Islands)", + ); + + 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", + ), + ], + &mut map, + Country::US_UM, + "United States (United States Minor Outlying Islands)", + ); + + 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", + ), + ], + &mut map, + Country::US_UM, + "United States (United States Minor Outlying Islands)", + ); + + 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", + ), + ], + &mut map, + Country::US_UM, + "United States (United States Minor Outlying Islands)", + ); + + 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", + ), + ], + &mut map, + Country::US_UM, + "United States (United States Minor Outlying Islands)", + ); + + 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", + ), + ], + &mut map, + Country::US_UM, + "United States (United States Minor Outlying Islands)", + ); + + 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", + ), + ], + &mut map, + Country::US_UM, + "United States (United States Minor Outlying Islands)", + ); + + 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", + ), + ], + &mut map, + Country::US_UM, + "United States (United States Minor Outlying Islands)", + ); + + 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", + ), + ], + &mut map, + Country::US_UM, + "United States (United States Minor Outlying Islands)", + ); + + 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", + ), + ], + &mut map, + Country::US_UM, + "United States (United States Minor Outlying Islands)", + ); + + 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", + ), + ], + &mut map, + Country::US_UM, + "United States (United States Minor Outlying Islands)", + ); + + 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", + ), + ], + &mut map, + Country::US_UM, + "United States (United States Minor Outlying Islands)", + ); + + 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", + ), + ], + &mut map, + Country::US_UM, + "United States (United States Minor Outlying Islands)", + ); + + 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", + ), + ], + &mut map, + Country::US_UM, + "United States (United States Minor Outlying Islands)", + ); + + 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", + ), + ], + &mut map, + Country::US_UM, + "United States (United States Minor Outlying Islands)", + ); + + 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", + ), + ], + &mut map, + Country::US_UM, + "United States (United States Minor Outlying Islands)", + ); + + 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", + ), + ], + &mut map, + Country::US_UM, + "United States (United States Minor Outlying Islands)", + ); + + 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", + ), + ], + &mut map, + Country::US_UM, + "United States (United States Minor Outlying Islands)", + ); + + 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", + ), + ], + &mut map, + Country::US_UM, + "United States (United States Minor Outlying Islands)", + ); + + 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", + ), + ], + &mut map, + Country::US_UM, + "United States (United States Minor Outlying Islands)", + ); + + 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", + ), + ], + &mut map, + Country::US_UM, + "United States (United States Minor Outlying Islands)", + ); + + 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", + ), + ], + &mut map, + Country::US_UM, + "United States (United States Minor Outlying Islands)", + ); + + 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", + ), + ], + &mut map, + Country::US_UM, + "United States (United States Minor Outlying Islands)", + ); + + 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", + ), + ], + &mut map, + Country::US_UM, + "United States (United States Minor Outlying Islands)", + ); + + 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", + ), + ], + &mut map, + Country::US_UM, + "United States (United States Minor Outlying Islands)", + ); + + 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", + ), + ], + &mut map, + Country::US_UM, + "United States (United States Minor Outlying Islands)", + ); + + 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", + ), + ], + &mut map, + Country::US_UM, + "United States (United States Minor Outlying Islands)", + ); + + Ok(map) +} diff --git a/src/data/us_ut.rs b/src/data/us_ut.rs new file mode 100644 index 0000000..5c5c104 --- /dev/null +++ b/src/data/us_ut.rs @@ -0,0 +1,1069 @@ +//! United States (Utah) +use super::*; + +/// Generate holiday map for United States (Utah). +#[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"), + (NaiveDate::from_ymd_res(2000, 7, 24)?, "Pioneer Day"), + ], + &mut map, + Country::US_UT, + "United States (Utah)", + ); + + 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"), + (NaiveDate::from_ymd_res(2001, 7, 24)?, "Pioneer Day"), + ], + &mut map, + Country::US_UT, + "United States (Utah)", + ); + + 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"), + (NaiveDate::from_ymd_res(2002, 7, 24)?, "Pioneer Day"), + ], + &mut map, + Country::US_UT, + "United States (Utah)", + ); + + 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"), + (NaiveDate::from_ymd_res(2003, 7, 24)?, "Pioneer Day"), + ], + &mut map, + Country::US_UT, + "United States (Utah)", + ); + + 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"), + (NaiveDate::from_ymd_res(2004, 7, 24)?, "Pioneer Day"), + ( + NaiveDate::from_ymd_res(2004, 7, 23)?, + "Pioneer Day (observed)", + ), + ], + &mut map, + Country::US_UT, + "United States (Utah)", + ); + + 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"), + (NaiveDate::from_ymd_res(2005, 7, 24)?, "Pioneer Day"), + ( + NaiveDate::from_ymd_res(2005, 7, 25)?, + "Pioneer Day (observed)", + ), + ], + &mut map, + Country::US_UT, + "United States (Utah)", + ); + + 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"), + (NaiveDate::from_ymd_res(2006, 7, 24)?, "Pioneer Day"), + ], + &mut map, + Country::US_UT, + "United States (Utah)", + ); + + 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"), + (NaiveDate::from_ymd_res(2007, 7, 24)?, "Pioneer Day"), + ], + &mut map, + Country::US_UT, + "United States (Utah)", + ); + + 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"), + (NaiveDate::from_ymd_res(2008, 7, 24)?, "Pioneer Day"), + ], + &mut map, + Country::US_UT, + "United States (Utah)", + ); + + 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"), + (NaiveDate::from_ymd_res(2009, 7, 24)?, "Pioneer Day"), + ], + &mut map, + Country::US_UT, + "United States (Utah)", + ); + + 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"), + (NaiveDate::from_ymd_res(2010, 7, 24)?, "Pioneer Day"), + ( + NaiveDate::from_ymd_res(2010, 7, 23)?, + "Pioneer Day (observed)", + ), + ], + &mut map, + Country::US_UT, + "United States (Utah)", + ); + + 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"), + (NaiveDate::from_ymd_res(2011, 7, 24)?, "Pioneer Day"), + ( + NaiveDate::from_ymd_res(2011, 7, 25)?, + "Pioneer Day (observed)", + ), + ], + &mut map, + Country::US_UT, + "United States (Utah)", + ); + + 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"), + (NaiveDate::from_ymd_res(2012, 7, 24)?, "Pioneer Day"), + ], + &mut map, + Country::US_UT, + "United States (Utah)", + ); + + 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"), + (NaiveDate::from_ymd_res(2013, 7, 24)?, "Pioneer Day"), + ], + &mut map, + Country::US_UT, + "United States (Utah)", + ); + + 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"), + (NaiveDate::from_ymd_res(2014, 7, 24)?, "Pioneer Day"), + ], + &mut map, + Country::US_UT, + "United States (Utah)", + ); + + 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"), + (NaiveDate::from_ymd_res(2015, 7, 24)?, "Pioneer Day"), + ], + &mut map, + Country::US_UT, + "United States (Utah)", + ); + + 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"), + (NaiveDate::from_ymd_res(2016, 7, 24)?, "Pioneer Day"), + ( + NaiveDate::from_ymd_res(2016, 7, 25)?, + "Pioneer Day (observed)", + ), + ], + &mut map, + Country::US_UT, + "United States (Utah)", + ); + + 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"), + (NaiveDate::from_ymd_res(2017, 7, 24)?, "Pioneer Day"), + ], + &mut map, + Country::US_UT, + "United States (Utah)", + ); + + 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"), + (NaiveDate::from_ymd_res(2018, 7, 24)?, "Pioneer Day"), + ], + &mut map, + Country::US_UT, + "United States (Utah)", + ); + + 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"), + (NaiveDate::from_ymd_res(2019, 7, 24)?, "Pioneer Day"), + ], + &mut map, + Country::US_UT, + "United States (Utah)", + ); + + 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"), + (NaiveDate::from_ymd_res(2020, 7, 24)?, "Pioneer Day"), + ], + &mut map, + Country::US_UT, + "United States (Utah)", + ); + + 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"), + (NaiveDate::from_ymd_res(2021, 7, 24)?, "Pioneer Day"), + ( + NaiveDate::from_ymd_res(2021, 7, 23)?, + "Pioneer Day (observed)", + ), + ], + &mut map, + Country::US_UT, + "United States (Utah)", + ); + + 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"), + (NaiveDate::from_ymd_res(2022, 7, 24)?, "Pioneer Day"), + ( + NaiveDate::from_ymd_res(2022, 7, 25)?, + "Pioneer Day (observed)", + ), + ], + &mut map, + Country::US_UT, + "United States (Utah)", + ); + + 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"), + (NaiveDate::from_ymd_res(2023, 7, 24)?, "Pioneer Day"), + ], + &mut map, + Country::US_UT, + "United States (Utah)", + ); + + 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"), + (NaiveDate::from_ymd_res(2024, 7, 24)?, "Pioneer Day"), + ], + &mut map, + Country::US_UT, + "United States (Utah)", + ); + + 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"), + (NaiveDate::from_ymd_res(2025, 7, 24)?, "Pioneer Day"), + ], + &mut map, + Country::US_UT, + "United States (Utah)", + ); + + 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"), + (NaiveDate::from_ymd_res(2026, 7, 24)?, "Pioneer Day"), + ], + &mut map, + Country::US_UT, + "United States (Utah)", + ); + + 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"), + (NaiveDate::from_ymd_res(2027, 7, 24)?, "Pioneer Day"), + ( + NaiveDate::from_ymd_res(2027, 7, 23)?, + "Pioneer Day (observed)", + ), + ], + &mut map, + Country::US_UT, + "United States (Utah)", + ); + + 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"), + (NaiveDate::from_ymd_res(2028, 7, 24)?, "Pioneer Day"), + ], + &mut map, + Country::US_UT, + "United States (Utah)", + ); + + 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"), + (NaiveDate::from_ymd_res(2029, 7, 24)?, "Pioneer Day"), + ], + &mut map, + Country::US_UT, + "United States (Utah)", + ); + + 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"), + (NaiveDate::from_ymd_res(2030, 7, 24)?, "Pioneer Day"), + ], + &mut map, + Country::US_UT, + "United States (Utah)", + ); + + Ok(map) +} diff --git a/src/data/us_va.rs b/src/data/us_va.rs new file mode 100644 index 0000000..97bcaf1 --- /dev/null +++ b/src/data/us_va.rs @@ -0,0 +1,1067 @@ +//! United States (Virginia) +use super::*; + +/// Generate holiday map for United States (Virginia). +#[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, 1, 14)?, "Lee Jackson Day"), + (NaiveDate::from_ymd_res(2000, 10, 9)?, "Columbus Day"), + ], + &mut map, + Country::US_VA, + "United States (Virginia)", + ); + + 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, 1, 12)?, "Lee Jackson Day"), + (NaiveDate::from_ymd_res(2001, 1, 20)?, "Inauguration Day"), + (NaiveDate::from_ymd_res(2001, 10, 8)?, "Columbus Day"), + ], + &mut map, + Country::US_VA, + "United States (Virginia)", + ); + + 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, 1, 18)?, "Lee Jackson Day"), + (NaiveDate::from_ymd_res(2002, 10, 14)?, "Columbus Day"), + ], + &mut map, + Country::US_VA, + "United States (Virginia)", + ); + + 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, 1, 17)?, "Lee Jackson Day"), + (NaiveDate::from_ymd_res(2003, 10, 13)?, "Columbus Day"), + ], + &mut map, + Country::US_VA, + "United States (Virginia)", + ); + + 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, 1, 16)?, "Lee Jackson Day"), + (NaiveDate::from_ymd_res(2004, 10, 11)?, "Columbus Day"), + ], + &mut map, + Country::US_VA, + "United States (Virginia)", + ); + + 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, 1, 14)?, "Lee Jackson Day"), + (NaiveDate::from_ymd_res(2005, 1, 20)?, "Inauguration Day"), + (NaiveDate::from_ymd_res(2005, 10, 10)?, "Columbus Day"), + ], + &mut map, + Country::US_VA, + "United States (Virginia)", + ); + + 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, 1, 13)?, "Lee Jackson Day"), + (NaiveDate::from_ymd_res(2006, 10, 9)?, "Columbus Day"), + ], + &mut map, + Country::US_VA, + "United States (Virginia)", + ); + + 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, 1, 12)?, "Lee Jackson Day"), + (NaiveDate::from_ymd_res(2007, 10, 8)?, "Columbus Day"), + ], + &mut map, + Country::US_VA, + "United States (Virginia)", + ); + + 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, 1, 18)?, "Lee Jackson Day"), + (NaiveDate::from_ymd_res(2008, 10, 13)?, "Columbus Day"), + ], + &mut map, + Country::US_VA, + "United States (Virginia)", + ); + + 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, 1, 16)?, "Lee Jackson Day"), + (NaiveDate::from_ymd_res(2009, 1, 20)?, "Inauguration Day"), + (NaiveDate::from_ymd_res(2009, 10, 12)?, "Columbus Day"), + ], + &mut map, + Country::US_VA, + "United States (Virginia)", + ); + + 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, 1, 15)?, "Lee Jackson Day"), + (NaiveDate::from_ymd_res(2010, 10, 11)?, "Columbus Day"), + ], + &mut map, + Country::US_VA, + "United States (Virginia)", + ); + + 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, 1, 14)?, "Lee Jackson Day"), + (NaiveDate::from_ymd_res(2011, 10, 10)?, "Columbus Day"), + ], + &mut map, + Country::US_VA, + "United States (Virginia)", + ); + + 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, 1, 13)?, "Lee Jackson Day"), + (NaiveDate::from_ymd_res(2012, 10, 8)?, "Columbus Day"), + ], + &mut map, + Country::US_VA, + "United States (Virginia)", + ); + + 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)?, + "Inauguration Day (observed); Martin Luther King Jr. Day", + ), + ( + NaiveDate::from_ymd_res(2013, 2, 18)?, + "Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2013, 1, 18)?, "Lee Jackson Day"), + (NaiveDate::from_ymd_res(2013, 1, 20)?, "Inauguration Day"), + (NaiveDate::from_ymd_res(2013, 10, 14)?, "Columbus Day"), + ], + &mut map, + Country::US_VA, + "United States (Virginia)", + ); + + 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, 1, 17)?, "Lee Jackson Day"), + (NaiveDate::from_ymd_res(2014, 10, 13)?, "Columbus Day"), + ], + &mut map, + Country::US_VA, + "United States (Virginia)", + ); + + 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, 1, 16)?, "Lee Jackson Day"), + (NaiveDate::from_ymd_res(2015, 10, 12)?, "Columbus Day"), + ], + &mut map, + Country::US_VA, + "United States (Virginia)", + ); + + 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, 1, 15)?, "Lee Jackson Day"), + (NaiveDate::from_ymd_res(2016, 10, 10)?, "Columbus Day"), + ], + &mut map, + Country::US_VA, + "United States (Virginia)", + ); + + 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, 1, 13)?, "Lee Jackson Day"), + (NaiveDate::from_ymd_res(2017, 1, 20)?, "Inauguration Day"), + (NaiveDate::from_ymd_res(2017, 10, 9)?, "Columbus Day"), + ], + &mut map, + Country::US_VA, + "United States (Virginia)", + ); + + 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, 1, 12)?, "Lee Jackson Day"), + (NaiveDate::from_ymd_res(2018, 10, 8)?, "Columbus Day"), + ], + &mut map, + Country::US_VA, + "United States (Virginia)", + ); + + 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, 1, 18)?, "Lee Jackson Day"), + (NaiveDate::from_ymd_res(2019, 10, 14)?, "Columbus Day"), + ], + &mut map, + Country::US_VA, + "United States (Virginia)", + ); + + 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, 1, 17)?, "Lee Jackson Day"), + ( + NaiveDate::from_ymd_res(2020, 10, 12)?, + "Indigenous Peoples' Day", + ), + ], + &mut map, + Country::US_VA, + "United States (Virginia)", + ); + + 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, 1, 20)?, "Inauguration Day"), + ( + NaiveDate::from_ymd_res(2021, 10, 11)?, + "Indigenous Peoples' Day", + ), + ], + &mut map, + Country::US_VA, + "United States (Virginia)", + ); + + 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)?, + "Indigenous Peoples' Day", + ), + ], + &mut map, + Country::US_VA, + "United States (Virginia)", + ); + + 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)?, + "Indigenous Peoples' Day", + ), + ], + &mut map, + Country::US_VA, + "United States (Virginia)", + ); + + 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)?, + "Indigenous Peoples' Day", + ), + ], + &mut map, + Country::US_VA, + "United States (Virginia)", + ); + + 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)?, + "Inauguration Day; Martin Luther King Jr. Day", + ), + ( + NaiveDate::from_ymd_res(2025, 2, 17)?, + "Washington's Birthday", + ), + ( + NaiveDate::from_ymd_res(2025, 10, 13)?, + "Indigenous Peoples' Day", + ), + ], + &mut map, + Country::US_VA, + "United States (Virginia)", + ); + + 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)?, + "Indigenous Peoples' Day", + ), + ], + &mut map, + Country::US_VA, + "United States (Virginia)", + ); + + 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)?, + "Indigenous Peoples' Day", + ), + ], + &mut map, + Country::US_VA, + "United States (Virginia)", + ); + + 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)?, + "Indigenous Peoples' Day", + ), + ], + &mut map, + Country::US_VA, + "United States (Virginia)", + ); + + 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, 1, 20)?, "Inauguration Day"), + ( + NaiveDate::from_ymd_res(2029, 10, 8)?, + "Indigenous Peoples' Day", + ), + ], + &mut map, + Country::US_VA, + "United States (Virginia)", + ); + + 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)?, + "Indigenous Peoples' Day", + ), + ], + &mut map, + Country::US_VA, + "United States (Virginia)", + ); + + Ok(map) +} diff --git a/src/data/us_vi.rs b/src/data/us_vi.rs new file mode 100644 index 0000000..cbd8e16 --- /dev/null +++ b/src/data/us_vi.rs @@ -0,0 +1,1327 @@ +//! United States (Virgin Islands, U.S..) +use super::*; + +/// Generate holiday map for United States (Virgin Islands, U.S..). +#[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, 1, 6)?, "Three Kings Day"), + (NaiveDate::from_ymd_res(2000, 2, 21)?, "Presidents' Day"), + (NaiveDate::from_ymd_res(2000, 3, 31)?, "Transfer Day"), + (NaiveDate::from_ymd_res(2000, 4, 20)?, "Holy Thursday"), + (NaiveDate::from_ymd_res(2000, 4, 21)?, "Good Friday"), + (NaiveDate::from_ymd_res(2000, 4, 24)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2000, 7, 3)?, "Emancipation Day"), + ( + NaiveDate::from_ymd_res(2000, 10, 9)?, + "Columbus Day and Puerto Rico Friendship Day", + ), + (NaiveDate::from_ymd_res(2000, 11, 1)?, "Liberty Day"), + ( + NaiveDate::from_ymd_res(2000, 12, 26)?, + "Christmas Second Day", + ), + ], + &mut map, + Country::US_VI, + "United States (Virgin Islands, U.S..)", + ); + + 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, 1, 6)?, "Three Kings Day"), + (NaiveDate::from_ymd_res(2001, 2, 19)?, "Presidents' Day"), + (NaiveDate::from_ymd_res(2001, 3, 31)?, "Transfer Day"), + (NaiveDate::from_ymd_res(2001, 4, 12)?, "Holy Thursday"), + (NaiveDate::from_ymd_res(2001, 4, 13)?, "Good Friday"), + (NaiveDate::from_ymd_res(2001, 4, 16)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2001, 7, 3)?, "Emancipation Day"), + ( + NaiveDate::from_ymd_res(2001, 10, 8)?, + "Columbus Day and Puerto Rico Friendship Day", + ), + (NaiveDate::from_ymd_res(2001, 11, 1)?, "Liberty Day"), + ( + NaiveDate::from_ymd_res(2001, 12, 26)?, + "Christmas Second Day", + ), + ], + &mut map, + Country::US_VI, + "United States (Virgin Islands, U.S..)", + ); + + 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, 1, 6)?, "Three Kings Day"), + (NaiveDate::from_ymd_res(2002, 2, 18)?, "Presidents' Day"), + (NaiveDate::from_ymd_res(2002, 3, 31)?, "Transfer Day"), + (NaiveDate::from_ymd_res(2002, 3, 28)?, "Holy Thursday"), + (NaiveDate::from_ymd_res(2002, 3, 29)?, "Good Friday"), + (NaiveDate::from_ymd_res(2002, 4, 1)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2002, 7, 3)?, "Emancipation Day"), + ( + NaiveDate::from_ymd_res(2002, 10, 14)?, + "Columbus Day and Puerto Rico Friendship Day", + ), + (NaiveDate::from_ymd_res(2002, 11, 1)?, "Liberty Day"), + ( + NaiveDate::from_ymd_res(2002, 12, 26)?, + "Christmas Second Day", + ), + ], + &mut map, + Country::US_VI, + "United States (Virgin Islands, U.S..)", + ); + + 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, 1, 6)?, "Three Kings Day"), + (NaiveDate::from_ymd_res(2003, 2, 17)?, "Presidents' Day"), + (NaiveDate::from_ymd_res(2003, 3, 31)?, "Transfer Day"), + (NaiveDate::from_ymd_res(2003, 4, 17)?, "Holy Thursday"), + (NaiveDate::from_ymd_res(2003, 4, 18)?, "Good Friday"), + (NaiveDate::from_ymd_res(2003, 4, 21)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2003, 7, 3)?, "Emancipation Day"), + ( + NaiveDate::from_ymd_res(2003, 10, 13)?, + "Columbus Day and Puerto Rico Friendship Day", + ), + (NaiveDate::from_ymd_res(2003, 11, 1)?, "Liberty Day"), + ( + NaiveDate::from_ymd_res(2003, 12, 26)?, + "Christmas Second Day", + ), + ], + &mut map, + Country::US_VI, + "United States (Virgin Islands, U.S..)", + ); + + 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, 1, 6)?, "Three Kings Day"), + (NaiveDate::from_ymd_res(2004, 2, 16)?, "Presidents' Day"), + (NaiveDate::from_ymd_res(2004, 3, 31)?, "Transfer Day"), + (NaiveDate::from_ymd_res(2004, 4, 8)?, "Holy Thursday"), + (NaiveDate::from_ymd_res(2004, 4, 9)?, "Good Friday"), + (NaiveDate::from_ymd_res(2004, 4, 12)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2004, 7, 3)?, "Emancipation Day"), + ( + NaiveDate::from_ymd_res(2004, 10, 11)?, + "Columbus Day and Puerto Rico Friendship Day", + ), + (NaiveDate::from_ymd_res(2004, 11, 1)?, "Liberty Day"), + ( + NaiveDate::from_ymd_res(2004, 12, 26)?, + "Christmas Second Day", + ), + ], + &mut map, + Country::US_VI, + "United States (Virgin Islands, U.S..)", + ); + + 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); Christmas Second Day", + ), + ( + NaiveDate::from_ymd_res(2005, 1, 17)?, + "Martin Luther King Jr. Day", + ), + (NaiveDate::from_ymd_res(2005, 1, 6)?, "Three Kings Day"), + (NaiveDate::from_ymd_res(2005, 2, 21)?, "Presidents' Day"), + (NaiveDate::from_ymd_res(2005, 3, 31)?, "Transfer Day"), + (NaiveDate::from_ymd_res(2005, 3, 24)?, "Holy Thursday"), + (NaiveDate::from_ymd_res(2005, 3, 25)?, "Good Friday"), + (NaiveDate::from_ymd_res(2005, 3, 28)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2005, 7, 3)?, "Emancipation Day"), + ( + NaiveDate::from_ymd_res(2005, 10, 10)?, + "Columbus Day and Puerto Rico Friendship Day", + ), + (NaiveDate::from_ymd_res(2005, 11, 1)?, "Liberty Day"), + ], + &mut map, + Country::US_VI, + "United States (Virgin Islands, U.S..)", + ); + + 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, 1, 6)?, "Three Kings Day"), + (NaiveDate::from_ymd_res(2006, 2, 20)?, "Presidents' Day"), + (NaiveDate::from_ymd_res(2006, 3, 31)?, "Transfer Day"), + (NaiveDate::from_ymd_res(2006, 4, 13)?, "Holy Thursday"), + (NaiveDate::from_ymd_res(2006, 4, 14)?, "Good Friday"), + (NaiveDate::from_ymd_res(2006, 4, 17)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2006, 7, 3)?, "Emancipation Day"), + ( + NaiveDate::from_ymd_res(2006, 10, 9)?, + "Columbus Day and Puerto Rico Friendship Day", + ), + (NaiveDate::from_ymd_res(2006, 11, 1)?, "Liberty Day"), + ( + NaiveDate::from_ymd_res(2006, 12, 26)?, + "Christmas Second Day", + ), + ], + &mut map, + Country::US_VI, + "United States (Virgin Islands, U.S..)", + ); + + 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, 1, 6)?, "Three Kings Day"), + (NaiveDate::from_ymd_res(2007, 2, 19)?, "Presidents' Day"), + (NaiveDate::from_ymd_res(2007, 3, 31)?, "Transfer Day"), + (NaiveDate::from_ymd_res(2007, 4, 5)?, "Holy Thursday"), + (NaiveDate::from_ymd_res(2007, 4, 6)?, "Good Friday"), + (NaiveDate::from_ymd_res(2007, 4, 9)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2007, 7, 3)?, "Emancipation Day"), + ( + NaiveDate::from_ymd_res(2007, 10, 8)?, + "Columbus Day and Puerto Rico Friendship Day", + ), + (NaiveDate::from_ymd_res(2007, 11, 1)?, "Liberty Day"), + ( + NaiveDate::from_ymd_res(2007, 12, 26)?, + "Christmas Second Day", + ), + ], + &mut map, + Country::US_VI, + "United States (Virgin Islands, U.S..)", + ); + + 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, 1, 6)?, "Three Kings Day"), + (NaiveDate::from_ymd_res(2008, 2, 18)?, "Presidents' Day"), + (NaiveDate::from_ymd_res(2008, 3, 31)?, "Transfer Day"), + (NaiveDate::from_ymd_res(2008, 3, 20)?, "Holy Thursday"), + (NaiveDate::from_ymd_res(2008, 3, 21)?, "Good Friday"), + (NaiveDate::from_ymd_res(2008, 3, 24)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2008, 7, 3)?, "Emancipation Day"), + ( + NaiveDate::from_ymd_res(2008, 10, 13)?, + "Columbus Day and Puerto Rico Friendship Day", + ), + (NaiveDate::from_ymd_res(2008, 11, 1)?, "Liberty Day"), + ( + NaiveDate::from_ymd_res(2008, 12, 26)?, + "Christmas Second Day", + ), + ], + &mut map, + Country::US_VI, + "United States (Virgin Islands, U.S..)", + ); + + 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)?, + "Emancipation Day; 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, 1, 6)?, "Three Kings Day"), + (NaiveDate::from_ymd_res(2009, 2, 16)?, "Presidents' Day"), + (NaiveDate::from_ymd_res(2009, 3, 31)?, "Transfer Day"), + (NaiveDate::from_ymd_res(2009, 4, 9)?, "Holy Thursday"), + (NaiveDate::from_ymd_res(2009, 4, 10)?, "Good Friday"), + (NaiveDate::from_ymd_res(2009, 4, 13)?, "Easter Monday"), + ( + NaiveDate::from_ymd_res(2009, 10, 12)?, + "Columbus Day and Puerto Rico Friendship Day", + ), + (NaiveDate::from_ymd_res(2009, 11, 1)?, "Liberty Day"), + ( + NaiveDate::from_ymd_res(2009, 12, 26)?, + "Christmas Second Day", + ), + ], + &mut map, + Country::US_VI, + "United States (Virgin Islands, U.S..)", + ); + + 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, 1, 6)?, "Three Kings Day"), + (NaiveDate::from_ymd_res(2010, 2, 15)?, "Presidents' Day"), + (NaiveDate::from_ymd_res(2010, 3, 31)?, "Transfer Day"), + (NaiveDate::from_ymd_res(2010, 4, 1)?, "Holy Thursday"), + (NaiveDate::from_ymd_res(2010, 4, 2)?, "Good Friday"), + (NaiveDate::from_ymd_res(2010, 4, 5)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2010, 7, 3)?, "Emancipation Day"), + ( + NaiveDate::from_ymd_res(2010, 10, 11)?, + "Columbus Day and Puerto Rico Friendship Day", + ), + (NaiveDate::from_ymd_res(2010, 11, 1)?, "Liberty Day"), + ( + NaiveDate::from_ymd_res(2010, 12, 26)?, + "Christmas Second Day", + ), + ], + &mut map, + Country::US_VI, + "United States (Virgin Islands, U.S..)", + ); + + 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); Christmas Second Day", + ), + ( + NaiveDate::from_ymd_res(2011, 1, 17)?, + "Martin Luther King Jr. Day", + ), + (NaiveDate::from_ymd_res(2011, 1, 6)?, "Three Kings Day"), + (NaiveDate::from_ymd_res(2011, 2, 21)?, "Presidents' Day"), + (NaiveDate::from_ymd_res(2011, 3, 31)?, "Transfer Day"), + (NaiveDate::from_ymd_res(2011, 4, 21)?, "Holy Thursday"), + (NaiveDate::from_ymd_res(2011, 4, 22)?, "Good Friday"), + (NaiveDate::from_ymd_res(2011, 4, 25)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2011, 7, 3)?, "Emancipation Day"), + ( + NaiveDate::from_ymd_res(2011, 10, 10)?, + "Columbus Day and Puerto Rico Friendship Day", + ), + (NaiveDate::from_ymd_res(2011, 11, 1)?, "Liberty Day"), + ], + &mut map, + Country::US_VI, + "United States (Virgin Islands, U.S..)", + ); + + 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, 1, 6)?, "Three Kings Day"), + (NaiveDate::from_ymd_res(2012, 2, 20)?, "Presidents' Day"), + (NaiveDate::from_ymd_res(2012, 3, 31)?, "Transfer Day"), + (NaiveDate::from_ymd_res(2012, 4, 5)?, "Holy Thursday"), + (NaiveDate::from_ymd_res(2012, 4, 6)?, "Good Friday"), + (NaiveDate::from_ymd_res(2012, 4, 9)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2012, 7, 3)?, "Emancipation Day"), + ( + NaiveDate::from_ymd_res(2012, 10, 8)?, + "Columbus Day and Puerto Rico Friendship Day", + ), + (NaiveDate::from_ymd_res(2012, 11, 1)?, "Liberty Day"), + ( + NaiveDate::from_ymd_res(2012, 12, 26)?, + "Christmas Second Day", + ), + ], + &mut map, + Country::US_VI, + "United States (Virgin Islands, U.S..)", + ); + + 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, 1, 6)?, "Three Kings Day"), + (NaiveDate::from_ymd_res(2013, 2, 18)?, "Presidents' Day"), + (NaiveDate::from_ymd_res(2013, 3, 31)?, "Transfer Day"), + (NaiveDate::from_ymd_res(2013, 3, 28)?, "Holy Thursday"), + (NaiveDate::from_ymd_res(2013, 3, 29)?, "Good Friday"), + (NaiveDate::from_ymd_res(2013, 4, 1)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2013, 7, 3)?, "Emancipation Day"), + ( + NaiveDate::from_ymd_res(2013, 10, 14)?, + "Columbus Day and Puerto Rico Friendship Day", + ), + (NaiveDate::from_ymd_res(2013, 11, 1)?, "Liberty Day"), + ( + NaiveDate::from_ymd_res(2013, 12, 26)?, + "Christmas Second Day", + ), + ], + &mut map, + Country::US_VI, + "United States (Virgin Islands, U.S..)", + ); + + 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, 1, 6)?, "Three Kings Day"), + (NaiveDate::from_ymd_res(2014, 2, 17)?, "Presidents' Day"), + (NaiveDate::from_ymd_res(2014, 3, 31)?, "Transfer Day"), + (NaiveDate::from_ymd_res(2014, 4, 17)?, "Holy Thursday"), + (NaiveDate::from_ymd_res(2014, 4, 18)?, "Good Friday"), + (NaiveDate::from_ymd_res(2014, 4, 21)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2014, 7, 3)?, "Emancipation Day"), + ( + NaiveDate::from_ymd_res(2014, 10, 13)?, + "Columbus Day and Puerto Rico Friendship Day", + ), + (NaiveDate::from_ymd_res(2014, 11, 1)?, "Liberty Day"), + ( + NaiveDate::from_ymd_res(2014, 12, 26)?, + "Christmas Second Day", + ), + ], + &mut map, + Country::US_VI, + "United States (Virgin Islands, U.S..)", + ); + + 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)?, + "Emancipation Day; 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, 1, 6)?, "Three Kings Day"), + (NaiveDate::from_ymd_res(2015, 2, 16)?, "Presidents' Day"), + (NaiveDate::from_ymd_res(2015, 3, 31)?, "Transfer Day"), + (NaiveDate::from_ymd_res(2015, 4, 2)?, "Holy Thursday"), + (NaiveDate::from_ymd_res(2015, 4, 3)?, "Good Friday"), + (NaiveDate::from_ymd_res(2015, 4, 6)?, "Easter Monday"), + ( + NaiveDate::from_ymd_res(2015, 10, 12)?, + "Columbus Day and Puerto Rico Friendship Day", + ), + (NaiveDate::from_ymd_res(2015, 11, 1)?, "Liberty Day"), + ( + NaiveDate::from_ymd_res(2015, 12, 26)?, + "Christmas Second Day", + ), + ], + &mut map, + Country::US_VI, + "United States (Virgin Islands, U.S..)", + ); + + 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); Christmas Second Day", + ), + ( + NaiveDate::from_ymd_res(2016, 1, 18)?, + "Martin Luther King Jr. Day", + ), + (NaiveDate::from_ymd_res(2016, 1, 6)?, "Three Kings Day"), + (NaiveDate::from_ymd_res(2016, 2, 15)?, "Presidents' Day"), + (NaiveDate::from_ymd_res(2016, 3, 31)?, "Transfer Day"), + (NaiveDate::from_ymd_res(2016, 3, 24)?, "Holy Thursday"), + (NaiveDate::from_ymd_res(2016, 3, 25)?, "Good Friday"), + (NaiveDate::from_ymd_res(2016, 3, 28)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2016, 7, 3)?, "Emancipation Day"), + ( + NaiveDate::from_ymd_res(2016, 10, 10)?, + "Columbus Day and Puerto Rico Friendship Day", + ), + (NaiveDate::from_ymd_res(2016, 11, 1)?, "Liberty Day"), + ], + &mut map, + Country::US_VI, + "United States (Virgin Islands, U.S..)", + ); + + 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, 1, 6)?, "Three Kings Day"), + (NaiveDate::from_ymd_res(2017, 2, 20)?, "Presidents' Day"), + (NaiveDate::from_ymd_res(2017, 3, 31)?, "Transfer Day"), + (NaiveDate::from_ymd_res(2017, 4, 13)?, "Holy Thursday"), + (NaiveDate::from_ymd_res(2017, 4, 14)?, "Good Friday"), + (NaiveDate::from_ymd_res(2017, 4, 17)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2017, 7, 3)?, "Emancipation Day"), + ( + NaiveDate::from_ymd_res(2017, 10, 9)?, + "Columbus Day and Puerto Rico Friendship Day", + ), + (NaiveDate::from_ymd_res(2017, 11, 1)?, "Liberty Day"), + ( + NaiveDate::from_ymd_res(2017, 12, 26)?, + "Christmas Second Day", + ), + ], + &mut map, + Country::US_VI, + "United States (Virgin Islands, U.S..)", + ); + + 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, 1, 6)?, "Three Kings Day"), + (NaiveDate::from_ymd_res(2018, 2, 19)?, "Presidents' Day"), + (NaiveDate::from_ymd_res(2018, 3, 31)?, "Transfer Day"), + (NaiveDate::from_ymd_res(2018, 3, 29)?, "Holy Thursday"), + (NaiveDate::from_ymd_res(2018, 3, 30)?, "Good Friday"), + (NaiveDate::from_ymd_res(2018, 4, 2)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2018, 7, 3)?, "Emancipation Day"), + ( + NaiveDate::from_ymd_res(2018, 10, 8)?, + "Columbus Day and Puerto Rico Friendship Day", + ), + (NaiveDate::from_ymd_res(2018, 11, 1)?, "Liberty Day"), + ( + NaiveDate::from_ymd_res(2018, 12, 26)?, + "Christmas Second Day", + ), + ], + &mut map, + Country::US_VI, + "United States (Virgin Islands, U.S..)", + ); + + 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, 1, 6)?, "Three Kings Day"), + (NaiveDate::from_ymd_res(2019, 2, 18)?, "Presidents' Day"), + (NaiveDate::from_ymd_res(2019, 3, 31)?, "Transfer Day"), + (NaiveDate::from_ymd_res(2019, 4, 18)?, "Holy Thursday"), + (NaiveDate::from_ymd_res(2019, 4, 19)?, "Good Friday"), + (NaiveDate::from_ymd_res(2019, 4, 22)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2019, 7, 3)?, "Emancipation Day"), + ( + NaiveDate::from_ymd_res(2019, 10, 14)?, + "Columbus Day and Puerto Rico Friendship Day", + ), + (NaiveDate::from_ymd_res(2019, 11, 1)?, "Liberty Day"), + ( + NaiveDate::from_ymd_res(2019, 12, 26)?, + "Christmas Second Day", + ), + ], + &mut map, + Country::US_VI, + "United States (Virgin Islands, U.S..)", + ); + + 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)?, + "Emancipation Day; 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, 1, 6)?, "Three Kings Day"), + (NaiveDate::from_ymd_res(2020, 2, 17)?, "Presidents' Day"), + (NaiveDate::from_ymd_res(2020, 3, 31)?, "Transfer Day"), + (NaiveDate::from_ymd_res(2020, 4, 9)?, "Holy Thursday"), + (NaiveDate::from_ymd_res(2020, 4, 10)?, "Good Friday"), + (NaiveDate::from_ymd_res(2020, 4, 13)?, "Easter Monday"), + ( + NaiveDate::from_ymd_res(2020, 10, 12)?, + "Columbus Day and Puerto Rico Friendship Day", + ), + (NaiveDate::from_ymd_res(2020, 11, 1)?, "Liberty Day"), + ( + NaiveDate::from_ymd_res(2020, 12, 26)?, + "Christmas Second Day", + ), + ], + &mut map, + Country::US_VI, + "United States (Virgin Islands, U.S..)", + ); + + 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, 1, 6)?, "Three Kings Day"), + (NaiveDate::from_ymd_res(2021, 2, 15)?, "Presidents' Day"), + (NaiveDate::from_ymd_res(2021, 3, 31)?, "Transfer Day"), + (NaiveDate::from_ymd_res(2021, 4, 1)?, "Holy Thursday"), + (NaiveDate::from_ymd_res(2021, 4, 2)?, "Good Friday"), + (NaiveDate::from_ymd_res(2021, 4, 5)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2021, 7, 3)?, "Emancipation Day"), + ( + NaiveDate::from_ymd_res(2021, 10, 11)?, + "Columbus Day and Puerto Rico Friendship Day", + ), + (NaiveDate::from_ymd_res(2021, 11, 1)?, "Liberty Day"), + ( + NaiveDate::from_ymd_res(2021, 12, 26)?, + "Christmas Second Day", + ), + ], + &mut map, + Country::US_VI, + "United States (Virgin Islands, U.S..)", + ); + + 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); Christmas Second Day", + ), + ( + NaiveDate::from_ymd_res(2022, 1, 17)?, + "Martin Luther King Jr. Day", + ), + (NaiveDate::from_ymd_res(2022, 1, 6)?, "Three Kings Day"), + (NaiveDate::from_ymd_res(2022, 2, 21)?, "Presidents' Day"), + (NaiveDate::from_ymd_res(2022, 3, 31)?, "Transfer Day"), + (NaiveDate::from_ymd_res(2022, 4, 14)?, "Holy Thursday"), + (NaiveDate::from_ymd_res(2022, 4, 15)?, "Good Friday"), + (NaiveDate::from_ymd_res(2022, 4, 18)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2022, 7, 3)?, "Emancipation Day"), + ( + NaiveDate::from_ymd_res(2022, 10, 10)?, + "Columbus Day and Puerto Rico Friendship Day", + ), + (NaiveDate::from_ymd_res(2022, 11, 1)?, "Liberty Day"), + ], + &mut map, + Country::US_VI, + "United States (Virgin Islands, U.S..)", + ); + + 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, 1, 6)?, "Three Kings Day"), + (NaiveDate::from_ymd_res(2023, 2, 20)?, "Presidents' Day"), + (NaiveDate::from_ymd_res(2023, 3, 31)?, "Transfer Day"), + (NaiveDate::from_ymd_res(2023, 4, 6)?, "Holy Thursday"), + (NaiveDate::from_ymd_res(2023, 4, 7)?, "Good Friday"), + (NaiveDate::from_ymd_res(2023, 4, 10)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2023, 7, 3)?, "Emancipation Day"), + ( + NaiveDate::from_ymd_res(2023, 10, 9)?, + "Columbus Day and Puerto Rico Friendship Day", + ), + (NaiveDate::from_ymd_res(2023, 11, 1)?, "Liberty Day"), + ( + NaiveDate::from_ymd_res(2023, 12, 26)?, + "Christmas Second Day", + ), + ], + &mut map, + Country::US_VI, + "United States (Virgin Islands, U.S..)", + ); + + 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, 1, 6)?, "Three Kings Day"), + (NaiveDate::from_ymd_res(2024, 2, 19)?, "Presidents' Day"), + (NaiveDate::from_ymd_res(2024, 3, 31)?, "Transfer Day"), + (NaiveDate::from_ymd_res(2024, 3, 28)?, "Holy Thursday"), + (NaiveDate::from_ymd_res(2024, 3, 29)?, "Good Friday"), + (NaiveDate::from_ymd_res(2024, 4, 1)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2024, 7, 3)?, "Emancipation Day"), + ( + NaiveDate::from_ymd_res(2024, 10, 14)?, + "Columbus Day and Puerto Rico Friendship Day", + ), + (NaiveDate::from_ymd_res(2024, 11, 1)?, "Liberty Day"), + ( + NaiveDate::from_ymd_res(2024, 12, 26)?, + "Christmas Second Day", + ), + ], + &mut map, + Country::US_VI, + "United States (Virgin Islands, U.S..)", + ); + + 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, 1, 6)?, "Three Kings Day"), + (NaiveDate::from_ymd_res(2025, 2, 17)?, "Presidents' Day"), + (NaiveDate::from_ymd_res(2025, 3, 31)?, "Transfer Day"), + (NaiveDate::from_ymd_res(2025, 4, 17)?, "Holy Thursday"), + (NaiveDate::from_ymd_res(2025, 4, 18)?, "Good Friday"), + (NaiveDate::from_ymd_res(2025, 4, 21)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2025, 7, 3)?, "Emancipation Day"), + ( + NaiveDate::from_ymd_res(2025, 10, 13)?, + "Columbus Day and Puerto Rico Friendship Day", + ), + (NaiveDate::from_ymd_res(2025, 11, 1)?, "Liberty Day"), + ( + NaiveDate::from_ymd_res(2025, 12, 26)?, + "Christmas Second Day", + ), + ], + &mut map, + Country::US_VI, + "United States (Virgin Islands, U.S..)", + ); + + 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)?, + "Emancipation Day; 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, 1, 6)?, "Three Kings Day"), + (NaiveDate::from_ymd_res(2026, 2, 16)?, "Presidents' Day"), + (NaiveDate::from_ymd_res(2026, 3, 31)?, "Transfer Day"), + (NaiveDate::from_ymd_res(2026, 4, 2)?, "Holy Thursday"), + (NaiveDate::from_ymd_res(2026, 4, 3)?, "Good Friday"), + (NaiveDate::from_ymd_res(2026, 4, 6)?, "Easter Monday"), + ( + NaiveDate::from_ymd_res(2026, 10, 12)?, + "Columbus Day and Puerto Rico Friendship Day", + ), + (NaiveDate::from_ymd_res(2026, 11, 1)?, "Liberty Day"), + ( + NaiveDate::from_ymd_res(2026, 12, 26)?, + "Christmas Second Day", + ), + ], + &mut map, + Country::US_VI, + "United States (Virgin Islands, U.S..)", + ); + + 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, 1, 6)?, "Three Kings Day"), + (NaiveDate::from_ymd_res(2027, 2, 15)?, "Presidents' Day"), + (NaiveDate::from_ymd_res(2027, 3, 31)?, "Transfer Day"), + (NaiveDate::from_ymd_res(2027, 3, 25)?, "Holy Thursday"), + (NaiveDate::from_ymd_res(2027, 3, 26)?, "Good Friday"), + (NaiveDate::from_ymd_res(2027, 3, 29)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2027, 7, 3)?, "Emancipation Day"), + ( + NaiveDate::from_ymd_res(2027, 10, 11)?, + "Columbus Day and Puerto Rico Friendship Day", + ), + (NaiveDate::from_ymd_res(2027, 11, 1)?, "Liberty Day"), + ( + NaiveDate::from_ymd_res(2027, 12, 26)?, + "Christmas Second Day", + ), + ], + &mut map, + Country::US_VI, + "United States (Virgin Islands, U.S..)", + ); + + 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, 1, 6)?, "Three Kings Day"), + (NaiveDate::from_ymd_res(2028, 2, 21)?, "Presidents' Day"), + (NaiveDate::from_ymd_res(2028, 3, 31)?, "Transfer Day"), + (NaiveDate::from_ymd_res(2028, 4, 13)?, "Holy Thursday"), + (NaiveDate::from_ymd_res(2028, 4, 14)?, "Good Friday"), + (NaiveDate::from_ymd_res(2028, 4, 17)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2028, 7, 3)?, "Emancipation Day"), + ( + NaiveDate::from_ymd_res(2028, 10, 9)?, + "Columbus Day and Puerto Rico Friendship Day", + ), + (NaiveDate::from_ymd_res(2028, 11, 1)?, "Liberty Day"), + ( + NaiveDate::from_ymd_res(2028, 12, 26)?, + "Christmas Second Day", + ), + ], + &mut map, + Country::US_VI, + "United States (Virgin Islands, U.S..)", + ); + + 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, 1, 6)?, "Three Kings Day"), + (NaiveDate::from_ymd_res(2029, 2, 19)?, "Presidents' Day"), + (NaiveDate::from_ymd_res(2029, 3, 31)?, "Transfer Day"), + (NaiveDate::from_ymd_res(2029, 3, 29)?, "Holy Thursday"), + (NaiveDate::from_ymd_res(2029, 3, 30)?, "Good Friday"), + (NaiveDate::from_ymd_res(2029, 4, 2)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2029, 7, 3)?, "Emancipation Day"), + ( + NaiveDate::from_ymd_res(2029, 10, 8)?, + "Columbus Day and Puerto Rico Friendship Day", + ), + (NaiveDate::from_ymd_res(2029, 11, 1)?, "Liberty Day"), + ( + NaiveDate::from_ymd_res(2029, 12, 26)?, + "Christmas Second Day", + ), + ], + &mut map, + Country::US_VI, + "United States (Virgin Islands, U.S..)", + ); + + 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, 1, 6)?, "Three Kings Day"), + (NaiveDate::from_ymd_res(2030, 2, 18)?, "Presidents' Day"), + (NaiveDate::from_ymd_res(2030, 3, 31)?, "Transfer Day"), + (NaiveDate::from_ymd_res(2030, 4, 18)?, "Holy Thursday"), + (NaiveDate::from_ymd_res(2030, 4, 19)?, "Good Friday"), + (NaiveDate::from_ymd_res(2030, 4, 22)?, "Easter Monday"), + (NaiveDate::from_ymd_res(2030, 7, 3)?, "Emancipation Day"), + ( + NaiveDate::from_ymd_res(2030, 10, 14)?, + "Columbus Day and Puerto Rico Friendship Day", + ), + (NaiveDate::from_ymd_res(2030, 11, 1)?, "Liberty Day"), + ( + NaiveDate::from_ymd_res(2030, 12, 26)?, + "Christmas Second Day", + ), + ], + &mut map, + Country::US_VI, + "United States (Virgin Islands, U.S..)", + ); + + Ok(map) +} diff --git a/src/data/us_vt.rs b/src/data/us_vt.rs new file mode 100644 index 0000000..e50148d --- /dev/null +++ b/src/data/us_vt.rs @@ -0,0 +1,1162 @@ +//! United States (Vermont) +use super::*; + +/// Generate holiday map for United States (Vermont). +#[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, 3, 7)?, "Town Meeting Day"), + ( + NaiveDate::from_ymd_res(2000, 8, 16)?, + "Bennington Battle Day", + ), + ], + &mut map, + Country::US_VT, + "United States (Vermont)", + ); + + 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, 3, 6)?, "Town Meeting Day"), + ( + NaiveDate::from_ymd_res(2001, 8, 16)?, + "Bennington Battle Day", + ), + ], + &mut map, + Country::US_VT, + "United States (Vermont)", + ); + + 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, 3, 5)?, "Town Meeting Day"), + ( + NaiveDate::from_ymd_res(2002, 8, 16)?, + "Bennington Battle Day", + ), + ], + &mut map, + Country::US_VT, + "United States (Vermont)", + ); + + 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, 3, 4)?, "Town Meeting Day"), + ( + NaiveDate::from_ymd_res(2003, 8, 16)?, + "Bennington Battle Day", + ), + ( + NaiveDate::from_ymd_res(2003, 8, 15)?, + "Bennington Battle Day (observed)", + ), + ], + &mut map, + Country::US_VT, + "United States (Vermont)", + ); + + 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, 3, 2)?, "Town Meeting Day"), + ( + NaiveDate::from_ymd_res(2004, 8, 16)?, + "Bennington Battle Day", + ), + ], + &mut map, + Country::US_VT, + "United States (Vermont)", + ); + + 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, 3, 1)?, "Town Meeting Day"), + ( + NaiveDate::from_ymd_res(2005, 8, 16)?, + "Bennington Battle Day", + ), + ], + &mut map, + Country::US_VT, + "United States (Vermont)", + ); + + 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, 3, 7)?, "Town Meeting Day"), + ( + NaiveDate::from_ymd_res(2006, 8, 16)?, + "Bennington Battle Day", + ), + ], + &mut map, + Country::US_VT, + "United States (Vermont)", + ); + + 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, 3, 6)?, "Town Meeting Day"), + ( + NaiveDate::from_ymd_res(2007, 8, 16)?, + "Bennington Battle Day", + ), + ], + &mut map, + Country::US_VT, + "United States (Vermont)", + ); + + 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, 3, 4)?, "Town Meeting Day"), + ( + NaiveDate::from_ymd_res(2008, 8, 16)?, + "Bennington Battle Day", + ), + ( + NaiveDate::from_ymd_res(2008, 8, 15)?, + "Bennington Battle Day (observed)", + ), + ], + &mut map, + Country::US_VT, + "United States (Vermont)", + ); + + 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, 3, 3)?, "Town Meeting Day"), + ( + NaiveDate::from_ymd_res(2009, 8, 16)?, + "Bennington Battle Day", + ), + ( + NaiveDate::from_ymd_res(2009, 8, 17)?, + "Bennington Battle Day (observed)", + ), + ], + &mut map, + Country::US_VT, + "United States (Vermont)", + ); + + 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, 3, 2)?, "Town Meeting Day"), + ( + NaiveDate::from_ymd_res(2010, 8, 16)?, + "Bennington Battle Day", + ), + ], + &mut map, + Country::US_VT, + "United States (Vermont)", + ); + + 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, 3, 1)?, "Town Meeting Day"), + ( + NaiveDate::from_ymd_res(2011, 8, 16)?, + "Bennington Battle Day", + ), + ], + &mut map, + Country::US_VT, + "United States (Vermont)", + ); + + 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, 3, 6)?, "Town Meeting Day"), + ( + NaiveDate::from_ymd_res(2012, 8, 16)?, + "Bennington Battle Day", + ), + ], + &mut map, + Country::US_VT, + "United States (Vermont)", + ); + + 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, 3, 5)?, "Town Meeting Day"), + ( + NaiveDate::from_ymd_res(2013, 8, 16)?, + "Bennington Battle Day", + ), + ], + &mut map, + Country::US_VT, + "United States (Vermont)", + ); + + 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, 3, 4)?, "Town Meeting Day"), + ( + NaiveDate::from_ymd_res(2014, 8, 16)?, + "Bennington Battle Day", + ), + ( + NaiveDate::from_ymd_res(2014, 8, 15)?, + "Bennington Battle Day (observed)", + ), + ], + &mut map, + Country::US_VT, + "United States (Vermont)", + ); + + 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, 3, 3)?, "Town Meeting Day"), + ( + NaiveDate::from_ymd_res(2015, 8, 16)?, + "Bennington Battle Day", + ), + ( + NaiveDate::from_ymd_res(2015, 8, 17)?, + "Bennington Battle Day (observed)", + ), + ], + &mut map, + Country::US_VT, + "United States (Vermont)", + ); + + 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, 3, 1)?, "Town Meeting Day"), + ( + NaiveDate::from_ymd_res(2016, 8, 16)?, + "Bennington Battle Day", + ), + ], + &mut map, + Country::US_VT, + "United States (Vermont)", + ); + + 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, 3, 7)?, "Town Meeting Day"), + ( + NaiveDate::from_ymd_res(2017, 8, 16)?, + "Bennington Battle Day", + ), + ], + &mut map, + Country::US_VT, + "United States (Vermont)", + ); + + 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, 3, 6)?, "Town Meeting Day"), + ( + NaiveDate::from_ymd_res(2018, 8, 16)?, + "Bennington Battle Day", + ), + ], + &mut map, + Country::US_VT, + "United States (Vermont)", + ); + + 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, 3, 5)?, "Town Meeting Day"), + ( + NaiveDate::from_ymd_res(2019, 8, 16)?, + "Bennington Battle Day", + ), + ], + &mut map, + Country::US_VT, + "United States (Vermont)", + ); + + 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, 3, 3)?, "Town Meeting Day"), + ( + NaiveDate::from_ymd_res(2020, 8, 16)?, + "Bennington Battle Day", + ), + ( + NaiveDate::from_ymd_res(2020, 8, 17)?, + "Bennington Battle Day (observed)", + ), + ], + &mut map, + Country::US_VT, + "United States (Vermont)", + ); + + 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, 3, 2)?, "Town Meeting Day"), + ( + NaiveDate::from_ymd_res(2021, 8, 16)?, + "Bennington Battle Day", + ), + ], + &mut map, + Country::US_VT, + "United States (Vermont)", + ); + + 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, 3, 1)?, "Town Meeting Day"), + ( + NaiveDate::from_ymd_res(2022, 8, 16)?, + "Bennington Battle Day", + ), + ], + &mut map, + Country::US_VT, + "United States (Vermont)", + ); + + 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, 3, 7)?, "Town Meeting Day"), + ( + NaiveDate::from_ymd_res(2023, 8, 16)?, + "Bennington Battle Day", + ), + ], + &mut map, + Country::US_VT, + "United States (Vermont)", + ); + + 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, 3, 5)?, "Town Meeting Day"), + ( + NaiveDate::from_ymd_res(2024, 8, 16)?, + "Bennington Battle Day", + ), + ], + &mut map, + Country::US_VT, + "United States (Vermont)", + ); + + 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, 3, 4)?, "Town Meeting Day"), + ( + NaiveDate::from_ymd_res(2025, 8, 16)?, + "Bennington Battle Day", + ), + ( + NaiveDate::from_ymd_res(2025, 8, 15)?, + "Bennington Battle Day (observed)", + ), + ], + &mut map, + Country::US_VT, + "United States (Vermont)", + ); + + 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, 3, 3)?, "Town Meeting Day"), + ( + NaiveDate::from_ymd_res(2026, 8, 16)?, + "Bennington Battle Day", + ), + ( + NaiveDate::from_ymd_res(2026, 8, 17)?, + "Bennington Battle Day (observed)", + ), + ], + &mut map, + Country::US_VT, + "United States (Vermont)", + ); + + 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, 3, 2)?, "Town Meeting Day"), + ( + NaiveDate::from_ymd_res(2027, 8, 16)?, + "Bennington Battle Day", + ), + ], + &mut map, + Country::US_VT, + "United States (Vermont)", + ); + + 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, 3, 7)?, "Town Meeting Day"), + ( + NaiveDate::from_ymd_res(2028, 8, 16)?, + "Bennington Battle Day", + ), + ], + &mut map, + Country::US_VT, + "United States (Vermont)", + ); + + 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, 3, 6)?, "Town Meeting Day"), + ( + NaiveDate::from_ymd_res(2029, 8, 16)?, + "Bennington Battle Day", + ), + ], + &mut map, + Country::US_VT, + "United States (Vermont)", + ); + + 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, 3, 5)?, "Town Meeting Day"), + ( + NaiveDate::from_ymd_res(2030, 8, 16)?, + "Bennington Battle Day", + ), + ], + &mut map, + Country::US_VT, + "United States (Vermont)", + ); + + Ok(map) +} diff --git a/src/data/us_wa.rs b/src/data/us_wa.rs new file mode 100644 index 0000000..68258cb --- /dev/null +++ b/src/data/us_wa.rs @@ -0,0 +1,975 @@ +//! United States (Washington) +use super::*; + +/// Generate holiday map for United States (Washington). +#[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", + ), + ], + &mut map, + Country::US_WA, + "United States (Washington)", + ); + + 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", + ), + ], + &mut map, + Country::US_WA, + "United States (Washington)", + ); + + 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", + ), + ], + &mut map, + Country::US_WA, + "United States (Washington)", + ); + + 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", + ), + ], + &mut map, + Country::US_WA, + "United States (Washington)", + ); + + 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", + ), + ], + &mut map, + Country::US_WA, + "United States (Washington)", + ); + + 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", + ), + ], + &mut map, + Country::US_WA, + "United States (Washington)", + ); + + 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", + ), + ], + &mut map, + Country::US_WA, + "United States (Washington)", + ); + + 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", + ), + ], + &mut map, + Country::US_WA, + "United States (Washington)", + ); + + 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", + ), + ], + &mut map, + Country::US_WA, + "United States (Washington)", + ); + + 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", + ), + ], + &mut map, + Country::US_WA, + "United States (Washington)", + ); + + 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", + ), + ], + &mut map, + Country::US_WA, + "United States (Washington)", + ); + + 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", + ), + ], + &mut map, + Country::US_WA, + "United States (Washington)", + ); + + 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", + ), + ], + &mut map, + Country::US_WA, + "United States (Washington)", + ); + + 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", + ), + ], + &mut map, + Country::US_WA, + "United States (Washington)", + ); + + 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", + ), + ], + &mut map, + Country::US_WA, + "United States (Washington)", + ); + + 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", + ), + ], + &mut map, + Country::US_WA, + "United States (Washington)", + ); + + 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", + ), + ], + &mut map, + Country::US_WA, + "United States (Washington)", + ); + + 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", + ), + ], + &mut map, + Country::US_WA, + "United States (Washington)", + ); + + 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", + ), + ], + &mut map, + Country::US_WA, + "United States (Washington)", + ); + + 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", + ), + ], + &mut map, + Country::US_WA, + "United States (Washington)", + ); + + 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", + ), + ], + &mut map, + Country::US_WA, + "United States (Washington)", + ); + + 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", + ), + ], + &mut map, + Country::US_WA, + "United States (Washington)", + ); + + 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", + ), + ], + &mut map, + Country::US_WA, + "United States (Washington)", + ); + + 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", + ), + ], + &mut map, + Country::US_WA, + "United States (Washington)", + ); + + 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", + ), + ], + &mut map, + Country::US_WA, + "United States (Washington)", + ); + + 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", + ), + ], + &mut map, + Country::US_WA, + "United States (Washington)", + ); + + 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", + ), + ], + &mut map, + Country::US_WA, + "United States (Washington)", + ); + + 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", + ), + ], + &mut map, + Country::US_WA, + "United States (Washington)", + ); + + 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", + ), + ], + &mut map, + Country::US_WA, + "United States (Washington)", + ); + + 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", + ), + ], + &mut map, + Country::US_WA, + "United States (Washington)", + ); + + 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", + ), + ], + &mut map, + Country::US_WA, + "United States (Washington)", + ); + + Ok(map) +} diff --git a/src/data/us_wi.rs b/src/data/us_wi.rs new file mode 100644 index 0000000..5b7bbdd --- /dev/null +++ b/src/data/us_wi.rs @@ -0,0 +1,1153 @@ +//! United States (Wisconsin) +use super::*; + +/// Generate holiday map for United States (Wisconsin). +#[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, 2, 15)?, + "Susan B. Anthony Day", + ), + ], + &mut map, + Country::US_WI, + "United States (Wisconsin)", + ); + + 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, 2, 15)?, + "Susan B. Anthony Day", + ), + ], + &mut map, + Country::US_WI, + "United States (Wisconsin)", + ); + + 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, 2, 15)?, + "Susan B. Anthony Day", + ), + ], + &mut map, + Country::US_WI, + "United States (Wisconsin)", + ); + + 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, 2, 15)?, + "Susan B. Anthony Day", + ), + ], + &mut map, + Country::US_WI, + "United States (Wisconsin)", + ); + + 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, 2, 15)?, + "Susan B. Anthony Day", + ), + ], + &mut map, + Country::US_WI, + "United States (Wisconsin)", + ); + + 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, 2, 15)?, + "Susan B. Anthony Day", + ), + ], + &mut map, + Country::US_WI, + "United States (Wisconsin)", + ); + + 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, 2, 15)?, + "Susan B. Anthony Day", + ), + ], + &mut map, + Country::US_WI, + "United States (Wisconsin)", + ); + + 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, 2, 15)?, + "Susan B. Anthony Day", + ), + ], + &mut map, + Country::US_WI, + "United States (Wisconsin)", + ); + + 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, 2, 15)?, + "Susan B. Anthony Day", + ), + ], + &mut map, + Country::US_WI, + "United States (Wisconsin)", + ); + + 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, 2, 15)?, + "Susan B. Anthony Day", + ), + ], + &mut map, + Country::US_WI, + "United States (Wisconsin)", + ); + + 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)?, + "Susan B. Anthony Day; Washington's Birthday", + ), + ], + &mut map, + Country::US_WI, + "United States (Wisconsin)", + ); + + 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, 2, 15)?, + "Susan B. Anthony Day", + ), + ], + &mut map, + Country::US_WI, + "United States (Wisconsin)", + ); + + 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, 2, 15)?, + "Susan B. Anthony Day", + ), + (NaiveDate::from_ymd_res(2012, 12, 24)?, "Christmas Eve"), + (NaiveDate::from_ymd_res(2012, 12, 31)?, "New Year's Eve"), + ], + &mut map, + Country::US_WI, + "United States (Wisconsin)", + ); + + 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, 2, 15)?, + "Susan B. Anthony Day", + ), + (NaiveDate::from_ymd_res(2013, 12, 24)?, "Christmas Eve"), + (NaiveDate::from_ymd_res(2013, 12, 31)?, "New Year's Eve"), + ], + &mut map, + Country::US_WI, + "United States (Wisconsin)", + ); + + 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, 2, 15)?, + "Susan B. Anthony Day", + ), + (NaiveDate::from_ymd_res(2014, 12, 24)?, "Christmas Eve"), + (NaiveDate::from_ymd_res(2014, 12, 31)?, "New Year's Eve"), + ], + &mut map, + Country::US_WI, + "United States (Wisconsin)", + ); + + 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, 2, 15)?, + "Susan B. Anthony Day", + ), + (NaiveDate::from_ymd_res(2015, 12, 24)?, "Christmas Eve"), + (NaiveDate::from_ymd_res(2015, 12, 31)?, "New Year's Eve"), + ], + &mut map, + Country::US_WI, + "United States (Wisconsin)", + ); + + 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)?, + "Susan B. Anthony Day; Washington's Birthday", + ), + (NaiveDate::from_ymd_res(2016, 12, 24)?, "Christmas Eve"), + ( + NaiveDate::from_ymd_res(2016, 12, 23)?, + "Christmas Eve (observed)", + ), + (NaiveDate::from_ymd_res(2016, 12, 31)?, "New Year's Eve"), + ( + NaiveDate::from_ymd_res(2016, 12, 30)?, + "New Year's Eve (observed)", + ), + ], + &mut map, + Country::US_WI, + "United States (Wisconsin)", + ); + + 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, 2, 15)?, + "Susan B. Anthony Day", + ), + (NaiveDate::from_ymd_res(2017, 12, 24)?, "Christmas Eve"), + ( + NaiveDate::from_ymd_res(2017, 12, 22)?, + "Christmas Eve (observed)", + ), + (NaiveDate::from_ymd_res(2017, 12, 31)?, "New Year's Eve"), + ], + &mut map, + Country::US_WI, + "United States (Wisconsin)", + ); + + 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, 2, 15)?, + "Susan B. Anthony Day", + ), + (NaiveDate::from_ymd_res(2018, 12, 24)?, "Christmas Eve"), + (NaiveDate::from_ymd_res(2018, 12, 31)?, "New Year's Eve"), + ], + &mut map, + Country::US_WI, + "United States (Wisconsin)", + ); + + 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, 2, 15)?, + "Susan B. Anthony Day", + ), + (NaiveDate::from_ymd_res(2019, 12, 24)?, "Christmas Eve"), + (NaiveDate::from_ymd_res(2019, 12, 31)?, "New Year's Eve"), + ], + &mut map, + Country::US_WI, + "United States (Wisconsin)", + ); + + 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, 2, 15)?, + "Susan B. Anthony Day", + ), + (NaiveDate::from_ymd_res(2020, 12, 24)?, "Christmas Eve"), + (NaiveDate::from_ymd_res(2020, 12, 31)?, "New Year's Eve"), + ], + &mut map, + Country::US_WI, + "United States (Wisconsin)", + ); + + 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); New Year's Eve", + ), + (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); Christmas Eve", + ), + ( + NaiveDate::from_ymd_res(2021, 1, 18)?, + "Martin Luther King Jr. Day", + ), + ( + NaiveDate::from_ymd_res(2021, 2, 15)?, + "Susan B. Anthony Day; Washington's Birthday", + ), + ( + NaiveDate::from_ymd_res(2021, 12, 23)?, + "Christmas Eve (observed)", + ), + ], + &mut map, + Country::US_WI, + "United States (Wisconsin)", + ); + + 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, 2, 15)?, + "Susan B. Anthony Day", + ), + (NaiveDate::from_ymd_res(2022, 12, 24)?, "Christmas Eve"), + ( + NaiveDate::from_ymd_res(2022, 12, 23)?, + "Christmas Eve (observed)", + ), + (NaiveDate::from_ymd_res(2022, 12, 31)?, "New Year's Eve"), + ( + NaiveDate::from_ymd_res(2022, 12, 30)?, + "New Year's Eve (observed)", + ), + ], + &mut map, + Country::US_WI, + "United States (Wisconsin)", + ); + + 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, 2, 15)?, + "Susan B. Anthony Day", + ), + (NaiveDate::from_ymd_res(2023, 12, 24)?, "Christmas Eve"), + ( + NaiveDate::from_ymd_res(2023, 12, 22)?, + "Christmas Eve (observed)", + ), + (NaiveDate::from_ymd_res(2023, 12, 31)?, "New Year's Eve"), + ], + &mut map, + Country::US_WI, + "United States (Wisconsin)", + ); + + 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, 2, 15)?, + "Susan B. Anthony Day", + ), + (NaiveDate::from_ymd_res(2024, 12, 24)?, "Christmas Eve"), + (NaiveDate::from_ymd_res(2024, 12, 31)?, "New Year's Eve"), + ], + &mut map, + Country::US_WI, + "United States (Wisconsin)", + ); + + 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, 2, 15)?, + "Susan B. Anthony Day", + ), + (NaiveDate::from_ymd_res(2025, 12, 24)?, "Christmas Eve"), + (NaiveDate::from_ymd_res(2025, 12, 31)?, "New Year's Eve"), + ], + &mut map, + Country::US_WI, + "United States (Wisconsin)", + ); + + 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, 2, 15)?, + "Susan B. Anthony Day", + ), + (NaiveDate::from_ymd_res(2026, 12, 24)?, "Christmas Eve"), + (NaiveDate::from_ymd_res(2026, 12, 31)?, "New Year's Eve"), + ], + &mut map, + Country::US_WI, + "United States (Wisconsin)", + ); + + 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); New Year's Eve", + ), + (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); Christmas Eve", + ), + ( + NaiveDate::from_ymd_res(2027, 1, 18)?, + "Martin Luther King Jr. Day", + ), + ( + NaiveDate::from_ymd_res(2027, 2, 15)?, + "Susan B. Anthony Day; Washington's Birthday", + ), + ( + NaiveDate::from_ymd_res(2027, 12, 23)?, + "Christmas Eve (observed)", + ), + ], + &mut map, + Country::US_WI, + "United States (Wisconsin)", + ); + + 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, 2, 15)?, + "Susan B. Anthony Day", + ), + (NaiveDate::from_ymd_res(2028, 12, 24)?, "Christmas Eve"), + ( + NaiveDate::from_ymd_res(2028, 12, 22)?, + "Christmas Eve (observed)", + ), + (NaiveDate::from_ymd_res(2028, 12, 31)?, "New Year's Eve"), + ], + &mut map, + Country::US_WI, + "United States (Wisconsin)", + ); + + 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, 2, 15)?, + "Susan B. Anthony Day", + ), + (NaiveDate::from_ymd_res(2029, 12, 24)?, "Christmas Eve"), + (NaiveDate::from_ymd_res(2029, 12, 31)?, "New Year's Eve"), + ], + &mut map, + Country::US_WI, + "United States (Wisconsin)", + ); + + 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, 2, 15)?, + "Susan B. Anthony Day", + ), + (NaiveDate::from_ymd_res(2030, 12, 24)?, "Christmas Eve"), + (NaiveDate::from_ymd_res(2030, 12, 31)?, "New Year's Eve"), + ], + &mut map, + Country::US_WI, + "United States (Wisconsin)", + ); + + Ok(map) +} diff --git a/src/data/us_wv.rs b/src/data/us_wv.rs new file mode 100644 index 0000000..373eb97 --- /dev/null +++ b/src/data/us_wv.rs @@ -0,0 +1,1200 @@ +//! United States (West Virginia) +use super::*; + +/// Generate holiday map for United States (West Virginia). +#[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"), + (NaiveDate::from_ymd_res(2000, 6, 20)?, "West Virginia Day"), + ( + NaiveDate::from_ymd_res(2000, 11, 24)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_WV, + "United States (West Virginia)", + ); + + 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"), + (NaiveDate::from_ymd_res(2001, 6, 20)?, "West Virginia Day"), + ( + NaiveDate::from_ymd_res(2001, 11, 23)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_WV, + "United States (West Virginia)", + ); + + 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"), + (NaiveDate::from_ymd_res(2002, 6, 20)?, "West Virginia Day"), + ( + NaiveDate::from_ymd_res(2002, 11, 29)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_WV, + "United States (West Virginia)", + ); + + 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"), + (NaiveDate::from_ymd_res(2003, 6, 20)?, "West Virginia Day"), + ( + NaiveDate::from_ymd_res(2003, 11, 28)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_WV, + "United States (West Virginia)", + ); + + 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"), + (NaiveDate::from_ymd_res(2004, 6, 20)?, "West Virginia Day"), + ( + NaiveDate::from_ymd_res(2004, 6, 21)?, + "West Virginia Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2004, 11, 26)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_WV, + "United States (West Virginia)", + ); + + 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"), + (NaiveDate::from_ymd_res(2005, 6, 20)?, "West Virginia Day"), + ( + NaiveDate::from_ymd_res(2005, 11, 25)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_WV, + "United States (West Virginia)", + ); + + 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"), + (NaiveDate::from_ymd_res(2006, 6, 20)?, "West Virginia Day"), + ( + NaiveDate::from_ymd_res(2006, 11, 24)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_WV, + "United States (West Virginia)", + ); + + 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"), + (NaiveDate::from_ymd_res(2007, 6, 20)?, "West Virginia Day"), + ( + NaiveDate::from_ymd_res(2007, 11, 23)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_WV, + "United States (West Virginia)", + ); + + 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"), + (NaiveDate::from_ymd_res(2008, 6, 20)?, "West Virginia Day"), + (NaiveDate::from_ymd_res(2008, 11, 4)?, "Election Day"), + ( + NaiveDate::from_ymd_res(2008, 11, 28)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_WV, + "United States (West Virginia)", + ); + + 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"), + (NaiveDate::from_ymd_res(2009, 6, 20)?, "West Virginia Day"), + ( + NaiveDate::from_ymd_res(2009, 6, 19)?, + "West Virginia Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2009, 11, 27)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_WV, + "United States (West Virginia)", + ); + + 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"), + (NaiveDate::from_ymd_res(2010, 6, 20)?, "West Virginia Day"), + ( + NaiveDate::from_ymd_res(2010, 6, 21)?, + "West Virginia Day (observed)", + ), + (NaiveDate::from_ymd_res(2010, 11, 2)?, "Election Day"), + ( + NaiveDate::from_ymd_res(2010, 11, 26)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_WV, + "United States (West Virginia)", + ); + + 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"), + (NaiveDate::from_ymd_res(2011, 6, 20)?, "West Virginia Day"), + ( + NaiveDate::from_ymd_res(2011, 11, 25)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_WV, + "United States (West Virginia)", + ); + + 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"), + (NaiveDate::from_ymd_res(2012, 6, 20)?, "West Virginia Day"), + (NaiveDate::from_ymd_res(2012, 11, 6)?, "Election Day"), + ( + NaiveDate::from_ymd_res(2012, 11, 23)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_WV, + "United States (West Virginia)", + ); + + 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"), + (NaiveDate::from_ymd_res(2013, 6, 20)?, "West Virginia Day"), + ( + NaiveDate::from_ymd_res(2013, 11, 29)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_WV, + "United States (West Virginia)", + ); + + 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"), + (NaiveDate::from_ymd_res(2014, 6, 20)?, "West Virginia Day"), + (NaiveDate::from_ymd_res(2014, 11, 4)?, "Election Day"), + ( + NaiveDate::from_ymd_res(2014, 11, 28)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_WV, + "United States (West Virginia)", + ); + + 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"), + (NaiveDate::from_ymd_res(2015, 6, 20)?, "West Virginia Day"), + ( + NaiveDate::from_ymd_res(2015, 6, 19)?, + "West Virginia Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2015, 11, 27)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_WV, + "United States (West Virginia)", + ); + + 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"), + (NaiveDate::from_ymd_res(2016, 6, 20)?, "West Virginia Day"), + (NaiveDate::from_ymd_res(2016, 11, 8)?, "Election Day"), + ( + NaiveDate::from_ymd_res(2016, 11, 25)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_WV, + "United States (West Virginia)", + ); + + 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"), + (NaiveDate::from_ymd_res(2017, 6, 20)?, "West Virginia Day"), + ( + NaiveDate::from_ymd_res(2017, 11, 24)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_WV, + "United States (West Virginia)", + ); + + 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"), + (NaiveDate::from_ymd_res(2018, 6, 20)?, "West Virginia Day"), + (NaiveDate::from_ymd_res(2018, 11, 6)?, "Election Day"), + ( + NaiveDate::from_ymd_res(2018, 11, 23)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_WV, + "United States (West Virginia)", + ); + + 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"), + (NaiveDate::from_ymd_res(2019, 6, 20)?, "West Virginia Day"), + ( + NaiveDate::from_ymd_res(2019, 11, 29)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_WV, + "United States (West Virginia)", + ); + + 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"), + (NaiveDate::from_ymd_res(2020, 6, 20)?, "West Virginia Day"), + ( + NaiveDate::from_ymd_res(2020, 6, 19)?, + "West Virginia Day (observed)", + ), + (NaiveDate::from_ymd_res(2020, 11, 3)?, "Election Day"), + ( + NaiveDate::from_ymd_res(2020, 11, 27)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_WV, + "United States (West Virginia)", + ); + + 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"), + (NaiveDate::from_ymd_res(2021, 6, 20)?, "West Virginia Day"), + ( + NaiveDate::from_ymd_res(2021, 6, 21)?, + "West Virginia Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2021, 11, 26)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_WV, + "United States (West Virginia)", + ); + + 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); West Virginia Day", + ), + (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"), + (NaiveDate::from_ymd_res(2022, 11, 8)?, "Election Day"), + ( + NaiveDate::from_ymd_res(2022, 11, 25)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_WV, + "United States (West Virginia)", + ); + + 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"), + (NaiveDate::from_ymd_res(2023, 6, 20)?, "West Virginia Day"), + ( + NaiveDate::from_ymd_res(2023, 11, 24)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_WV, + "United States (West Virginia)", + ); + + 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"), + (NaiveDate::from_ymd_res(2024, 6, 20)?, "West Virginia Day"), + (NaiveDate::from_ymd_res(2024, 11, 5)?, "Election Day"), + ( + NaiveDate::from_ymd_res(2024, 11, 29)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_WV, + "United States (West Virginia)", + ); + + 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"), + (NaiveDate::from_ymd_res(2025, 6, 20)?, "West Virginia Day"), + ( + NaiveDate::from_ymd_res(2025, 11, 28)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_WV, + "United States (West Virginia)", + ); + + 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; West Virginia Day (observed)", + ), + (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"), + (NaiveDate::from_ymd_res(2026, 6, 20)?, "West Virginia Day"), + (NaiveDate::from_ymd_res(2026, 11, 3)?, "Election Day"), + ( + NaiveDate::from_ymd_res(2026, 11, 27)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_WV, + "United States (West Virginia)", + ); + + 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"), + (NaiveDate::from_ymd_res(2027, 6, 20)?, "West Virginia Day"), + ( + NaiveDate::from_ymd_res(2027, 6, 21)?, + "West Virginia Day (observed)", + ), + ( + NaiveDate::from_ymd_res(2027, 11, 26)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_WV, + "United States (West Virginia)", + ); + + 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"), + (NaiveDate::from_ymd_res(2028, 6, 20)?, "West Virginia Day"), + (NaiveDate::from_ymd_res(2028, 11, 7)?, "Election Day"), + ( + NaiveDate::from_ymd_res(2028, 11, 24)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_WV, + "United States (West Virginia)", + ); + + 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"), + (NaiveDate::from_ymd_res(2029, 6, 20)?, "West Virginia Day"), + ( + NaiveDate::from_ymd_res(2029, 11, 23)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_WV, + "United States (West Virginia)", + ); + + 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"), + (NaiveDate::from_ymd_res(2030, 6, 20)?, "West Virginia Day"), + (NaiveDate::from_ymd_res(2030, 11, 5)?, "Election Day"), + ( + NaiveDate::from_ymd_res(2030, 11, 29)?, + "Day After Thanksgiving", + ), + ], + &mut map, + Country::US_WV, + "United States (West Virginia)", + ); + + Ok(map) +} diff --git a/src/data/us_wy.rs b/src/data/us_wy.rs new file mode 100644 index 0000000..c6df885 --- /dev/null +++ b/src/data/us_wy.rs @@ -0,0 +1,975 @@ +//! United States (Wyoming) +use super::*; + +/// Generate holiday map for United States (Wyoming). +#[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", + ), + ], + &mut map, + Country::US_WY, + "United States (Wyoming)", + ); + + 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", + ), + ], + &mut map, + Country::US_WY, + "United States (Wyoming)", + ); + + 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", + ), + ], + &mut map, + Country::US_WY, + "United States (Wyoming)", + ); + + 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", + ), + ], + &mut map, + Country::US_WY, + "United States (Wyoming)", + ); + + 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", + ), + ], + &mut map, + Country::US_WY, + "United States (Wyoming)", + ); + + 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", + ), + ], + &mut map, + Country::US_WY, + "United States (Wyoming)", + ); + + 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", + ), + ], + &mut map, + Country::US_WY, + "United States (Wyoming)", + ); + + 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", + ), + ], + &mut map, + Country::US_WY, + "United States (Wyoming)", + ); + + 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", + ), + ], + &mut map, + Country::US_WY, + "United States (Wyoming)", + ); + + 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", + ), + ], + &mut map, + Country::US_WY, + "United States (Wyoming)", + ); + + 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", + ), + ], + &mut map, + Country::US_WY, + "United States (Wyoming)", + ); + + 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", + ), + ], + &mut map, + Country::US_WY, + "United States (Wyoming)", + ); + + 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", + ), + ], + &mut map, + Country::US_WY, + "United States (Wyoming)", + ); + + 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", + ), + ], + &mut map, + Country::US_WY, + "United States (Wyoming)", + ); + + 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", + ), + ], + &mut map, + Country::US_WY, + "United States (Wyoming)", + ); + + 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", + ), + ], + &mut map, + Country::US_WY, + "United States (Wyoming)", + ); + + 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", + ), + ], + &mut map, + Country::US_WY, + "United States (Wyoming)", + ); + + 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", + ), + ], + &mut map, + Country::US_WY, + "United States (Wyoming)", + ); + + 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", + ), + ], + &mut map, + Country::US_WY, + "United States (Wyoming)", + ); + + 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", + ), + ], + &mut map, + Country::US_WY, + "United States (Wyoming)", + ); + + 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", + ), + ], + &mut map, + Country::US_WY, + "United States (Wyoming)", + ); + + 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", + ), + ], + &mut map, + Country::US_WY, + "United States (Wyoming)", + ); + + 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", + ), + ], + &mut map, + Country::US_WY, + "United States (Wyoming)", + ); + + 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", + ), + ], + &mut map, + Country::US_WY, + "United States (Wyoming)", + ); + + 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", + ), + ], + &mut map, + Country::US_WY, + "United States (Wyoming)", + ); + + 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", + ), + ], + &mut map, + Country::US_WY, + "United States (Wyoming)", + ); + + 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", + ), + ], + &mut map, + Country::US_WY, + "United States (Wyoming)", + ); + + 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", + ), + ], + &mut map, + Country::US_WY, + "United States (Wyoming)", + ); + + 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", + ), + ], + &mut map, + Country::US_WY, + "United States (Wyoming)", + ); + + 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", + ), + ], + &mut map, + Country::US_WY, + "United States (Wyoming)", + ); + + 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", + ), + ], + &mut map, + Country::US_WY, + "United States (Wyoming)", + ); + + Ok(map) +} diff --git a/src/data/uy.rs b/src/data/uy.rs index e0d1060..d8d91ff 100644 --- a/src/data/uy.rs +++ b/src/data/uy.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Uruguay. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/uz.rs b/src/data/uz.rs index 05f707f..c72e4a9 100644 --- a/src/data/uz.rs +++ b/src/data/uz.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Uzbekistan. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/ve.rs b/src/data/ve.rs index 56e1347..be6398f 100644 --- a/src/data/ve.rs +++ b/src/data/ve.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Venezuela. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/vn.rs b/src/data/vn.rs index 6632bfc..807cacd 100644 --- a/src/data/vn.rs +++ b/src/data/vn.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Vietnam. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/za.rs b/src/data/za.rs index 5fbc940..1d768c0 100644 --- a/src/data/za.rs +++ b/src/data/za.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for South Africa. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/zm.rs b/src/data/zm.rs index b001245..0ab4e01 100644 --- a/src/data/zm.rs +++ b/src/data/zm.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Zambia. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/data/zw.rs b/src/data/zw.rs index d3ee811..580c322 100644 --- a/src/data/zw.rs +++ b/src/data/zw.rs @@ -4,7 +4,7 @@ use super::*; /// Generate holiday map for Zimbabwe. #[allow(unused_mut, unused_variables)] pub fn build( - years: &Option<&std::ops::Range>, + years: Option<&std::ops::Range>, ) -> Result>> { let mut map = HashMap::new(); diff --git a/src/lib.rs b/src/lib.rs index 4eaeb3e..714a04d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -39,40 +39,26 @@ 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 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(&date.year()) else { - return Err(Error::YearNotAvailable); - }; - - Ok(map.get(&date).cloned()) + get_map_for_country_any_year(country, date.year(), |map| map.get(&date).cloned()) } /// Check if the specified date is a holiday. If the specified country or year is /// 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); - }; + get_map_for_country_any_year(country, date.year(), |map| map.get(&date).is_some()) +} +fn get_map_for_country_any_year( + country: Country, + year: Year, + result_getter: impl FnOnce(&BTreeMap) -> T, +) -> Result { + let data = Lazy::get(&DATA).ok_or(Error::Uninitialized)?; 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(&date.year()) else { - return Err(Error::YearNotAvailable); - }; - - Ok(map.get(&date).is_some()) + let map = data.get(&country).ok_or(Error::CountryNotAvailable)?; + let map = map.get(&year).ok_or(Error::YearNotAvailable)?; + Ok(result_getter(map)) } /// Represents a holiday. @@ -94,8 +80,8 @@ impl Holiday { country: impl Into, date: NaiveDate, name: impl Into, - ) -> Holiday { - Holiday { + ) -> Self { + Self { code, country: country.into(), date, @@ -116,7 +102,7 @@ pub enum Error { /// Holiday database is not initialized yet. #[error("Holiday database is not initialized yet")] Uninitialized, - /// Failed to get RwLock. + /// Failed to get `RwLock`. #[error("Failed to get RwLock: {0}")] LockError(String), /// Unexpexted error occurred. diff --git a/tests/test.rs b/tests/test.rs index 8f0fd2b..e21507a 100644 --- a/tests/test.rs +++ b/tests/test.rs @@ -38,6 +38,22 @@ fn build_by_country() -> anyhow::Result<()> { Ok(()) } +#[test] +#[serial] +fn build_by_country_with_subdivision() -> anyhow::Result<()> { + Builder::new() + .countries(&[Country::DE, Country::DE_NW]) + .years(2024..2025) + .init()?; + + let d = NaiveDate::from_ymd_res(2024, 5, 30)?; + + assert!(get(Country::DE, d)?.is_none()); + assert_eq!("Fronleichnam", get(Country::DE_NW, d)?.unwrap().name); + + Ok(()) +} + #[test] #[serial] fn build_by_year() -> anyhow::Result<()> { From 4f75f6093b591dc96142a022ba987d1f7b20fba6 Mon Sep 17 00:00:00 2001 From: AD4MANTIS <31745687+AD4MANTIS@users.noreply.github.com> Date: Sun, 23 Jun 2024 15:45:40 +0200 Subject: [PATCH 2/6] PR Comments --- .gitignore | 2 +- Cargo.toml | 3 - gen.py | 12 +- src/build.rs | 358 +++++++++++++++++++++++---------------------- src/builder.rs | 2 + src/country.rs | 2 + src/data/ae.rs | 8 +- src/data/am.rs | 8 +- src/data/ao.rs | 8 +- src/data/ar.rs | 8 +- src/data/at.rs | 8 +- src/data/au.rs | 8 +- src/data/aw.rs | 8 +- src/data/az.rs | 8 +- src/data/ba.rs | 8 +- src/data/bd.rs | 8 +- src/data/be.rs | 8 +- src/data/bg.rs | 8 +- src/data/bi.rs | 8 +- src/data/bo.rs | 8 +- src/data/br.rs | 8 +- src/data/bw.rs | 8 +- src/data/by.rs | 8 +- src/data/ca.rs | 8 +- src/data/ch.rs | 8 +- src/data/cl.rs | 8 +- src/data/cn.rs | 8 +- src/data/co.rs | 8 +- src/data/cu.rs | 8 +- src/data/cw.rs | 8 +- src/data/cy.rs | 8 +- src/data/cz.rs | 8 +- src/data/de.rs | 8 +- src/data/de_bb.rs | 8 +- src/data/de_be.rs | 8 +- src/data/de_bw.rs | 8 +- src/data/de_by.rs | 8 +- src/data/de_byp.rs | 8 +- src/data/de_hb.rs | 8 +- src/data/de_he.rs | 8 +- src/data/de_hh.rs | 8 +- src/data/de_mv.rs | 8 +- src/data/de_ni.rs | 8 +- src/data/de_nw.rs | 8 +- src/data/de_rp.rs | 8 +- src/data/de_sh.rs | 8 +- src/data/de_sl.rs | 8 +- src/data/de_sn.rs | 8 +- src/data/de_st.rs | 8 +- src/data/de_th.rs | 8 +- src/data/dj.rs | 8 +- src/data/dk.rs | 8 +- src/data/do.rs | 8 +- src/data/ee.rs | 8 +- src/data/eg.rs | 8 +- src/data/es.rs | 8 +- src/data/et.rs | 8 +- src/data/fi.rs | 8 +- src/data/fr.rs | 8 +- src/data/gb.rs | 8 +- src/data/ge.rs | 8 +- src/data/gr.rs | 8 +- src/data/hk.rs | 8 +- src/data/hn.rs | 8 +- src/data/hr.rs | 8 +- src/data/hu.rs | 8 +- src/data/id.rs | 8 +- src/data/ie.rs | 8 +- src/data/il.rs | 8 +- src/data/im.rs | 8 +- src/data/in.rs | 8 +- src/data/is.rs | 8 +- src/data/it.rs | 8 +- src/data/jm.rs | 8 +- src/data/jp.rs | 8 +- src/data/ke.rs | 8 +- src/data/kr.rs | 8 +- src/data/kz.rs | 8 +- src/data/li.rs | 8 +- src/data/ls.rs | 8 +- src/data/lt.rs | 8 +- src/data/lu.rs | 8 +- src/data/lv.rs | 8 +- src/data/ma.rs | 8 +- src/data/md.rs | 8 +- src/data/mg.rs | 8 +- src/data/mk.rs | 8 +- src/data/mt.rs | 8 +- src/data/mw.rs | 8 +- src/data/mx.rs | 8 +- src/data/my.rs | 8 +- src/data/mz.rs | 8 +- src/data/na.rs | 8 +- src/data/ng.rs | 8 +- src/data/ni.rs | 8 +- src/data/nl.rs | 8 +- src/data/no.rs | 8 +- src/data/nz.rs | 8 +- src/data/pe.rs | 8 +- src/data/pk.rs | 8 +- src/data/pl.rs | 8 +- src/data/pt.rs | 8 +- src/data/py.rs | 8 +- src/data/ro.rs | 8 +- src/data/rs.rs | 8 +- src/data/ru.rs | 8 +- src/data/sa.rs | 8 +- src/data/se.rs | 8 +- src/data/sg.rs | 8 +- src/data/si.rs | 8 +- src/data/sk.rs | 8 +- src/data/sz.rs | 8 +- src/data/tn.rs | 8 +- src/data/tr.rs | 8 +- src/data/tw.rs | 8 +- src/data/ua.rs | 8 +- src/data/us.rs | 8 +- src/data/us_ak.rs | 8 +- src/data/us_al.rs | 8 +- src/data/us_ar.rs | 8 +- src/data/us_as.rs | 8 +- src/data/us_az.rs | 8 +- src/data/us_ca.rs | 8 +- src/data/us_co.rs | 8 +- src/data/us_ct.rs | 8 +- src/data/us_dc.rs | 8 +- src/data/us_de.rs | 8 +- src/data/us_fl.rs | 8 +- src/data/us_ga.rs | 8 +- src/data/us_gu.rs | 8 +- src/data/us_hi.rs | 8 +- src/data/us_ia.rs | 8 +- src/data/us_id.rs | 8 +- src/data/us_il.rs | 8 +- src/data/us_in.rs | 8 +- src/data/us_ks.rs | 8 +- src/data/us_ky.rs | 8 +- src/data/us_la.rs | 8 +- src/data/us_ma.rs | 8 +- src/data/us_md.rs | 8 +- src/data/us_me.rs | 8 +- src/data/us_mi.rs | 8 +- src/data/us_mn.rs | 8 +- src/data/us_mo.rs | 8 +- src/data/us_mp.rs | 8 +- src/data/us_ms.rs | 8 +- src/data/us_mt.rs | 8 +- src/data/us_nc.rs | 8 +- src/data/us_nd.rs | 8 +- src/data/us_ne.rs | 8 +- src/data/us_nh.rs | 8 +- src/data/us_nj.rs | 8 +- src/data/us_nm.rs | 8 +- src/data/us_nv.rs | 8 +- src/data/us_ny.rs | 8 +- src/data/us_oh.rs | 8 +- src/data/us_ok.rs | 8 +- src/data/us_or.rs | 8 +- src/data/us_pa.rs | 8 +- src/data/us_pr.rs | 8 +- src/data/us_ri.rs | 8 +- src/data/us_sc.rs | 8 +- src/data/us_sd.rs | 8 +- src/data/us_tn.rs | 8 +- src/data/us_tx.rs | 8 +- src/data/us_um.rs | 8 +- src/data/us_ut.rs | 8 +- src/data/us_va.rs | 8 +- src/data/us_vi.rs | 8 +- src/data/us_vt.rs | 8 +- src/data/us_wa.rs | 8 +- src/data/us_wi.rs | 8 +- src/data/us_wv.rs | 8 +- src/data/us_wy.rs | 8 +- src/data/uy.rs | 8 +- src/data/uz.rs | 8 +- src/data/ve.rs | 8 +- src/data/vn.rs | 8 +- src/data/za.rs | 8 +- src/data/zm.rs | 8 +- src/data/zw.rs | 8 +- src/iter.rs | 10 +- src/lib.rs | 40 +++-- 183 files changed, 1454 insertions(+), 375 deletions(-) diff --git a/.gitignore b/.gitignore index 9c96ccb..e809c62 100644 --- a/.gitignore +++ b/.gitignore @@ -9,4 +9,4 @@ Cargo.lock # These are backup files generated by rustfmt **/*.rs.bk -poetry.lock \ No newline at end of file +poetry.lock diff --git a/Cargo.toml b/Cargo.toml index 0d7a6ee..987003e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -232,6 +232,3 @@ unsafe_code = "forbid" [lints.clippy] enum_glob_use = "forbid" pedantic = { level = "deny", priority = -1 } -missing_errors_doc = "allow" -too_many_lines = "allow" -wildcard_imports = "allow" diff --git a/gen.py b/gen.py index cac2a9d..9d7aaae 100644 --- a/gen.py +++ b/gen.py @@ -213,6 +213,7 @@ class Country: } impl AsRef for Country { + #[allow(clippy::too_many_lines)] fn as_ref(&self) -> &str { match self { {%- for country in countries %} @@ -226,6 +227,7 @@ class Country: impl std::str::FromStr for Country { type Err = Error; + #[allow(clippy::too_many_lines)] fn from_str(s: &str) -> std::result::Result { Ok(match s { {%- for country in countries %} @@ -244,13 +246,18 @@ class Country: use crate::{data, prelude::*, HolidayMap, Result, Year}; +fn should_build(countries: Option<&HashSet>, country: Country) -> bool { + matches!(countries, Some(c) if c.contains(&country)) +} + /// Generate holiday map for the specified countries and years. +#[allow(clippy::too_many_lines)] 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}}")] - if countries.map_or(true, |c| c.contains(&Country::{{country|enum_name}})) { + if should_build(countries, Country::{{country|enum_name}}) { map.insert(Country::{{country|enum_name}}, data::{{country|mod_name|escape}}::build(years)?); } {% endfor %} @@ -278,10 +285,11 @@ class Country: build_country = """ //! {{country|display_name}} +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for {{country|display_name}}. -#[allow(unused_mut, unused_variables)] +#[allow(unused_mut, unused_variables, clippy::too_many_lines, clippy::missing_errors_doc)] pub fn build(years: Option<&std::ops::Range>) -> Result>> { let mut map = HashMap::new(); diff --git a/src/build.rs b/src/build.rs index 73df354..d6e79a1 100644 --- a/src/build.rs +++ b/src/build.rs @@ -2,7 +2,15 @@ use std::collections::HashSet; use crate::{data, prelude::*, HolidayMap, Result, Year}; +fn should_build(countries: Option<&HashSet>, country: Country) -> bool { + match countries { + Some(c) => c.contains(&country), + None => true, + } +} + /// Generate holiday map for the specified countries and years. +#[allow(clippy::too_many_lines)] pub fn build( countries: Option<&HashSet>, years: Option<&std::ops::Range>, @@ -10,877 +18,877 @@ pub fn build( let mut map = HolidayMap::new(); #[cfg(feature = "AO")] - if countries.map_or(true, |c| c.contains(&Country::AO)) { + if should_build(countries, Country::AO) { map.insert(Country::AO, data::ao::build(years)?); } #[cfg(feature = "AR")] - if countries.map_or(true, |c| c.contains(&Country::AR)) { + if should_build(countries, Country::AR) { map.insert(Country::AR, data::ar::build(years)?); } #[cfg(feature = "AM")] - if countries.map_or(true, |c| c.contains(&Country::AM)) { + if should_build(countries, Country::AM) { map.insert(Country::AM, data::am::build(years)?); } #[cfg(feature = "AW")] - if countries.map_or(true, |c| c.contains(&Country::AW)) { + if should_build(countries, Country::AW) { map.insert(Country::AW, data::aw::build(years)?); } #[cfg(feature = "AU")] - if countries.map_or(true, |c| c.contains(&Country::AU)) { + if should_build(countries, Country::AU) { map.insert(Country::AU, data::au::build(years)?); } #[cfg(feature = "AT")] - if countries.map_or(true, |c| c.contains(&Country::AT)) { + if should_build(countries, Country::AT) { map.insert(Country::AT, data::at::build(years)?); } #[cfg(feature = "AZ")] - if countries.map_or(true, |c| c.contains(&Country::AZ)) { + if should_build(countries, Country::AZ) { map.insert(Country::AZ, data::az::build(years)?); } #[cfg(feature = "BD")] - if countries.map_or(true, |c| c.contains(&Country::BD)) { + if should_build(countries, Country::BD) { map.insert(Country::BD, data::bd::build(years)?); } #[cfg(feature = "BY")] - if countries.map_or(true, |c| c.contains(&Country::BY)) { + if should_build(countries, Country::BY) { map.insert(Country::BY, data::by::build(years)?); } #[cfg(feature = "BE")] - if countries.map_or(true, |c| c.contains(&Country::BE)) { + if should_build(countries, Country::BE) { map.insert(Country::BE, data::be::build(years)?); } #[cfg(feature = "BO")] - if countries.map_or(true, |c| c.contains(&Country::BO)) { + if should_build(countries, Country::BO) { map.insert(Country::BO, data::bo::build(years)?); } #[cfg(feature = "BA")] - if countries.map_or(true, |c| c.contains(&Country::BA)) { + if should_build(countries, Country::BA) { map.insert(Country::BA, data::ba::build(years)?); } #[cfg(feature = "BW")] - if countries.map_or(true, |c| c.contains(&Country::BW)) { + if should_build(countries, Country::BW) { map.insert(Country::BW, data::bw::build(years)?); } #[cfg(feature = "BR")] - if countries.map_or(true, |c| c.contains(&Country::BR)) { + if should_build(countries, Country::BR) { map.insert(Country::BR, data::br::build(years)?); } #[cfg(feature = "BG")] - if countries.map_or(true, |c| c.contains(&Country::BG)) { + if should_build(countries, Country::BG) { map.insert(Country::BG, data::bg::build(years)?); } #[cfg(feature = "BI")] - if countries.map_or(true, |c| c.contains(&Country::BI)) { + if should_build(countries, Country::BI) { map.insert(Country::BI, data::bi::build(years)?); } #[cfg(feature = "CA")] - if countries.map_or(true, |c| c.contains(&Country::CA)) { + if should_build(countries, Country::CA) { map.insert(Country::CA, data::ca::build(years)?); } #[cfg(feature = "CL")] - if countries.map_or(true, |c| c.contains(&Country::CL)) { + if should_build(countries, Country::CL) { map.insert(Country::CL, data::cl::build(years)?); } #[cfg(feature = "CN")] - if countries.map_or(true, |c| c.contains(&Country::CN)) { + if should_build(countries, Country::CN) { map.insert(Country::CN, data::cn::build(years)?); } #[cfg(feature = "CO")] - if countries.map_or(true, |c| c.contains(&Country::CO)) { + if should_build(countries, Country::CO) { map.insert(Country::CO, data::co::build(years)?); } #[cfg(feature = "HR")] - if countries.map_or(true, |c| c.contains(&Country::HR)) { + if should_build(countries, Country::HR) { map.insert(Country::HR, data::hr::build(years)?); } #[cfg(feature = "CU")] - if countries.map_or(true, |c| c.contains(&Country::CU)) { + if should_build(countries, Country::CU) { map.insert(Country::CU, data::cu::build(years)?); } #[cfg(feature = "CW")] - if countries.map_or(true, |c| c.contains(&Country::CW)) { + if should_build(countries, Country::CW) { map.insert(Country::CW, data::cw::build(years)?); } #[cfg(feature = "CY")] - if countries.map_or(true, |c| c.contains(&Country::CY)) { + if should_build(countries, Country::CY) { map.insert(Country::CY, data::cy::build(years)?); } #[cfg(feature = "CZ")] - if countries.map_or(true, |c| c.contains(&Country::CZ)) { + if should_build(countries, Country::CZ) { map.insert(Country::CZ, data::cz::build(years)?); } #[cfg(feature = "DK")] - if countries.map_or(true, |c| c.contains(&Country::DK)) { + if should_build(countries, Country::DK) { map.insert(Country::DK, data::dk::build(years)?); } #[cfg(feature = "DJ")] - if countries.map_or(true, |c| c.contains(&Country::DJ)) { + if should_build(countries, Country::DJ) { map.insert(Country::DJ, data::dj::build(years)?); } #[cfg(feature = "DO")] - if countries.map_or(true, |c| c.contains(&Country::DO)) { + if should_build(countries, Country::DO) { map.insert(Country::DO, data::r#do::build(years)?); } #[cfg(feature = "EG")] - if countries.map_or(true, |c| c.contains(&Country::EG)) { + if should_build(countries, Country::EG) { map.insert(Country::EG, data::eg::build(years)?); } #[cfg(feature = "EE")] - if countries.map_or(true, |c| c.contains(&Country::EE)) { + if should_build(countries, Country::EE) { map.insert(Country::EE, data::ee::build(years)?); } #[cfg(feature = "ET")] - if countries.map_or(true, |c| c.contains(&Country::ET)) { + if should_build(countries, Country::ET) { map.insert(Country::ET, data::et::build(years)?); } #[cfg(feature = "FI")] - if countries.map_or(true, |c| c.contains(&Country::FI)) { + if should_build(countries, Country::FI) { map.insert(Country::FI, data::fi::build(years)?); } #[cfg(feature = "FR")] - if countries.map_or(true, |c| c.contains(&Country::FR)) { + if should_build(countries, Country::FR) { map.insert(Country::FR, data::fr::build(years)?); } #[cfg(feature = "GE")] - if countries.map_or(true, |c| c.contains(&Country::GE)) { + if should_build(countries, Country::GE) { map.insert(Country::GE, data::ge::build(years)?); } #[cfg(feature = "DE")] - if countries.map_or(true, |c| c.contains(&Country::DE)) { + if should_build(countries, Country::DE) { map.insert(Country::DE, data::de::build(years)?); } #[cfg(feature = "DE")] - if countries.map_or(true, |c| c.contains(&Country::DE_BB)) { + if should_build(countries, Country::DE_BB) { map.insert(Country::DE_BB, data::de_bb::build(years)?); } #[cfg(feature = "DE")] - if countries.map_or(true, |c| c.contains(&Country::DE_BE)) { + if should_build(countries, Country::DE_BE) { map.insert(Country::DE_BE, data::de_be::build(years)?); } #[cfg(feature = "DE")] - if countries.map_or(true, |c| c.contains(&Country::DE_BW)) { + if should_build(countries, Country::DE_BW) { map.insert(Country::DE_BW, data::de_bw::build(years)?); } #[cfg(feature = "DE")] - if countries.map_or(true, |c| c.contains(&Country::DE_BY)) { + if should_build(countries, Country::DE_BY) { map.insert(Country::DE_BY, data::de_by::build(years)?); } #[cfg(feature = "DE")] - if countries.map_or(true, |c| c.contains(&Country::DE_BYP)) { + if should_build(countries, Country::DE_BYP) { map.insert(Country::DE_BYP, data::de_byp::build(years)?); } #[cfg(feature = "DE")] - if countries.map_or(true, |c| c.contains(&Country::DE_HB)) { + if should_build(countries, Country::DE_HB) { map.insert(Country::DE_HB, data::de_hb::build(years)?); } #[cfg(feature = "DE")] - if countries.map_or(true, |c| c.contains(&Country::DE_HE)) { + if should_build(countries, Country::DE_HE) { map.insert(Country::DE_HE, data::de_he::build(years)?); } #[cfg(feature = "DE")] - if countries.map_or(true, |c| c.contains(&Country::DE_HH)) { + if should_build(countries, Country::DE_HH) { map.insert(Country::DE_HH, data::de_hh::build(years)?); } #[cfg(feature = "DE")] - if countries.map_or(true, |c| c.contains(&Country::DE_MV)) { + if should_build(countries, Country::DE_MV) { map.insert(Country::DE_MV, data::de_mv::build(years)?); } #[cfg(feature = "DE")] - if countries.map_or(true, |c| c.contains(&Country::DE_NI)) { + if should_build(countries, Country::DE_NI) { map.insert(Country::DE_NI, data::de_ni::build(years)?); } #[cfg(feature = "DE")] - if countries.map_or(true, |c| c.contains(&Country::DE_NW)) { + if should_build(countries, Country::DE_NW) { map.insert(Country::DE_NW, data::de_nw::build(years)?); } #[cfg(feature = "DE")] - if countries.map_or(true, |c| c.contains(&Country::DE_RP)) { + if should_build(countries, Country::DE_RP) { map.insert(Country::DE_RP, data::de_rp::build(years)?); } #[cfg(feature = "DE")] - if countries.map_or(true, |c| c.contains(&Country::DE_SH)) { + if should_build(countries, Country::DE_SH) { map.insert(Country::DE_SH, data::de_sh::build(years)?); } #[cfg(feature = "DE")] - if countries.map_or(true, |c| c.contains(&Country::DE_SL)) { + if should_build(countries, Country::DE_SL) { map.insert(Country::DE_SL, data::de_sl::build(years)?); } #[cfg(feature = "DE")] - if countries.map_or(true, |c| c.contains(&Country::DE_SN)) { + if should_build(countries, Country::DE_SN) { map.insert(Country::DE_SN, data::de_sn::build(years)?); } #[cfg(feature = "DE")] - if countries.map_or(true, |c| c.contains(&Country::DE_ST)) { + if should_build(countries, Country::DE_ST) { map.insert(Country::DE_ST, data::de_st::build(years)?); } #[cfg(feature = "DE")] - if countries.map_or(true, |c| c.contains(&Country::DE_TH)) { + if should_build(countries, Country::DE_TH) { map.insert(Country::DE_TH, data::de_th::build(years)?); } #[cfg(feature = "GR")] - if countries.map_or(true, |c| c.contains(&Country::GR)) { + if should_build(countries, Country::GR) { map.insert(Country::GR, data::gr::build(years)?); } #[cfg(feature = "HN")] - if countries.map_or(true, |c| c.contains(&Country::HN)) { + if should_build(countries, Country::HN) { map.insert(Country::HN, data::hn::build(years)?); } #[cfg(feature = "HK")] - if countries.map_or(true, |c| c.contains(&Country::HK)) { + if should_build(countries, Country::HK) { map.insert(Country::HK, data::hk::build(years)?); } #[cfg(feature = "HU")] - if countries.map_or(true, |c| c.contains(&Country::HU)) { + if should_build(countries, Country::HU) { map.insert(Country::HU, data::hu::build(years)?); } #[cfg(feature = "IS")] - if countries.map_or(true, |c| c.contains(&Country::IS)) { + if should_build(countries, Country::IS) { map.insert(Country::IS, data::is::build(years)?); } #[cfg(feature = "IN")] - if countries.map_or(true, |c| c.contains(&Country::IN)) { + if should_build(countries, Country::IN) { map.insert(Country::IN, data::r#in::build(years)?); } #[cfg(feature = "ID")] - if countries.map_or(true, |c| c.contains(&Country::ID)) { + if should_build(countries, Country::ID) { map.insert(Country::ID, data::id::build(years)?); } #[cfg(feature = "IE")] - if countries.map_or(true, |c| c.contains(&Country::IE)) { + if should_build(countries, Country::IE) { map.insert(Country::IE, data::ie::build(years)?); } #[cfg(feature = "IM")] - if countries.map_or(true, |c| c.contains(&Country::IM)) { + if should_build(countries, Country::IM) { map.insert(Country::IM, data::im::build(years)?); } #[cfg(feature = "IL")] - if countries.map_or(true, |c| c.contains(&Country::IL)) { + if should_build(countries, Country::IL) { map.insert(Country::IL, data::il::build(years)?); } #[cfg(feature = "IT")] - if countries.map_or(true, |c| c.contains(&Country::IT)) { + if should_build(countries, Country::IT) { map.insert(Country::IT, data::it::build(years)?); } #[cfg(feature = "JM")] - if countries.map_or(true, |c| c.contains(&Country::JM)) { + if should_build(countries, Country::JM) { map.insert(Country::JM, data::jm::build(years)?); } #[cfg(feature = "JP")] - if countries.map_or(true, |c| c.contains(&Country::JP)) { + if should_build(countries, Country::JP) { map.insert(Country::JP, data::jp::build(years)?); } #[cfg(feature = "KZ")] - if countries.map_or(true, |c| c.contains(&Country::KZ)) { + if should_build(countries, Country::KZ) { map.insert(Country::KZ, data::kz::build(years)?); } #[cfg(feature = "KE")] - if countries.map_or(true, |c| c.contains(&Country::KE)) { + if should_build(countries, Country::KE) { map.insert(Country::KE, data::ke::build(years)?); } #[cfg(feature = "LV")] - if countries.map_or(true, |c| c.contains(&Country::LV)) { + if should_build(countries, Country::LV) { map.insert(Country::LV, data::lv::build(years)?); } #[cfg(feature = "LS")] - if countries.map_or(true, |c| c.contains(&Country::LS)) { + if should_build(countries, Country::LS) { map.insert(Country::LS, data::ls::build(years)?); } #[cfg(feature = "LI")] - if countries.map_or(true, |c| c.contains(&Country::LI)) { + if should_build(countries, Country::LI) { map.insert(Country::LI, data::li::build(years)?); } #[cfg(feature = "LT")] - if countries.map_or(true, |c| c.contains(&Country::LT)) { + if should_build(countries, Country::LT) { map.insert(Country::LT, data::lt::build(years)?); } #[cfg(feature = "LU")] - if countries.map_or(true, |c| c.contains(&Country::LU)) { + if should_build(countries, Country::LU) { map.insert(Country::LU, data::lu::build(years)?); } #[cfg(feature = "MG")] - if countries.map_or(true, |c| c.contains(&Country::MG)) { + if should_build(countries, Country::MG) { map.insert(Country::MG, data::mg::build(years)?); } #[cfg(feature = "MY")] - if countries.map_or(true, |c| c.contains(&Country::MY)) { + if should_build(countries, Country::MY) { map.insert(Country::MY, data::my::build(years)?); } #[cfg(feature = "MW")] - if countries.map_or(true, |c| c.contains(&Country::MW)) { + if should_build(countries, Country::MW) { map.insert(Country::MW, data::mw::build(years)?); } #[cfg(feature = "MT")] - if countries.map_or(true, |c| c.contains(&Country::MT)) { + if should_build(countries, Country::MT) { map.insert(Country::MT, data::mt::build(years)?); } #[cfg(feature = "MX")] - if countries.map_or(true, |c| c.contains(&Country::MX)) { + if should_build(countries, Country::MX) { map.insert(Country::MX, data::mx::build(years)?); } #[cfg(feature = "MD")] - if countries.map_or(true, |c| c.contains(&Country::MD)) { + if should_build(countries, Country::MD) { map.insert(Country::MD, data::md::build(years)?); } #[cfg(feature = "MA")] - if countries.map_or(true, |c| c.contains(&Country::MA)) { + if should_build(countries, Country::MA) { map.insert(Country::MA, data::ma::build(years)?); } #[cfg(feature = "MZ")] - if countries.map_or(true, |c| c.contains(&Country::MZ)) { + if should_build(countries, Country::MZ) { map.insert(Country::MZ, data::mz::build(years)?); } #[cfg(feature = "NL")] - if countries.map_or(true, |c| c.contains(&Country::NL)) { + if should_build(countries, Country::NL) { map.insert(Country::NL, data::nl::build(years)?); } #[cfg(feature = "NA")] - if countries.map_or(true, |c| c.contains(&Country::NA)) { + if should_build(countries, Country::NA) { map.insert(Country::NA, data::na::build(years)?); } #[cfg(feature = "NZ")] - if countries.map_or(true, |c| c.contains(&Country::NZ)) { + if should_build(countries, Country::NZ) { map.insert(Country::NZ, data::nz::build(years)?); } #[cfg(feature = "NI")] - if countries.map_or(true, |c| c.contains(&Country::NI)) { + if should_build(countries, Country::NI) { map.insert(Country::NI, data::ni::build(years)?); } #[cfg(feature = "NG")] - if countries.map_or(true, |c| c.contains(&Country::NG)) { + if should_build(countries, Country::NG) { map.insert(Country::NG, data::ng::build(years)?); } #[cfg(feature = "MK")] - if countries.map_or(true, |c| c.contains(&Country::MK)) { + if should_build(countries, Country::MK) { map.insert(Country::MK, data::mk::build(years)?); } #[cfg(feature = "NO")] - if countries.map_or(true, |c| c.contains(&Country::NO)) { + if should_build(countries, Country::NO) { map.insert(Country::NO, data::no::build(years)?); } #[cfg(feature = "PK")] - if countries.map_or(true, |c| c.contains(&Country::PK)) { + if should_build(countries, Country::PK) { map.insert(Country::PK, data::pk::build(years)?); } #[cfg(feature = "PY")] - if countries.map_or(true, |c| c.contains(&Country::PY)) { + if should_build(countries, Country::PY) { map.insert(Country::PY, data::py::build(years)?); } #[cfg(feature = "PE")] - if countries.map_or(true, |c| c.contains(&Country::PE)) { + if should_build(countries, Country::PE) { map.insert(Country::PE, data::pe::build(years)?); } #[cfg(feature = "PL")] - if countries.map_or(true, |c| c.contains(&Country::PL)) { + if should_build(countries, Country::PL) { map.insert(Country::PL, data::pl::build(years)?); } #[cfg(feature = "PT")] - if countries.map_or(true, |c| c.contains(&Country::PT)) { + if should_build(countries, Country::PT) { map.insert(Country::PT, data::pt::build(years)?); } #[cfg(feature = "RO")] - if countries.map_or(true, |c| c.contains(&Country::RO)) { + if should_build(countries, Country::RO) { map.insert(Country::RO, data::ro::build(years)?); } #[cfg(feature = "RU")] - if countries.map_or(true, |c| c.contains(&Country::RU)) { + if should_build(countries, Country::RU) { map.insert(Country::RU, data::ru::build(years)?); } #[cfg(feature = "SA")] - if countries.map_or(true, |c| c.contains(&Country::SA)) { + if should_build(countries, Country::SA) { map.insert(Country::SA, data::sa::build(years)?); } #[cfg(feature = "RS")] - if countries.map_or(true, |c| c.contains(&Country::RS)) { + if should_build(countries, Country::RS) { map.insert(Country::RS, data::rs::build(years)?); } #[cfg(feature = "SG")] - if countries.map_or(true, |c| c.contains(&Country::SG)) { + if should_build(countries, Country::SG) { map.insert(Country::SG, data::sg::build(years)?); } #[cfg(feature = "SK")] - if countries.map_or(true, |c| c.contains(&Country::SK)) { + if should_build(countries, Country::SK) { map.insert(Country::SK, data::sk::build(years)?); } #[cfg(feature = "SI")] - if countries.map_or(true, |c| c.contains(&Country::SI)) { + if should_build(countries, Country::SI) { map.insert(Country::SI, data::si::build(years)?); } #[cfg(feature = "ZA")] - if countries.map_or(true, |c| c.contains(&Country::ZA)) { + if should_build(countries, Country::ZA) { map.insert(Country::ZA, data::za::build(years)?); } #[cfg(feature = "KR")] - if countries.map_or(true, |c| c.contains(&Country::KR)) { + if should_build(countries, Country::KR) { map.insert(Country::KR, data::kr::build(years)?); } #[cfg(feature = "ES")] - if countries.map_or(true, |c| c.contains(&Country::ES)) { + if should_build(countries, Country::ES) { map.insert(Country::ES, data::es::build(years)?); } #[cfg(feature = "SZ")] - if countries.map_or(true, |c| c.contains(&Country::SZ)) { + if should_build(countries, Country::SZ) { map.insert(Country::SZ, data::sz::build(years)?); } #[cfg(feature = "SE")] - if countries.map_or(true, |c| c.contains(&Country::SE)) { + if should_build(countries, Country::SE) { map.insert(Country::SE, data::se::build(years)?); } #[cfg(feature = "CH")] - if countries.map_or(true, |c| c.contains(&Country::CH)) { + if should_build(countries, Country::CH) { map.insert(Country::CH, data::ch::build(years)?); } #[cfg(feature = "TW")] - if countries.map_or(true, |c| c.contains(&Country::TW)) { + if should_build(countries, Country::TW) { map.insert(Country::TW, data::tw::build(years)?); } #[cfg(feature = "TR")] - if countries.map_or(true, |c| c.contains(&Country::TR)) { + if should_build(countries, Country::TR) { map.insert(Country::TR, data::tr::build(years)?); } #[cfg(feature = "TN")] - if countries.map_or(true, |c| c.contains(&Country::TN)) { + if should_build(countries, Country::TN) { map.insert(Country::TN, data::tn::build(years)?); } #[cfg(feature = "UA")] - if countries.map_or(true, |c| c.contains(&Country::UA)) { + if should_build(countries, Country::UA) { map.insert(Country::UA, data::ua::build(years)?); } #[cfg(feature = "AE")] - if countries.map_or(true, |c| c.contains(&Country::AE)) { + if should_build(countries, Country::AE) { map.insert(Country::AE, data::ae::build(years)?); } #[cfg(feature = "GB")] - if countries.map_or(true, |c| c.contains(&Country::GB)) { + if should_build(countries, Country::GB) { map.insert(Country::GB, data::gb::build(years)?); } #[cfg(feature = "US")] - if countries.map_or(true, |c| c.contains(&Country::US)) { + if should_build(countries, Country::US) { map.insert(Country::US, data::us::build(years)?); } #[cfg(feature = "US")] - if countries.map_or(true, |c| c.contains(&Country::US_AK)) { + if should_build(countries, Country::US_AK) { map.insert(Country::US_AK, data::us_ak::build(years)?); } #[cfg(feature = "US")] - if countries.map_or(true, |c| c.contains(&Country::US_AL)) { + if should_build(countries, Country::US_AL) { map.insert(Country::US_AL, data::us_al::build(years)?); } #[cfg(feature = "US")] - if countries.map_or(true, |c| c.contains(&Country::US_AR)) { + if should_build(countries, Country::US_AR) { map.insert(Country::US_AR, data::us_ar::build(years)?); } #[cfg(feature = "US")] - if countries.map_or(true, |c| c.contains(&Country::US_AS)) { + if should_build(countries, Country::US_AS) { map.insert(Country::US_AS, data::us_as::build(years)?); } #[cfg(feature = "US")] - if countries.map_or(true, |c| c.contains(&Country::US_AZ)) { + if should_build(countries, Country::US_AZ) { map.insert(Country::US_AZ, data::us_az::build(years)?); } #[cfg(feature = "US")] - if countries.map_or(true, |c| c.contains(&Country::US_CA)) { + if should_build(countries, Country::US_CA) { map.insert(Country::US_CA, data::us_ca::build(years)?); } #[cfg(feature = "US")] - if countries.map_or(true, |c| c.contains(&Country::US_CO)) { + if should_build(countries, Country::US_CO) { map.insert(Country::US_CO, data::us_co::build(years)?); } #[cfg(feature = "US")] - if countries.map_or(true, |c| c.contains(&Country::US_CT)) { + if should_build(countries, Country::US_CT) { map.insert(Country::US_CT, data::us_ct::build(years)?); } #[cfg(feature = "US")] - if countries.map_or(true, |c| c.contains(&Country::US_DC)) { + if should_build(countries, Country::US_DC) { map.insert(Country::US_DC, data::us_dc::build(years)?); } #[cfg(feature = "US")] - if countries.map_or(true, |c| c.contains(&Country::US_DE)) { + if should_build(countries, Country::US_DE) { map.insert(Country::US_DE, data::us_de::build(years)?); } #[cfg(feature = "US")] - if countries.map_or(true, |c| c.contains(&Country::US_FL)) { + if should_build(countries, Country::US_FL) { map.insert(Country::US_FL, data::us_fl::build(years)?); } #[cfg(feature = "US")] - if countries.map_or(true, |c| c.contains(&Country::US_GA)) { + if should_build(countries, Country::US_GA) { map.insert(Country::US_GA, data::us_ga::build(years)?); } #[cfg(feature = "US")] - if countries.map_or(true, |c| c.contains(&Country::US_GU)) { + if should_build(countries, Country::US_GU) { map.insert(Country::US_GU, data::us_gu::build(years)?); } #[cfg(feature = "US")] - if countries.map_or(true, |c| c.contains(&Country::US_HI)) { + if should_build(countries, Country::US_HI) { map.insert(Country::US_HI, data::us_hi::build(years)?); } #[cfg(feature = "US")] - if countries.map_or(true, |c| c.contains(&Country::US_IA)) { + if should_build(countries, Country::US_IA) { map.insert(Country::US_IA, data::us_ia::build(years)?); } #[cfg(feature = "US")] - if countries.map_or(true, |c| c.contains(&Country::US_ID)) { + if should_build(countries, Country::US_ID) { map.insert(Country::US_ID, data::us_id::build(years)?); } #[cfg(feature = "US")] - if countries.map_or(true, |c| c.contains(&Country::US_IL)) { + if should_build(countries, Country::US_IL) { map.insert(Country::US_IL, data::us_il::build(years)?); } #[cfg(feature = "US")] - if countries.map_or(true, |c| c.contains(&Country::US_IN)) { + if should_build(countries, Country::US_IN) { map.insert(Country::US_IN, data::us_in::build(years)?); } #[cfg(feature = "US")] - if countries.map_or(true, |c| c.contains(&Country::US_KS)) { + if should_build(countries, Country::US_KS) { map.insert(Country::US_KS, data::us_ks::build(years)?); } #[cfg(feature = "US")] - if countries.map_or(true, |c| c.contains(&Country::US_KY)) { + if should_build(countries, Country::US_KY) { map.insert(Country::US_KY, data::us_ky::build(years)?); } #[cfg(feature = "US")] - if countries.map_or(true, |c| c.contains(&Country::US_LA)) { + if should_build(countries, Country::US_LA) { map.insert(Country::US_LA, data::us_la::build(years)?); } #[cfg(feature = "US")] - if countries.map_or(true, |c| c.contains(&Country::US_MA)) { + if should_build(countries, Country::US_MA) { map.insert(Country::US_MA, data::us_ma::build(years)?); } #[cfg(feature = "US")] - if countries.map_or(true, |c| c.contains(&Country::US_MD)) { + if should_build(countries, Country::US_MD) { map.insert(Country::US_MD, data::us_md::build(years)?); } #[cfg(feature = "US")] - if countries.map_or(true, |c| c.contains(&Country::US_ME)) { + if should_build(countries, Country::US_ME) { map.insert(Country::US_ME, data::us_me::build(years)?); } #[cfg(feature = "US")] - if countries.map_or(true, |c| c.contains(&Country::US_MI)) { + if should_build(countries, Country::US_MI) { map.insert(Country::US_MI, data::us_mi::build(years)?); } #[cfg(feature = "US")] - if countries.map_or(true, |c| c.contains(&Country::US_MN)) { + if should_build(countries, Country::US_MN) { map.insert(Country::US_MN, data::us_mn::build(years)?); } #[cfg(feature = "US")] - if countries.map_or(true, |c| c.contains(&Country::US_MO)) { + if should_build(countries, Country::US_MO) { map.insert(Country::US_MO, data::us_mo::build(years)?); } #[cfg(feature = "US")] - if countries.map_or(true, |c| c.contains(&Country::US_MP)) { + if should_build(countries, Country::US_MP) { map.insert(Country::US_MP, data::us_mp::build(years)?); } #[cfg(feature = "US")] - if countries.map_or(true, |c| c.contains(&Country::US_MS)) { + if should_build(countries, Country::US_MS) { map.insert(Country::US_MS, data::us_ms::build(years)?); } #[cfg(feature = "US")] - if countries.map_or(true, |c| c.contains(&Country::US_MT)) { + if should_build(countries, Country::US_MT) { map.insert(Country::US_MT, data::us_mt::build(years)?); } #[cfg(feature = "US")] - if countries.map_or(true, |c| c.contains(&Country::US_NC)) { + if should_build(countries, Country::US_NC) { map.insert(Country::US_NC, data::us_nc::build(years)?); } #[cfg(feature = "US")] - if countries.map_or(true, |c| c.contains(&Country::US_ND)) { + if should_build(countries, Country::US_ND) { map.insert(Country::US_ND, data::us_nd::build(years)?); } #[cfg(feature = "US")] - if countries.map_or(true, |c| c.contains(&Country::US_NE)) { + if should_build(countries, Country::US_NE) { map.insert(Country::US_NE, data::us_ne::build(years)?); } #[cfg(feature = "US")] - if countries.map_or(true, |c| c.contains(&Country::US_NH)) { + if should_build(countries, Country::US_NH) { map.insert(Country::US_NH, data::us_nh::build(years)?); } #[cfg(feature = "US")] - if countries.map_or(true, |c| c.contains(&Country::US_NJ)) { + if should_build(countries, Country::US_NJ) { map.insert(Country::US_NJ, data::us_nj::build(years)?); } #[cfg(feature = "US")] - if countries.map_or(true, |c| c.contains(&Country::US_NM)) { + if should_build(countries, Country::US_NM) { map.insert(Country::US_NM, data::us_nm::build(years)?); } #[cfg(feature = "US")] - if countries.map_or(true, |c| c.contains(&Country::US_NV)) { + if should_build(countries, Country::US_NV) { map.insert(Country::US_NV, data::us_nv::build(years)?); } #[cfg(feature = "US")] - if countries.map_or(true, |c| c.contains(&Country::US_NY)) { + if should_build(countries, Country::US_NY) { map.insert(Country::US_NY, data::us_ny::build(years)?); } #[cfg(feature = "US")] - if countries.map_or(true, |c| c.contains(&Country::US_OH)) { + if should_build(countries, Country::US_OH) { map.insert(Country::US_OH, data::us_oh::build(years)?); } #[cfg(feature = "US")] - if countries.map_or(true, |c| c.contains(&Country::US_OK)) { + if should_build(countries, Country::US_OK) { map.insert(Country::US_OK, data::us_ok::build(years)?); } #[cfg(feature = "US")] - if countries.map_or(true, |c| c.contains(&Country::US_OR)) { + if should_build(countries, Country::US_OR) { map.insert(Country::US_OR, data::us_or::build(years)?); } #[cfg(feature = "US")] - if countries.map_or(true, |c| c.contains(&Country::US_PA)) { + if should_build(countries, Country::US_PA) { map.insert(Country::US_PA, data::us_pa::build(years)?); } #[cfg(feature = "US")] - if countries.map_or(true, |c| c.contains(&Country::US_PR)) { + if should_build(countries, Country::US_PR) { map.insert(Country::US_PR, data::us_pr::build(years)?); } #[cfg(feature = "US")] - if countries.map_or(true, |c| c.contains(&Country::US_RI)) { + if should_build(countries, Country::US_RI) { map.insert(Country::US_RI, data::us_ri::build(years)?); } #[cfg(feature = "US")] - if countries.map_or(true, |c| c.contains(&Country::US_SC)) { + if should_build(countries, Country::US_SC) { map.insert(Country::US_SC, data::us_sc::build(years)?); } #[cfg(feature = "US")] - if countries.map_or(true, |c| c.contains(&Country::US_SD)) { + if should_build(countries, Country::US_SD) { map.insert(Country::US_SD, data::us_sd::build(years)?); } #[cfg(feature = "US")] - if countries.map_or(true, |c| c.contains(&Country::US_TN)) { + if should_build(countries, Country::US_TN) { map.insert(Country::US_TN, data::us_tn::build(years)?); } #[cfg(feature = "US")] - if countries.map_or(true, |c| c.contains(&Country::US_TX)) { + if should_build(countries, Country::US_TX) { map.insert(Country::US_TX, data::us_tx::build(years)?); } #[cfg(feature = "US")] - if countries.map_or(true, |c| c.contains(&Country::US_UM)) { + if should_build(countries, Country::US_UM) { map.insert(Country::US_UM, data::us_um::build(years)?); } #[cfg(feature = "US")] - if countries.map_or(true, |c| c.contains(&Country::US_UT)) { + if should_build(countries, Country::US_UT) { map.insert(Country::US_UT, data::us_ut::build(years)?); } #[cfg(feature = "US")] - if countries.map_or(true, |c| c.contains(&Country::US_VA)) { + if should_build(countries, Country::US_VA) { map.insert(Country::US_VA, data::us_va::build(years)?); } #[cfg(feature = "US")] - if countries.map_or(true, |c| c.contains(&Country::US_VI)) { + if should_build(countries, Country::US_VI) { map.insert(Country::US_VI, data::us_vi::build(years)?); } #[cfg(feature = "US")] - if countries.map_or(true, |c| c.contains(&Country::US_VT)) { + if should_build(countries, Country::US_VT) { map.insert(Country::US_VT, data::us_vt::build(years)?); } #[cfg(feature = "US")] - if countries.map_or(true, |c| c.contains(&Country::US_WA)) { + if should_build(countries, Country::US_WA) { map.insert(Country::US_WA, data::us_wa::build(years)?); } #[cfg(feature = "US")] - if countries.map_or(true, |c| c.contains(&Country::US_WI)) { + if should_build(countries, Country::US_WI) { map.insert(Country::US_WI, data::us_wi::build(years)?); } #[cfg(feature = "US")] - if countries.map_or(true, |c| c.contains(&Country::US_WV)) { + if should_build(countries, Country::US_WV) { map.insert(Country::US_WV, data::us_wv::build(years)?); } #[cfg(feature = "US")] - if countries.map_or(true, |c| c.contains(&Country::US_WY)) { + if should_build(countries, Country::US_WY) { map.insert(Country::US_WY, data::us_wy::build(years)?); } #[cfg(feature = "UY")] - if countries.map_or(true, |c| c.contains(&Country::UY)) { + if should_build(countries, Country::UY) { map.insert(Country::UY, data::uy::build(years)?); } #[cfg(feature = "UZ")] - if countries.map_or(true, |c| c.contains(&Country::UZ)) { + if should_build(countries, Country::UZ) { map.insert(Country::UZ, data::uz::build(years)?); } #[cfg(feature = "VE")] - if countries.map_or(true, |c| c.contains(&Country::VE)) { + if should_build(countries, Country::VE) { map.insert(Country::VE, data::ve::build(years)?); } #[cfg(feature = "VN")] - if countries.map_or(true, |c| c.contains(&Country::VN)) { + if should_build(countries, Country::VN) { map.insert(Country::VN, data::vn::build(years)?); } #[cfg(feature = "ZM")] - if countries.map_or(true, |c| c.contains(&Country::ZM)) { + if should_build(countries, Country::ZM) { map.insert(Country::ZM, data::zm::build(years)?); } #[cfg(feature = "ZW")] - if countries.map_or(true, |c| c.contains(&Country::ZW)) { + if should_build(countries, Country::ZW) { map.insert(Country::ZW, data::zw::build(years)?); } diff --git a/src/builder.rs b/src/builder.rs index 3157412..e56d55e 100644 --- a/src/builder.rs +++ b/src/builder.rs @@ -27,12 +27,14 @@ impl Builder { } /// Build and get holiday database. + #[allow(clippy::missing_errors_doc)] pub fn build(self) -> Result { let Builder { countries, years } = self; build(countries.as_ref(), years.as_ref()) } /// Build and initialize holiday database. + #[allow(clippy::missing_errors_doc)] pub fn init(self) -> Result<()> { let map = self.build()?; init_holiday(map) diff --git a/src/country.rs b/src/country.rs index 4a9f740..e5a9cdd 100644 --- a/src/country.rs +++ b/src/country.rs @@ -539,6 +539,7 @@ impl std::fmt::Display for Country { } impl AsRef for Country { + #[allow(clippy::too_many_lines)] fn as_ref(&self) -> &str { match self { #[cfg(feature = "AO")] @@ -898,6 +899,7 @@ impl AsRef for Country { impl std::str::FromStr for Country { type Err = Error; + #[allow(clippy::too_many_lines)] fn from_str(s: &str) -> std::result::Result { Ok(match s { #[cfg(feature = "AO")] diff --git a/src/data/ae.rs b/src/data/ae.rs index c8097bd..cb5944c 100644 --- a/src/data/ae.rs +++ b/src/data/ae.rs @@ -1,8 +1,14 @@ //! United Arab Emirates +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for United Arab Emirates. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/am.rs b/src/data/am.rs index 23ad739..ab8e582 100644 --- a/src/data/am.rs +++ b/src/data/am.rs @@ -1,8 +1,14 @@ //! Armenia +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Armenia. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/ao.rs b/src/data/ao.rs index 3120ab2..2436841 100644 --- a/src/data/ao.rs +++ b/src/data/ao.rs @@ -1,8 +1,14 @@ //! Angola +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Angola. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/ar.rs b/src/data/ar.rs index 6400a45..8d20d76 100644 --- a/src/data/ar.rs +++ b/src/data/ar.rs @@ -1,8 +1,14 @@ //! Argentina +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Argentina. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/at.rs b/src/data/at.rs index 20a92fd..e539957 100644 --- a/src/data/at.rs +++ b/src/data/at.rs @@ -1,8 +1,14 @@ //! Austria +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Austria. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/au.rs b/src/data/au.rs index bec4c99..6bd6197 100644 --- a/src/data/au.rs +++ b/src/data/au.rs @@ -1,8 +1,14 @@ //! Australia +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Australia. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/aw.rs b/src/data/aw.rs index 8376aba..cc7c071 100644 --- a/src/data/aw.rs +++ b/src/data/aw.rs @@ -1,8 +1,14 @@ //! Aruba +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Aruba. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/az.rs b/src/data/az.rs index e28eb42..6011c6d 100644 --- a/src/data/az.rs +++ b/src/data/az.rs @@ -1,8 +1,14 @@ //! Azerbaijan +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Azerbaijan. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/ba.rs b/src/data/ba.rs index 994fcbc..f02b059 100644 --- a/src/data/ba.rs +++ b/src/data/ba.rs @@ -1,8 +1,14 @@ //! Bosnia and Herzegovina +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Bosnia and Herzegovina. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/bd.rs b/src/data/bd.rs index 54c87a0..977b413 100644 --- a/src/data/bd.rs +++ b/src/data/bd.rs @@ -1,8 +1,14 @@ //! Bangladesh +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Bangladesh. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/be.rs b/src/data/be.rs index 5aa6028..d6a49b8 100644 --- a/src/data/be.rs +++ b/src/data/be.rs @@ -1,8 +1,14 @@ //! Belgium +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Belgium. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/bg.rs b/src/data/bg.rs index cfb727f..431628a 100644 --- a/src/data/bg.rs +++ b/src/data/bg.rs @@ -1,8 +1,14 @@ //! Bulgaria +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Bulgaria. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/bi.rs b/src/data/bi.rs index b80860f..b75bbc0 100644 --- a/src/data/bi.rs +++ b/src/data/bi.rs @@ -1,8 +1,14 @@ //! Burundi +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Burundi. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/bo.rs b/src/data/bo.rs index e10d7be..5eb720b 100644 --- a/src/data/bo.rs +++ b/src/data/bo.rs @@ -1,8 +1,14 @@ //! Bolivia +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Bolivia. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/br.rs b/src/data/br.rs index d30c4d8..50e8ce6 100644 --- a/src/data/br.rs +++ b/src/data/br.rs @@ -1,8 +1,14 @@ //! Brazil +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Brazil. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/bw.rs b/src/data/bw.rs index 699e957..a267f9a 100644 --- a/src/data/bw.rs +++ b/src/data/bw.rs @@ -1,8 +1,14 @@ //! Botswana +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Botswana. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/by.rs b/src/data/by.rs index 311e43e..234d9bf 100644 --- a/src/data/by.rs +++ b/src/data/by.rs @@ -1,8 +1,14 @@ //! Belarus +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Belarus. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/ca.rs b/src/data/ca.rs index 20dede4..e399fff 100644 --- a/src/data/ca.rs +++ b/src/data/ca.rs @@ -1,8 +1,14 @@ //! Canada +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Canada. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/ch.rs b/src/data/ch.rs index 0042a6d..56abe16 100644 --- a/src/data/ch.rs +++ b/src/data/ch.rs @@ -1,8 +1,14 @@ //! Switzerland +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Switzerland. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/cl.rs b/src/data/cl.rs index 23959be..806aece 100644 --- a/src/data/cl.rs +++ b/src/data/cl.rs @@ -1,8 +1,14 @@ //! Chile +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Chile. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/cn.rs b/src/data/cn.rs index b75d4f3..8d1d66f 100644 --- a/src/data/cn.rs +++ b/src/data/cn.rs @@ -1,8 +1,14 @@ //! China +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for China. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/co.rs b/src/data/co.rs index f058714..aba7141 100644 --- a/src/data/co.rs +++ b/src/data/co.rs @@ -1,8 +1,14 @@ //! Colombia +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Colombia. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/cu.rs b/src/data/cu.rs index aa38d2c..5dc9b47 100644 --- a/src/data/cu.rs +++ b/src/data/cu.rs @@ -1,8 +1,14 @@ //! Cuba +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Cuba. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/cw.rs b/src/data/cw.rs index d1d7874..eed58ac 100644 --- a/src/data/cw.rs +++ b/src/data/cw.rs @@ -1,8 +1,14 @@ //! Curaçao +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Curaçao. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/cy.rs b/src/data/cy.rs index 8edd85d..1e6ad8a 100644 --- a/src/data/cy.rs +++ b/src/data/cy.rs @@ -1,8 +1,14 @@ //! Cyprus +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Cyprus. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/cz.rs b/src/data/cz.rs index 092681a..add9152 100644 --- a/src/data/cz.rs +++ b/src/data/cz.rs @@ -1,8 +1,14 @@ //! Czechia +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Czechia. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/de.rs b/src/data/de.rs index 8f73282..1001f73 100644 --- a/src/data/de.rs +++ b/src/data/de.rs @@ -1,8 +1,14 @@ //! Germany +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Germany. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/de_bb.rs b/src/data/de_bb.rs index 8f96664..1100efb 100644 --- a/src/data/de_bb.rs +++ b/src/data/de_bb.rs @@ -1,8 +1,14 @@ //! Germany (Brandenburg) +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Germany (Brandenburg). -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/de_be.rs b/src/data/de_be.rs index dae7f0a..1123f07 100644 --- a/src/data/de_be.rs +++ b/src/data/de_be.rs @@ -1,8 +1,14 @@ //! Germany (Berlin) +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Germany (Berlin). -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/de_bw.rs b/src/data/de_bw.rs index ca543cc..bad78cf 100644 --- a/src/data/de_bw.rs +++ b/src/data/de_bw.rs @@ -1,8 +1,14 @@ //! Germany (Baden-Württemberg) +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Germany (Baden-Württemberg). -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/de_by.rs b/src/data/de_by.rs index d72e274..4a0e89e 100644 --- a/src/data/de_by.rs +++ b/src/data/de_by.rs @@ -1,8 +1,14 @@ //! Germany (Bavaria (Bayern)) +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Germany (Bavaria (Bayern)). -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/de_byp.rs b/src/data/de_byp.rs index 727f674..a3ccfad 100644 --- a/src/data/de_byp.rs +++ b/src/data/de_byp.rs @@ -1,8 +1,14 @@ //! Germany (Bavaria (Bayern) with more protestants) +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Germany (Bavaria (Bayern) with more protestants). -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/de_hb.rs b/src/data/de_hb.rs index 756b4a0..dab2a7d 100644 --- a/src/data/de_hb.rs +++ b/src/data/de_hb.rs @@ -1,8 +1,14 @@ //! Germany (Bremen) +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Germany (Bremen). -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/de_he.rs b/src/data/de_he.rs index 0e0f2ee..af30529 100644 --- a/src/data/de_he.rs +++ b/src/data/de_he.rs @@ -1,8 +1,14 @@ //! Germany (Hesse (Hessen)) +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Germany (Hesse (Hessen)). -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/de_hh.rs b/src/data/de_hh.rs index b6c28ad..a3e2427 100644 --- a/src/data/de_hh.rs +++ b/src/data/de_hh.rs @@ -1,8 +1,14 @@ //! Germany (Hamburg) +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Germany (Hamburg). -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/de_mv.rs b/src/data/de_mv.rs index 3ab05f6..e1b4fa9 100644 --- a/src/data/de_mv.rs +++ b/src/data/de_mv.rs @@ -1,8 +1,14 @@ //! Germany (Mecklenburg-Vorpommern) +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Germany (Mecklenburg-Vorpommern). -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/de_ni.rs b/src/data/de_ni.rs index 4af2097..12b96cc 100644 --- a/src/data/de_ni.rs +++ b/src/data/de_ni.rs @@ -1,8 +1,14 @@ //! Germany (Lower Saxony (Niedersachsen)) +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Germany (Lower Saxony (Niedersachsen)). -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/de_nw.rs b/src/data/de_nw.rs index d239337..a1e441a 100644 --- a/src/data/de_nw.rs +++ b/src/data/de_nw.rs @@ -1,8 +1,14 @@ //! Germany (North Rhine-Westphalia (Nordrhein-Westfalen)) +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Germany (North Rhine-Westphalia (Nordrhein-Westfalen)). -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/de_rp.rs b/src/data/de_rp.rs index 393cd88..85f4954 100644 --- a/src/data/de_rp.rs +++ b/src/data/de_rp.rs @@ -1,8 +1,14 @@ //! Germany (Rhineland-Palatinate (Rheinland-Pfalz)) +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Germany (Rhineland-Palatinate (Rheinland-Pfalz)). -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/de_sh.rs b/src/data/de_sh.rs index 8dc672d..8cd6632 100644 --- a/src/data/de_sh.rs +++ b/src/data/de_sh.rs @@ -1,8 +1,14 @@ //! Germany (Schleswig-Holstein) +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Germany (Schleswig-Holstein). -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/de_sl.rs b/src/data/de_sl.rs index 845322b..7516ef4 100644 --- a/src/data/de_sl.rs +++ b/src/data/de_sl.rs @@ -1,8 +1,14 @@ //! Germany (Saarland) +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Germany (Saarland). -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/de_sn.rs b/src/data/de_sn.rs index ce21ec8..71efdcb 100644 --- a/src/data/de_sn.rs +++ b/src/data/de_sn.rs @@ -1,8 +1,14 @@ //! Germany (Saxony (Sachsen)) +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Germany (Saxony (Sachsen)). -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/de_st.rs b/src/data/de_st.rs index d292024..5409bb9 100644 --- a/src/data/de_st.rs +++ b/src/data/de_st.rs @@ -1,8 +1,14 @@ //! Germany (Saxony-Anhalt (Sachsen-Anhalt)) +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Germany (Saxony-Anhalt (Sachsen-Anhalt)). -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/de_th.rs b/src/data/de_th.rs index 4fcea72..add6b67 100644 --- a/src/data/de_th.rs +++ b/src/data/de_th.rs @@ -1,8 +1,14 @@ //! Germany (Thuringia (Thüringen)) +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Germany (Thuringia (Thüringen)). -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/dj.rs b/src/data/dj.rs index 7d06c57..9469b63 100644 --- a/src/data/dj.rs +++ b/src/data/dj.rs @@ -1,8 +1,14 @@ //! Djibouti +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Djibouti. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/dk.rs b/src/data/dk.rs index 071852d..ac88e7d 100644 --- a/src/data/dk.rs +++ b/src/data/dk.rs @@ -1,8 +1,14 @@ //! Denmark +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Denmark. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/do.rs b/src/data/do.rs index 61a30a9..4391219 100644 --- a/src/data/do.rs +++ b/src/data/do.rs @@ -1,8 +1,14 @@ //! Dominican Republic +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Dominican Republic. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/ee.rs b/src/data/ee.rs index 38d6236..238819b 100644 --- a/src/data/ee.rs +++ b/src/data/ee.rs @@ -1,8 +1,14 @@ //! Estonia +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Estonia. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/eg.rs b/src/data/eg.rs index 7b7a279..0000676 100644 --- a/src/data/eg.rs +++ b/src/data/eg.rs @@ -1,8 +1,14 @@ //! Egypt +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Egypt. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/es.rs b/src/data/es.rs index ec3c870..0d00919 100644 --- a/src/data/es.rs +++ b/src/data/es.rs @@ -1,8 +1,14 @@ //! Spain +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Spain. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/et.rs b/src/data/et.rs index 498704e..ab2f9df 100644 --- a/src/data/et.rs +++ b/src/data/et.rs @@ -1,8 +1,14 @@ //! Ethiopia +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Ethiopia. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/fi.rs b/src/data/fi.rs index 78d6965..92b1683 100644 --- a/src/data/fi.rs +++ b/src/data/fi.rs @@ -1,8 +1,14 @@ //! Finland +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Finland. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/fr.rs b/src/data/fr.rs index 6994eef..121c736 100644 --- a/src/data/fr.rs +++ b/src/data/fr.rs @@ -1,8 +1,14 @@ //! France +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for France. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/gb.rs b/src/data/gb.rs index 0986db0..9c290a3 100644 --- a/src/data/gb.rs +++ b/src/data/gb.rs @@ -1,8 +1,14 @@ //! United Kingdom +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for United Kingdom. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/ge.rs b/src/data/ge.rs index 6454078..20cac8e 100644 --- a/src/data/ge.rs +++ b/src/data/ge.rs @@ -1,8 +1,14 @@ //! Georgia +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Georgia. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/gr.rs b/src/data/gr.rs index 4e3b7ef..14b14ee 100644 --- a/src/data/gr.rs +++ b/src/data/gr.rs @@ -1,8 +1,14 @@ //! Greece +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Greece. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/hk.rs b/src/data/hk.rs index 1d5b752..825321a 100644 --- a/src/data/hk.rs +++ b/src/data/hk.rs @@ -1,8 +1,14 @@ //! Hong Kong +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Hong Kong. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/hn.rs b/src/data/hn.rs index 4aa75e0..64382a6 100644 --- a/src/data/hn.rs +++ b/src/data/hn.rs @@ -1,8 +1,14 @@ //! Honduras +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Honduras. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/hr.rs b/src/data/hr.rs index f867dc9..97cf0e0 100644 --- a/src/data/hr.rs +++ b/src/data/hr.rs @@ -1,8 +1,14 @@ //! Croatia +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Croatia. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/hu.rs b/src/data/hu.rs index 8643a93..d81f26e 100644 --- a/src/data/hu.rs +++ b/src/data/hu.rs @@ -1,8 +1,14 @@ //! Hungary +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Hungary. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/id.rs b/src/data/id.rs index a002ad4..7ee6964 100644 --- a/src/data/id.rs +++ b/src/data/id.rs @@ -1,8 +1,14 @@ //! Indonesia +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Indonesia. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/ie.rs b/src/data/ie.rs index c43e80f..758aa5c 100644 --- a/src/data/ie.rs +++ b/src/data/ie.rs @@ -1,8 +1,14 @@ //! Ireland +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Ireland. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/il.rs b/src/data/il.rs index ba5c6d1..da97da5 100644 --- a/src/data/il.rs +++ b/src/data/il.rs @@ -1,8 +1,14 @@ //! Israel +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Israel. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/im.rs b/src/data/im.rs index c8a3fd0..211d162 100644 --- a/src/data/im.rs +++ b/src/data/im.rs @@ -1,8 +1,14 @@ //! Isle of Man +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Isle of Man. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/in.rs b/src/data/in.rs index cbc2d8f..9410e99 100644 --- a/src/data/in.rs +++ b/src/data/in.rs @@ -1,8 +1,14 @@ //! India +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for India. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/is.rs b/src/data/is.rs index 1abc13a..e31401e 100644 --- a/src/data/is.rs +++ b/src/data/is.rs @@ -1,8 +1,14 @@ //! Iceland +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Iceland. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/it.rs b/src/data/it.rs index b2c68db..1151395 100644 --- a/src/data/it.rs +++ b/src/data/it.rs @@ -1,8 +1,14 @@ //! Italy +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Italy. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/jm.rs b/src/data/jm.rs index f079a80..da6baf5 100644 --- a/src/data/jm.rs +++ b/src/data/jm.rs @@ -1,8 +1,14 @@ //! Jamaica +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Jamaica. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/jp.rs b/src/data/jp.rs index c4b75d3..a64a65d 100644 --- a/src/data/jp.rs +++ b/src/data/jp.rs @@ -1,8 +1,14 @@ //! Japan +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Japan. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/ke.rs b/src/data/ke.rs index 56d80c9..0eaea8d 100644 --- a/src/data/ke.rs +++ b/src/data/ke.rs @@ -1,8 +1,14 @@ //! Kenya +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Kenya. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/kr.rs b/src/data/kr.rs index 3d1f1ee..65eebb0 100644 --- a/src/data/kr.rs +++ b/src/data/kr.rs @@ -1,8 +1,14 @@ //! South Korea +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for South Korea. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/kz.rs b/src/data/kz.rs index ce388c1..e2a1fef 100644 --- a/src/data/kz.rs +++ b/src/data/kz.rs @@ -1,8 +1,14 @@ //! Kazakhstan +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Kazakhstan. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/li.rs b/src/data/li.rs index a5e3a65..c9a2c37 100644 --- a/src/data/li.rs +++ b/src/data/li.rs @@ -1,8 +1,14 @@ //! Liechtenstein +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Liechtenstein. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/ls.rs b/src/data/ls.rs index 2c293f8..4547f6b 100644 --- a/src/data/ls.rs +++ b/src/data/ls.rs @@ -1,8 +1,14 @@ //! Lesotho +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Lesotho. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/lt.rs b/src/data/lt.rs index a4d6cc6..85d50f0 100644 --- a/src/data/lt.rs +++ b/src/data/lt.rs @@ -1,8 +1,14 @@ //! Lithuania +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Lithuania. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/lu.rs b/src/data/lu.rs index 5503876..e3278c0 100644 --- a/src/data/lu.rs +++ b/src/data/lu.rs @@ -1,8 +1,14 @@ //! Luxembourg +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Luxembourg. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/lv.rs b/src/data/lv.rs index 7f7fcdc..98e5f30 100644 --- a/src/data/lv.rs +++ b/src/data/lv.rs @@ -1,8 +1,14 @@ //! Latvia +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Latvia. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/ma.rs b/src/data/ma.rs index 95356ad..bd57faa 100644 --- a/src/data/ma.rs +++ b/src/data/ma.rs @@ -1,8 +1,14 @@ //! Morocco +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Morocco. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/md.rs b/src/data/md.rs index 9806acc..8401b3f 100644 --- a/src/data/md.rs +++ b/src/data/md.rs @@ -1,8 +1,14 @@ //! Moldova +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Moldova. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/mg.rs b/src/data/mg.rs index be2d7fb..dfa6e43 100644 --- a/src/data/mg.rs +++ b/src/data/mg.rs @@ -1,8 +1,14 @@ //! Madagascar +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Madagascar. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/mk.rs b/src/data/mk.rs index d6d0ff2..f18d492 100644 --- a/src/data/mk.rs +++ b/src/data/mk.rs @@ -1,8 +1,14 @@ //! North Macedonia +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for North Macedonia. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/mt.rs b/src/data/mt.rs index a6ddfd2..bb5a9c3 100644 --- a/src/data/mt.rs +++ b/src/data/mt.rs @@ -1,8 +1,14 @@ //! Malta +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Malta. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/mw.rs b/src/data/mw.rs index eeae613..5f6f37d 100644 --- a/src/data/mw.rs +++ b/src/data/mw.rs @@ -1,8 +1,14 @@ //! Malawi +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Malawi. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/mx.rs b/src/data/mx.rs index c8c3cc8..707caa5 100644 --- a/src/data/mx.rs +++ b/src/data/mx.rs @@ -1,8 +1,14 @@ //! Mexico +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Mexico. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/my.rs b/src/data/my.rs index 19a5350..47a3ef6 100644 --- a/src/data/my.rs +++ b/src/data/my.rs @@ -1,8 +1,14 @@ //! Malaysia +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Malaysia. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/mz.rs b/src/data/mz.rs index 85cfe33..feb5639 100644 --- a/src/data/mz.rs +++ b/src/data/mz.rs @@ -1,8 +1,14 @@ //! Mozambique +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Mozambique. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/na.rs b/src/data/na.rs index d473bca..9a4d88a 100644 --- a/src/data/na.rs +++ b/src/data/na.rs @@ -1,8 +1,14 @@ //! Namibia +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Namibia. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/ng.rs b/src/data/ng.rs index 63a39d2..a88986a 100644 --- a/src/data/ng.rs +++ b/src/data/ng.rs @@ -1,8 +1,14 @@ //! Nigeria +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Nigeria. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/ni.rs b/src/data/ni.rs index d5871a7..d907fbe 100644 --- a/src/data/ni.rs +++ b/src/data/ni.rs @@ -1,8 +1,14 @@ //! Nicaragua +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Nicaragua. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/nl.rs b/src/data/nl.rs index 2713d97..5663027 100644 --- a/src/data/nl.rs +++ b/src/data/nl.rs @@ -1,8 +1,14 @@ //! Netherlands +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Netherlands. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/no.rs b/src/data/no.rs index 5823670..8496a7e 100644 --- a/src/data/no.rs +++ b/src/data/no.rs @@ -1,8 +1,14 @@ //! Norway +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Norway. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/nz.rs b/src/data/nz.rs index 5dde3e6..3c4a16a 100644 --- a/src/data/nz.rs +++ b/src/data/nz.rs @@ -1,8 +1,14 @@ //! New Zealand +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for New Zealand. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/pe.rs b/src/data/pe.rs index b93a093..7b060a6 100644 --- a/src/data/pe.rs +++ b/src/data/pe.rs @@ -1,8 +1,14 @@ //! Peru +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Peru. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/pk.rs b/src/data/pk.rs index 4e915dc..62d121a 100644 --- a/src/data/pk.rs +++ b/src/data/pk.rs @@ -1,8 +1,14 @@ //! Pakistan +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Pakistan. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/pl.rs b/src/data/pl.rs index ae8906c..86f352a 100644 --- a/src/data/pl.rs +++ b/src/data/pl.rs @@ -1,8 +1,14 @@ //! Poland +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Poland. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/pt.rs b/src/data/pt.rs index 8bcc1e5..b959dff 100644 --- a/src/data/pt.rs +++ b/src/data/pt.rs @@ -1,8 +1,14 @@ //! Portugal +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Portugal. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/py.rs b/src/data/py.rs index 0fb6e95..427c2d8 100644 --- a/src/data/py.rs +++ b/src/data/py.rs @@ -1,8 +1,14 @@ //! Paraguay +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Paraguay. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/ro.rs b/src/data/ro.rs index bdb1ede..09e30de 100644 --- a/src/data/ro.rs +++ b/src/data/ro.rs @@ -1,8 +1,14 @@ //! Romania +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Romania. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/rs.rs b/src/data/rs.rs index bd28a7f..d1436a9 100644 --- a/src/data/rs.rs +++ b/src/data/rs.rs @@ -1,8 +1,14 @@ //! Serbia +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Serbia. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/ru.rs b/src/data/ru.rs index c7213fe..7e6e7ef 100644 --- a/src/data/ru.rs +++ b/src/data/ru.rs @@ -1,8 +1,14 @@ //! Russia +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Russia. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/sa.rs b/src/data/sa.rs index 9588e8a..1bde904 100644 --- a/src/data/sa.rs +++ b/src/data/sa.rs @@ -1,8 +1,14 @@ //! Saudi Arabia +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Saudi Arabia. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/se.rs b/src/data/se.rs index b21a368..2ae7d50 100644 --- a/src/data/se.rs +++ b/src/data/se.rs @@ -1,8 +1,14 @@ //! Sweden +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Sweden. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/sg.rs b/src/data/sg.rs index 1b7b1f7..283cac0 100644 --- a/src/data/sg.rs +++ b/src/data/sg.rs @@ -1,8 +1,14 @@ //! Singapore +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Singapore. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/si.rs b/src/data/si.rs index fe5b221..278a205 100644 --- a/src/data/si.rs +++ b/src/data/si.rs @@ -1,8 +1,14 @@ //! Slovenia +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Slovenia. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/sk.rs b/src/data/sk.rs index 1bb3c7c..46c037c 100644 --- a/src/data/sk.rs +++ b/src/data/sk.rs @@ -1,8 +1,14 @@ //! Slovakia +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Slovakia. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/sz.rs b/src/data/sz.rs index 9dea3d9..13849f6 100644 --- a/src/data/sz.rs +++ b/src/data/sz.rs @@ -1,8 +1,14 @@ //! Swaziland +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Swaziland. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/tn.rs b/src/data/tn.rs index 6d65db0..2f6024d 100644 --- a/src/data/tn.rs +++ b/src/data/tn.rs @@ -1,8 +1,14 @@ //! Tunisia +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Tunisia. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/tr.rs b/src/data/tr.rs index 5440332..136c67c 100644 --- a/src/data/tr.rs +++ b/src/data/tr.rs @@ -1,8 +1,14 @@ //! Turkey +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Turkey. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/tw.rs b/src/data/tw.rs index 1709ad6..cb2c940 100644 --- a/src/data/tw.rs +++ b/src/data/tw.rs @@ -1,8 +1,14 @@ //! Taiwan +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Taiwan. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/ua.rs b/src/data/ua.rs index fa90e5b..bc22532 100644 --- a/src/data/ua.rs +++ b/src/data/ua.rs @@ -1,8 +1,14 @@ //! Ukraine +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Ukraine. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/us.rs b/src/data/us.rs index 665b456..15b9048 100644 --- a/src/data/us.rs +++ b/src/data/us.rs @@ -1,8 +1,14 @@ //! United States +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for United States. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/us_ak.rs b/src/data/us_ak.rs index e83eafa..7508ed6 100644 --- a/src/data/us_ak.rs +++ b/src/data/us_ak.rs @@ -1,8 +1,14 @@ //! United States (Alaska) +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for United States (Alaska). -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/us_al.rs b/src/data/us_al.rs index 389c445..aca64e5 100644 --- a/src/data/us_al.rs +++ b/src/data/us_al.rs @@ -1,8 +1,14 @@ //! United States (Alabama) +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for United States (Alabama). -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/us_ar.rs b/src/data/us_ar.rs index 26893bc..ff40524 100644 --- a/src/data/us_ar.rs +++ b/src/data/us_ar.rs @@ -1,8 +1,14 @@ //! United States (Arkansas) +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for United States (Arkansas). -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/us_as.rs b/src/data/us_as.rs index 4dc1a0a..6610d0d 100644 --- a/src/data/us_as.rs +++ b/src/data/us_as.rs @@ -1,8 +1,14 @@ //! United States (American Samoa) +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for United States (American Samoa). -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/us_az.rs b/src/data/us_az.rs index c1a4df6..8658706 100644 --- a/src/data/us_az.rs +++ b/src/data/us_az.rs @@ -1,8 +1,14 @@ //! United States (Arizona) +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for United States (Arizona). -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/us_ca.rs b/src/data/us_ca.rs index 4eb3d41..0b429c7 100644 --- a/src/data/us_ca.rs +++ b/src/data/us_ca.rs @@ -1,8 +1,14 @@ //! United States (California) +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for United States (California). -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/us_co.rs b/src/data/us_co.rs index 67062b0..856248a 100644 --- a/src/data/us_co.rs +++ b/src/data/us_co.rs @@ -1,8 +1,14 @@ //! United States (Colorado) +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for United States (Colorado). -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/us_ct.rs b/src/data/us_ct.rs index 5e95ce7..613002f 100644 --- a/src/data/us_ct.rs +++ b/src/data/us_ct.rs @@ -1,8 +1,14 @@ //! United States (Connecticut) +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for United States (Connecticut). -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/us_dc.rs b/src/data/us_dc.rs index 0377e4e..95da2f0 100644 --- a/src/data/us_dc.rs +++ b/src/data/us_dc.rs @@ -1,8 +1,14 @@ //! United States (District of Columbia) +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for United States (District of Columbia). -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/us_de.rs b/src/data/us_de.rs index 56151cc..c2aa81c 100644 --- a/src/data/us_de.rs +++ b/src/data/us_de.rs @@ -1,8 +1,14 @@ //! United States (Delaware) +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for United States (Delaware). -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/us_fl.rs b/src/data/us_fl.rs index 64f5391..95f3a91 100644 --- a/src/data/us_fl.rs +++ b/src/data/us_fl.rs @@ -1,8 +1,14 @@ //! United States (Florida) +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for United States (Florida). -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/us_ga.rs b/src/data/us_ga.rs index 85a5c50..bf135dc 100644 --- a/src/data/us_ga.rs +++ b/src/data/us_ga.rs @@ -1,8 +1,14 @@ //! United States (Georgia) +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for United States (Georgia). -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/us_gu.rs b/src/data/us_gu.rs index 956b721..2958fb1 100644 --- a/src/data/us_gu.rs +++ b/src/data/us_gu.rs @@ -1,8 +1,14 @@ //! United States (Guam) +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for United States (Guam). -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/us_hi.rs b/src/data/us_hi.rs index ba0557a..7d6ab29 100644 --- a/src/data/us_hi.rs +++ b/src/data/us_hi.rs @@ -1,8 +1,14 @@ //! United States (Hawaii) +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for United States (Hawaii). -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/us_ia.rs b/src/data/us_ia.rs index 727ef67..7f5c884 100644 --- a/src/data/us_ia.rs +++ b/src/data/us_ia.rs @@ -1,8 +1,14 @@ //! United States (Iowa) +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for United States (Iowa). -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/us_id.rs b/src/data/us_id.rs index 8d59ea1..2fcddf7 100644 --- a/src/data/us_id.rs +++ b/src/data/us_id.rs @@ -1,8 +1,14 @@ //! United States (Idaho) +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for United States (Idaho). -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/us_il.rs b/src/data/us_il.rs index 024d4fa..cb3631b 100644 --- a/src/data/us_il.rs +++ b/src/data/us_il.rs @@ -1,8 +1,14 @@ //! United States (Illinois) +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for United States (Illinois). -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/us_in.rs b/src/data/us_in.rs index 79e59de..3a3636a 100644 --- a/src/data/us_in.rs +++ b/src/data/us_in.rs @@ -1,8 +1,14 @@ //! United States (Indiana) +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for United States (Indiana). -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/us_ks.rs b/src/data/us_ks.rs index 38b22f4..ac62c2a 100644 --- a/src/data/us_ks.rs +++ b/src/data/us_ks.rs @@ -1,8 +1,14 @@ //! United States (Kansas) +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for United States (Kansas). -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/us_ky.rs b/src/data/us_ky.rs index db830ce..8d61056 100644 --- a/src/data/us_ky.rs +++ b/src/data/us_ky.rs @@ -1,8 +1,14 @@ //! United States (Kentucky) +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for United States (Kentucky). -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/us_la.rs b/src/data/us_la.rs index f3a6c19..2db5de6 100644 --- a/src/data/us_la.rs +++ b/src/data/us_la.rs @@ -1,8 +1,14 @@ //! United States (Louisiana) +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for United States (Louisiana). -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/us_ma.rs b/src/data/us_ma.rs index f8bab4f..e587390 100644 --- a/src/data/us_ma.rs +++ b/src/data/us_ma.rs @@ -1,8 +1,14 @@ //! United States (Massachusetts) +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for United States (Massachusetts). -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/us_md.rs b/src/data/us_md.rs index 7bac95d..7a975ba 100644 --- a/src/data/us_md.rs +++ b/src/data/us_md.rs @@ -1,8 +1,14 @@ //! United States (Maryland) +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for United States (Maryland). -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/us_me.rs b/src/data/us_me.rs index 790b015..7901f47 100644 --- a/src/data/us_me.rs +++ b/src/data/us_me.rs @@ -1,8 +1,14 @@ //! United States (Maine) +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for United States (Maine). -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/us_mi.rs b/src/data/us_mi.rs index 5ace694..af4080e 100644 --- a/src/data/us_mi.rs +++ b/src/data/us_mi.rs @@ -1,8 +1,14 @@ //! United States (Michigan) +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for United States (Michigan). -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/us_mn.rs b/src/data/us_mn.rs index e6e7e89..4c34f2b 100644 --- a/src/data/us_mn.rs +++ b/src/data/us_mn.rs @@ -1,8 +1,14 @@ //! United States (Minnesota) +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for United States (Minnesota). -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/us_mo.rs b/src/data/us_mo.rs index 6124d82..d0126e1 100644 --- a/src/data/us_mo.rs +++ b/src/data/us_mo.rs @@ -1,8 +1,14 @@ //! United States (Missouri) +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for United States (Missouri). -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/us_mp.rs b/src/data/us_mp.rs index 4c727e7..369902b 100644 --- a/src/data/us_mp.rs +++ b/src/data/us_mp.rs @@ -1,8 +1,14 @@ //! United States (Northern Mariana Islands) +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for United States (Northern Mariana Islands). -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/us_ms.rs b/src/data/us_ms.rs index e86bd76..4f7e7d2 100644 --- a/src/data/us_ms.rs +++ b/src/data/us_ms.rs @@ -1,8 +1,14 @@ //! United States (Mississippi) +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for United States (Mississippi). -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/us_mt.rs b/src/data/us_mt.rs index 7123104..4174a1a 100644 --- a/src/data/us_mt.rs +++ b/src/data/us_mt.rs @@ -1,8 +1,14 @@ //! United States (Montana) +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for United States (Montana). -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/us_nc.rs b/src/data/us_nc.rs index 7e137cd..f9b1d86 100644 --- a/src/data/us_nc.rs +++ b/src/data/us_nc.rs @@ -1,8 +1,14 @@ //! United States (North Carolina) +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for United States (North Carolina). -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/us_nd.rs b/src/data/us_nd.rs index 9e122f8..35623bc 100644 --- a/src/data/us_nd.rs +++ b/src/data/us_nd.rs @@ -1,8 +1,14 @@ //! United States (North Dakota) +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for United States (North Dakota). -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/us_ne.rs b/src/data/us_ne.rs index f3011ad..86c2d71 100644 --- a/src/data/us_ne.rs +++ b/src/data/us_ne.rs @@ -1,8 +1,14 @@ //! United States (Nebraska) +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for United States (Nebraska). -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/us_nh.rs b/src/data/us_nh.rs index 48da392..7db2d7c 100644 --- a/src/data/us_nh.rs +++ b/src/data/us_nh.rs @@ -1,8 +1,14 @@ //! United States (New Hampshire) +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for United States (New Hampshire). -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/us_nj.rs b/src/data/us_nj.rs index f2faa1a..d62cf9c 100644 --- a/src/data/us_nj.rs +++ b/src/data/us_nj.rs @@ -1,8 +1,14 @@ //! United States (New Jersey) +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for United States (New Jersey). -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/us_nm.rs b/src/data/us_nm.rs index 474bf16..26e8b59 100644 --- a/src/data/us_nm.rs +++ b/src/data/us_nm.rs @@ -1,8 +1,14 @@ //! United States (New Mexico) +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for United States (New Mexico). -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/us_nv.rs b/src/data/us_nv.rs index 5b92de7..ce54ddf 100644 --- a/src/data/us_nv.rs +++ b/src/data/us_nv.rs @@ -1,8 +1,14 @@ //! United States (Nevada) +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for United States (Nevada). -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/us_ny.rs b/src/data/us_ny.rs index fdbb88f..52ae3c8 100644 --- a/src/data/us_ny.rs +++ b/src/data/us_ny.rs @@ -1,8 +1,14 @@ //! United States (New York) +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for United States (New York). -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/us_oh.rs b/src/data/us_oh.rs index aeffd5d..e99759f 100644 --- a/src/data/us_oh.rs +++ b/src/data/us_oh.rs @@ -1,8 +1,14 @@ //! United States (Ohio) +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for United States (Ohio). -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/us_ok.rs b/src/data/us_ok.rs index 7dabbb7..c805fbb 100644 --- a/src/data/us_ok.rs +++ b/src/data/us_ok.rs @@ -1,8 +1,14 @@ //! United States (Oklahoma) +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for United States (Oklahoma). -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/us_or.rs b/src/data/us_or.rs index e0a99c8..d59bd33 100644 --- a/src/data/us_or.rs +++ b/src/data/us_or.rs @@ -1,8 +1,14 @@ //! United States (Oregon) +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for United States (Oregon). -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/us_pa.rs b/src/data/us_pa.rs index 898b63e..3a9fc42 100644 --- a/src/data/us_pa.rs +++ b/src/data/us_pa.rs @@ -1,8 +1,14 @@ //! United States (Pennsylvania) +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for United States (Pennsylvania). -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/us_pr.rs b/src/data/us_pr.rs index 4ed249d..a01b871 100644 --- a/src/data/us_pr.rs +++ b/src/data/us_pr.rs @@ -1,8 +1,14 @@ //! United States (Puerto Rico) +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for United States (Puerto Rico). -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/us_ri.rs b/src/data/us_ri.rs index 1cb3135..50503c4 100644 --- a/src/data/us_ri.rs +++ b/src/data/us_ri.rs @@ -1,8 +1,14 @@ //! United States (Rhode Island) +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for United States (Rhode Island). -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/us_sc.rs b/src/data/us_sc.rs index 78d2d18..51d04b4 100644 --- a/src/data/us_sc.rs +++ b/src/data/us_sc.rs @@ -1,8 +1,14 @@ //! United States (South Carolina) +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for United States (South Carolina). -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/us_sd.rs b/src/data/us_sd.rs index 8d97405..ceff51e 100644 --- a/src/data/us_sd.rs +++ b/src/data/us_sd.rs @@ -1,8 +1,14 @@ //! United States (South Dakota) +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for United States (South Dakota). -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/us_tn.rs b/src/data/us_tn.rs index 0168f0a..5079ecc 100644 --- a/src/data/us_tn.rs +++ b/src/data/us_tn.rs @@ -1,8 +1,14 @@ //! United States (Tennessee) +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for United States (Tennessee). -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/us_tx.rs b/src/data/us_tx.rs index e97a6a2..3536f20 100644 --- a/src/data/us_tx.rs +++ b/src/data/us_tx.rs @@ -1,8 +1,14 @@ //! United States (Texas) +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for United States (Texas). -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/us_um.rs b/src/data/us_um.rs index 49abdb9..6887424 100644 --- a/src/data/us_um.rs +++ b/src/data/us_um.rs @@ -1,8 +1,14 @@ //! United States (United States Minor Outlying Islands) +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for United States (United States Minor Outlying Islands). -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/us_ut.rs b/src/data/us_ut.rs index 5c5c104..c70bc39 100644 --- a/src/data/us_ut.rs +++ b/src/data/us_ut.rs @@ -1,8 +1,14 @@ //! United States (Utah) +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for United States (Utah). -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/us_va.rs b/src/data/us_va.rs index 97bcaf1..3acd547 100644 --- a/src/data/us_va.rs +++ b/src/data/us_va.rs @@ -1,8 +1,14 @@ //! United States (Virginia) +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for United States (Virginia). -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/us_vi.rs b/src/data/us_vi.rs index cbd8e16..e8e9b5e 100644 --- a/src/data/us_vi.rs +++ b/src/data/us_vi.rs @@ -1,8 +1,14 @@ //! United States (Virgin Islands, U.S..) +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for United States (Virgin Islands, U.S..). -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/us_vt.rs b/src/data/us_vt.rs index e50148d..92b01be 100644 --- a/src/data/us_vt.rs +++ b/src/data/us_vt.rs @@ -1,8 +1,14 @@ //! United States (Vermont) +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for United States (Vermont). -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/us_wa.rs b/src/data/us_wa.rs index 68258cb..d3dc08e 100644 --- a/src/data/us_wa.rs +++ b/src/data/us_wa.rs @@ -1,8 +1,14 @@ //! United States (Washington) +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for United States (Washington). -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/us_wi.rs b/src/data/us_wi.rs index 5b7bbdd..f7a7e12 100644 --- a/src/data/us_wi.rs +++ b/src/data/us_wi.rs @@ -1,8 +1,14 @@ //! United States (Wisconsin) +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for United States (Wisconsin). -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/us_wv.rs b/src/data/us_wv.rs index 373eb97..7f77346 100644 --- a/src/data/us_wv.rs +++ b/src/data/us_wv.rs @@ -1,8 +1,14 @@ //! United States (West Virginia) +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for United States (West Virginia). -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/us_wy.rs b/src/data/us_wy.rs index c6df885..b0a65cc 100644 --- a/src/data/us_wy.rs +++ b/src/data/us_wy.rs @@ -1,8 +1,14 @@ //! United States (Wyoming) +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for United States (Wyoming). -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/uy.rs b/src/data/uy.rs index d8d91ff..03ed4be 100644 --- a/src/data/uy.rs +++ b/src/data/uy.rs @@ -1,8 +1,14 @@ //! Uruguay +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Uruguay. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/uz.rs b/src/data/uz.rs index c72e4a9..4dbede8 100644 --- a/src/data/uz.rs +++ b/src/data/uz.rs @@ -1,8 +1,14 @@ //! Uzbekistan +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Uzbekistan. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/ve.rs b/src/data/ve.rs index be6398f..d098be0 100644 --- a/src/data/ve.rs +++ b/src/data/ve.rs @@ -1,8 +1,14 @@ //! Venezuela +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Venezuela. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/vn.rs b/src/data/vn.rs index 807cacd..d6b84aa 100644 --- a/src/data/vn.rs +++ b/src/data/vn.rs @@ -1,8 +1,14 @@ //! Vietnam +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Vietnam. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/za.rs b/src/data/za.rs index 1d768c0..47b31e9 100644 --- a/src/data/za.rs +++ b/src/data/za.rs @@ -1,8 +1,14 @@ //! South Africa +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for South Africa. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/zm.rs b/src/data/zm.rs index 0ab4e01..9e4cf3b 100644 --- a/src/data/zm.rs +++ b/src/data/zm.rs @@ -1,8 +1,14 @@ //! Zambia +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Zambia. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/data/zw.rs b/src/data/zw.rs index 580c322..8c43b48 100644 --- a/src/data/zw.rs +++ b/src/data/zw.rs @@ -1,8 +1,14 @@ //! Zimbabwe +#[allow(clippy::wildcard_imports)] use super::*; /// Generate holiday map for Zimbabwe. -#[allow(unused_mut, unused_variables)] +#[allow( + unused_mut, + unused_variables, + clippy::too_many_lines, + clippy::missing_errors_doc +)] pub fn build( years: Option<&std::ops::Range>, ) -> Result>> { diff --git a/src/iter.rs b/src/iter.rs index 2ac1023..1c03f15 100644 --- a/src/iter.rs +++ b/src/iter.rs @@ -30,20 +30,16 @@ impl std::iter::Iterator for Iter { } /// Iterate holidays by dates. -#[allow(dead_code)] +#[allow(dead_code, clippy::missing_errors_doc)] pub fn iter(country: Country, since: NaiveDate, until: NaiveDate) -> Result { - let Some(data) = Lazy::get(&DATA) else { - return Err(Error::Uninitialized); - }; + let data = Lazy::get(&DATA).ok_or(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 map = data.get(&country).ok_or(Error::CountryNotAvailable)?; let Some(map) = map.get(&y) else { break; diff --git a/src/lib.rs b/src/lib.rs index 714a04d..a5ae8af 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -11,7 +11,7 @@ use chrono::{Datelike, NaiveDate}; use once_cell::sync::Lazy; use std::{ collections::{BTreeMap, HashMap}, - sync::RwLock, + sync::{RwLock, RwLockReadGuard}, }; /// Type alias for Holiday map. @@ -30,6 +30,7 @@ static DATA: Lazy> = Lazy::new(|| RwLock::new(HolidayMap::new /// Note that this will use quite lots of memory. Please consider using /// `Builder` to specify countries and years to load for if you're concerned /// about memory usage. +#[allow(clippy::missing_errors_doc)] pub fn init() -> Result<()> { let map = Builder::new().build()?; init_holiday(map) @@ -38,27 +39,42 @@ pub fn init() -> Result<()> { /// Get holiday by ISO 3166-1 alpha-2 country code and date. If the specified country or year is /// 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))`. +#[allow(clippy::missing_errors_doc)] pub fn get(country: Country, date: NaiveDate) -> Result> { - get_map_for_country_any_year(country, date.year(), |map| map.get(&date).cloned()) + let holiday_map = get_holiday_map()?; + + let map = get_map_for_country_and_year(&holiday_map, country, date.year())?; + + Ok(map.get(&date).cloned()) } /// Check if the specified date is a holiday. If the specified country or year is /// 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)`. +#[allow(clippy::missing_errors_doc)] pub fn contains(country: Country, date: NaiveDate) -> Result { - get_map_for_country_any_year(country, date.year(), |map| map.get(&date).is_some()) + let holiday_map = get_holiday_map()?; + + let map = get_map_for_country_and_year(&holiday_map, country, date.year())?; + + Ok(map.get(&date).is_some()) } -fn get_map_for_country_any_year( +fn get_holiday_map() -> Result> { + let data = Lazy::get(&DATA).ok_or(Error::Uninitialized)?; + data.read().map_err(|e| Error::LockError(e.to_string())) +} + +fn get_map_for_country_and_year<'a>( + holiday_map: &'a RwLockReadGuard<'a, HolidayMap>, country: Country, year: Year, - result_getter: impl FnOnce(&BTreeMap) -> T, -) -> Result { - let data = Lazy::get(&DATA).ok_or(Error::Uninitialized)?; - let data = data.read().map_err(|e| Error::LockError(e.to_string()))?; - let map = data.get(&country).ok_or(Error::CountryNotAvailable)?; +) -> Result<&'a BTreeMap> { + let map = holiday_map + .get(&country) + .ok_or(Error::CountryNotAvailable)?; let map = map.get(&year).ok_or(Error::YearNotAvailable)?; - Ok(result_getter(map)) + Ok(map) } /// Represents a holiday. @@ -105,8 +121,8 @@ pub enum Error { /// Failed to get `RwLock`. #[error("Failed to get RwLock: {0}")] LockError(String), - /// Unexpexted error occurred. - #[error("Unexpexted error occurred: {0}")] + /// Unexpected error occurred. + #[error("Unexpected error occurred: {0}")] Unexpected(String), } From 1a69985a949385d1a8aafed91f69abc7b1e4097b Mon Sep 17 00:00:00 2001 From: AD4MANTIS <31745687+AD4MANTIS@users.noreply.github.com> Date: Sun, 23 Jun 2024 15:47:23 +0200 Subject: [PATCH 3/6] Update `should_build` in gen.py --- gen.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gen.py b/gen.py index 9d7aaae..1c2d51b 100644 --- a/gen.py +++ b/gen.py @@ -247,7 +247,10 @@ class Country: use crate::{data, prelude::*, HolidayMap, Result, Year}; fn should_build(countries: Option<&HashSet>, country: Country) -> bool { - matches!(countries, Some(c) if c.contains(&country)) + match countries { + Some(c) => c.contains(&country), + None => true, + } } /// Generate holiday map for the specified countries and years. From 733656892a9bf885c5e11672144d5ef37505d51c Mon Sep 17 00:00:00 2001 From: AD4MANTIS <31745687+AD4MANTIS@users.noreply.github.com> Date: Sun, 23 Jun 2024 19:15:57 +0200 Subject: [PATCH 4/6] only region-specific holidays in subdivision file --- gen.py | 36 +- src/data/ae.rs | 193 +++---- src/data/am.rs | 193 +++---- src/data/ao.rs | 193 +++---- src/data/ar.rs | 257 +++++----- src/data/at.rs | 193 +++---- src/data/au.rs | 193 +++---- src/data/aw.rs | 193 +++---- src/data/az.rs | 238 ++++----- src/data/ba.rs | 193 +++---- src/data/bd.rs | 193 +++---- src/data/be.rs | 193 +++---- src/data/bg.rs | 1154 ++++++++++++++++++++--------------------- src/data/bi.rs | 193 +++---- src/data/bo.rs | 193 +++---- src/data/br.rs | 193 +++---- src/data/bw.rs | 193 +++---- src/data/by.rs | 193 +++---- src/data/ca.rs | 193 +++---- src/data/ch.rs | 193 +++---- src/data/cl.rs | 193 +++---- src/data/cn.rs | 193 +++---- src/data/co.rs | 193 +++---- src/data/cu.rs | 193 +++---- src/data/cw.rs | 193 +++---- src/data/cy.rs | 193 +++---- src/data/cz.rs | 193 +++---- src/data/de.rs | 193 +++---- src/data/de_bb.rs | 849 ++++++------------------------ src/data/de_be.rs | 952 +++++++--------------------------- src/data/de_bw.rs | 849 ++++++------------------------ src/data/de_by.rs | 849 ++++++------------------------ src/data/de_byp.rs | 849 ++++++------------------------ src/data/de_hb.rs | 893 ++++++-------------------------- src/data/de_he.rs | 911 ++++++--------------------------- src/data/de_hh.rs | 893 ++++++-------------------------- src/data/de_mv.rs | 894 ++++++-------------------------- src/data/de_ni.rs | 893 ++++++-------------------------- src/data/de_nw.rs | 849 ++++++------------------------ src/data/de_rp.rs | 849 ++++++------------------------ src/data/de_sh.rs | 893 ++++++-------------------------- src/data/de_sl.rs | 849 ++++++------------------------ src/data/de_sn.rs | 851 ++++++------------------------ src/data/de_st.rs | 851 ++++++------------------------ src/data/de_th.rs | 886 ++++++-------------------------- src/data/dj.rs | 193 +++---- src/data/dk.rs | 193 +++---- src/data/do.rs | 193 +++---- src/data/ee.rs | 193 +++---- src/data/eg.rs | 193 +++---- src/data/es.rs | 193 +++---- src/data/et.rs | 193 +++---- src/data/fi.rs | 193 +++---- src/data/fr.rs | 193 +++---- src/data/gb.rs | 193 +++---- src/data/ge.rs | 193 +++---- src/data/gr.rs | 193 +++---- src/data/helper.rs | 29 ++ src/data/hk.rs | 222 ++++---- src/data/hn.rs | 193 +++---- src/data/hr.rs | 510 +++++++++--------- src/data/hu.rs | 193 +++---- src/data/id.rs | 193 +++---- src/data/ie.rs | 193 +++---- src/data/il.rs | 193 +++---- src/data/im.rs | 193 +++---- src/data/in.rs | 193 +++---- src/data/is.rs | 193 +++---- src/data/it.rs | 193 +++---- src/data/jm.rs | 193 +++---- src/data/jp.rs | 193 +++---- src/data/ke.rs | 193 +++---- src/data/kr.rs | 193 +++---- src/data/kz.rs | 193 +++---- src/data/li.rs | 193 +++---- src/data/ls.rs | 193 +++---- src/data/lt.rs | 193 +++---- src/data/lu.rs | 193 +++---- src/data/lv.rs | 228 ++++----- src/data/ma.rs | 193 +++---- src/data/md.rs | 613 +++++++++++----------- src/data/mg.rs | 193 +++---- src/data/mk.rs | 193 +++---- src/data/mod.rs | 5 +- src/data/mt.rs | 193 +++---- src/data/mw.rs | 193 +++---- src/data/mx.rs | 193 +++---- src/data/my.rs | 193 +++---- src/data/mz.rs | 193 +++---- src/data/na.rs | 193 +++---- src/data/ng.rs | 193 +++---- src/data/ni.rs | 193 +++---- src/data/nl.rs | 193 +++---- src/data/no.rs | 193 +++---- src/data/nz.rs | 193 +++---- src/data/pe.rs | 193 +++---- src/data/pk.rs | 193 +++---- src/data/pl.rs | 193 +++---- src/data/pt.rs | 193 +++---- src/data/py.rs | 193 +++---- src/data/ro.rs | 193 +++---- src/data/rs.rs | 193 +++---- src/data/ru.rs | 193 +++---- src/data/sa.rs | 193 +++---- src/data/se.rs | 193 +++---- src/data/sg.rs | 193 +++---- src/data/si.rs | 193 +++---- src/data/sk.rs | 193 +++---- src/data/sz.rs | 193 +++---- src/data/tn.rs | 193 +++---- src/data/tr.rs | 193 +++---- src/data/tw.rs | 193 +++---- src/data/ua.rs | 145 +++--- src/data/us.rs | 193 +++---- src/data/us_ak.rs | 1020 ++++++------------------------------ src/data/us_al.rs | 1065 ++++++-------------------------------- src/data/us_ar.rs | 972 ++++++----------------------------- src/data/us_as.rs | 1040 +++++++------------------------------ src/data/us_az.rs | 1003 ++++++------------------------------ src/data/us_ca.rs | 950 ++++++---------------------------- src/data/us_co.rs | 1002 ++++++------------------------------ src/data/us_ct.rs | 972 ++++++----------------------------- src/data/us_dc.rs | 1042 ++++++------------------------------- src/data/us_de.rs | 817 ++++++----------------------- src/data/us_fl.rs | 941 ++++++++-------------------------- src/data/us_ga.rs | 848 ++++++------------------------ src/data/us_gu.rs | 941 ++++++---------------------------- src/data/us_hi.rs | 941 ++++++---------------------------- src/data/us_ia.rs | 985 ++++++----------------------------- src/data/us_id.rs | 1003 ++++++------------------------------ src/data/us_il.rs | 972 ++++++----------------------------- src/data/us_in.rs | 988 ++++++----------------------------- src/data/us_ks.rs | 992 ++++++----------------------------- src/data/us_ky.rs | 971 ++++++----------------------------- src/data/us_la.rs | 941 ++++++---------------------------- src/data/us_ma.rs | 972 ++++++----------------------------- src/data/us_md.rs | 1126 ++++++++-------------------------------- src/data/us_me.rs | 1070 ++++++-------------------------------- src/data/us_mi.rs | 970 ++++++----------------------------- src/data/us_mn.rs | 972 ++++++----------------------------- src/data/us_mo.rs | 1018 ++++++------------------------------ src/data/us_mp.rs | 1065 ++++++-------------------------------- src/data/us_ms.rs | 1189 +++++++++--------------------------------- src/data/us_mt.rs | 1015 ++++++------------------------------ src/data/us_nc.rs | 941 ++++++---------------------------- src/data/us_nd.rs | 972 ++++++----------------------------- src/data/us_ne.rs | 1067 ++++++-------------------------------- src/data/us_nh.rs | 1093 ++++++++------------------------------- src/data/us_nj.rs | 972 ++++++----------------------------- src/data/us_nm.rs | 946 ++++++---------------------------- src/data/us_nv.rs | 941 ++++++---------------------------- src/data/us_ny.rs | 978 ++++++----------------------------- src/data/us_oh.rs | 1003 ++++++------------------------------ src/data/us_ok.rs | 1189 +++++++++--------------------------------- src/data/us_or.rs | 972 ++++++----------------------------- src/data/us_pa.rs | 1220 +++++++++----------------------------------- src/data/us_pr.rs | 848 ++++++------------------------ src/data/us_ri.rs | 1061 ++++++-------------------------------- src/data/us_sc.rs | 1189 +++++++++--------------------------------- src/data/us_sd.rs | 1096 ++++++--------------------------------- src/data/us_tn.rs | 1003 ++++++------------------------------ src/data/us_tx.rs | 941 ++++++---------------------------- src/data/us_um.rs | 972 ++++++----------------------------- src/data/us_ut.rs | 1018 ++++++------------------------------ src/data/us_va.rs | 1049 ++++++------------------------------- src/data/us_vi.rs | 972 ++++++----------------------------- src/data/us_vt.rs | 941 ++++++---------------------------- src/data/us_wa.rs | 972 ++++++----------------------------- src/data/us_wi.rs | 1046 ++++++++----------------------------- src/data/us_wv.rs | 972 ++++++----------------------------- src/data/us_wy.rs | 972 ++++++----------------------------- src/data/uy.rs | 193 +++---- src/data/uz.rs | 193 +++---- src/data/ve.rs | 193 +++---- src/data/vn.rs | 193 +++---- src/data/za.rs | 193 +++---- src/data/zm.rs | 193 +++---- src/data/zw.rs | 193 +++---- tests/test.rs | 5 +- 179 files changed, 23274 insertions(+), 70126 deletions(-) diff --git a/gen.py b/gen.py index 1c2d51b..2d327ae 100644 --- a/gen.py +++ b/gen.py @@ -273,11 +273,10 @@ class Country: country_mod = """ mod helper; -use crate::{prelude::*, Holiday, NaiveDateExt, Result, Year}; -use helper::build_year; +use crate::{prelude::*, HolidayPerCountryMap, NaiveDateExt, Result, Year}; +use helper::{build_subdivision_year, build_year}; use chrono::NaiveDate; -use std::collections::BTreeMap; use std::collections::HashMap; {% for country in countries %} @@ -291,24 +290,40 @@ class Country: #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "{{country|display_name}}"; +const COUNTY_CODE: Country = Country::{{country|enum_name}}; + /// Generate holiday map for {{country|display_name}}. #[allow(unused_mut, unused_variables, clippy::too_many_lines, clippy::missing_errors_doc)] -pub fn build(years: Option<&std::ops::Range>) -> Result>> { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); +{% if country.subdivision_code != None %} + let mut national_holidays = de::build(years)?; +{%- endif %} -{% for year in years %} +{%- for year in years %} {% if holiday(years=year, subdiv=country.subdivision_code) %} + +{%- if country.subdivision_code != None %} + build_subdivision_year( + years, + {{year}}, + &mut national_holidays, +{%- else %} build_year( years, {{year}}, - vec![ -{% for date, name in holiday(years=year, subdiv=country.subdivision_code).items() %} - (NaiveDate::from_ymd_res({{date|year}}, {{date|month}}, {{date|day}})?, "{{name}}"), +{%- endif %} + [ +{%- for date, name in holiday(years=year, subdiv=country.subdivision_code).items() %} +{%- if country.subdivision_code == None or date not in holiday(years=year) %} + (NaiveDate::from_ymd_res({{date|year}}, {{date|month}}, {{date|day}})?, "{{name}}"), +{%- endif %} {%- endfor %} ], &mut map, - Country::{{country|enum_name}}, - "{{country|display_name}}", + COUNTY_CODE, + COUNTY_NAME, ); {%- endif %} {%- endfor %} @@ -321,7 +336,6 @@ class Country: def lower(code: str) -> str: return code.lower() - def escape(code: str) -> str: rust_keywords = ["as", "in", "do"] lower = code.lower() diff --git a/src/data/ae.rs b/src/data/ae.rs index cb5944c..8d81da6 100644 --- a/src/data/ae.rs +++ b/src/data/ae.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "United Arab Emirates"; +const COUNTY_CODE: Country = Country::AE; + /// Generate holiday map for United Arab Emirates. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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)?, "اليوم الوطني"), @@ -63,14 +64,14 @@ pub fn build( ), ], &mut map, - Country::AE, - "United Arab Emirates", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "اليوم الوطني"), @@ -107,14 +108,14 @@ pub fn build( ), ], &mut map, - Country::AE, - "United Arab Emirates", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "اليوم الوطني"), @@ -151,14 +152,14 @@ pub fn build( ), ], &mut map, - Country::AE, - "United Arab Emirates", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "اليوم الوطني"), @@ -195,14 +196,14 @@ pub fn build( ), ], &mut map, - Country::AE, - "United Arab Emirates", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "اليوم الوطني"), @@ -239,14 +240,14 @@ pub fn build( ), ], &mut map, - Country::AE, - "United Arab Emirates", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "اليوم الوطني"), @@ -280,14 +281,14 @@ pub fn build( ), ], &mut map, - Country::AE, - "United Arab Emirates", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "اليوم الوطني"), @@ -326,14 +327,14 @@ pub fn build( ), ], &mut map, - Country::AE, - "United Arab Emirates", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2007, - vec![ + [ ( NaiveDate::from_ymd_res(2007, 1, 1)?, "(تقدير) عطلة عيد الأضحى; رأس السنة الميلادية", @@ -377,14 +378,14 @@ pub fn build( ), ], &mut map, - Country::AE, - "United Arab Emirates", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "اليوم الوطني"), @@ -425,14 +426,14 @@ pub fn build( ), ], &mut map, - Country::AE, - "United Arab Emirates", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "اليوم الوطني"), @@ -469,14 +470,14 @@ pub fn build( ), ], &mut map, - Country::AE, - "United Arab Emirates", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "اليوم الوطني"), @@ -510,14 +511,14 @@ pub fn build( ), ], &mut map, - Country::AE, - "United Arab Emirates", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "اليوم الوطني"), @@ -554,14 +555,14 @@ pub fn build( ), ], &mut map, - Country::AE, - "United Arab Emirates", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "اليوم الوطني"), @@ -598,14 +599,14 @@ pub fn build( ), ], &mut map, - Country::AE, - "United Arab Emirates", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "اليوم الوطني"), @@ -639,14 +640,14 @@ pub fn build( ), ], &mut map, - Country::AE, - "United Arab Emirates", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "اليوم الوطني"), @@ -683,14 +684,14 @@ pub fn build( ), ], &mut map, - Country::AE, - "United Arab Emirates", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "اليوم الوطني"), @@ -732,14 +733,14 @@ pub fn build( ), ], &mut map, - Country::AE, - "United Arab Emirates", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "اليوم الوطني"), @@ -774,14 +775,14 @@ pub fn build( ), ], &mut map, - Country::AE, - "United Arab Emirates", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2017, - vec![ + [ (NaiveDate::from_ymd_res(2017, 1, 1)?, "رأس السنة الميلادية"), ( NaiveDate::from_ymd_res(2017, 11, 30)?, @@ -800,14 +801,14 @@ pub fn build( (NaiveDate::from_ymd_res(2017, 4, 23)?, "ليلة المعراج"), ], &mut map, - Country::AE, - "United Arab Emirates", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "اليوم الوطني"), @@ -824,14 +825,14 @@ pub fn build( (NaiveDate::from_ymd_res(2018, 11, 19)?, "عيد المولد النبوي"), ], &mut map, - Country::AE, - "United Arab Emirates", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "اليوم الوطني"), @@ -848,14 +849,14 @@ pub fn build( (NaiveDate::from_ymd_res(2019, 11, 9)?, "عيد المولد النبوي"), ], &mut map, - Country::AE, - "United Arab Emirates", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "اليوم الوطني"), @@ -872,14 +873,14 @@ pub fn build( (NaiveDate::from_ymd_res(2020, 10, 29)?, "عيد المولد النبوي"), ], &mut map, - Country::AE, - "United Arab Emirates", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "اليوم الوطني"), @@ -896,14 +897,14 @@ pub fn build( (NaiveDate::from_ymd_res(2021, 10, 21)?, "عيد المولد النبوي"), ], &mut map, - Country::AE, - "United Arab Emirates", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "اليوم الوطني"), @@ -920,14 +921,14 @@ pub fn build( (NaiveDate::from_ymd_res(2022, 10, 8)?, "عيد المولد النبوي"), ], &mut map, - Country::AE, - "United Arab Emirates", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "اليوم الوطني"), @@ -943,14 +944,14 @@ pub fn build( (NaiveDate::from_ymd_res(2023, 9, 29)?, "عيد المولد النبوي"), ], &mut map, - Country::AE, - "United Arab Emirates", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "اليوم الوطني"), @@ -978,14 +979,14 @@ pub fn build( ), ], &mut map, - Country::AE, - "United Arab Emirates", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "اليوم الوطني"), @@ -1022,14 +1023,14 @@ pub fn build( ), ], &mut map, - Country::AE, - "United Arab Emirates", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "اليوم الوطني"), @@ -1066,14 +1067,14 @@ pub fn build( ), ], &mut map, - Country::AE, - "United Arab Emirates", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "اليوم الوطني"), @@ -1110,14 +1111,14 @@ pub fn build( ), ], &mut map, - Country::AE, - "United Arab Emirates", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "اليوم الوطني"), @@ -1154,14 +1155,14 @@ pub fn build( ), ], &mut map, - Country::AE, - "United Arab Emirates", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "اليوم الوطني"), @@ -1198,14 +1199,14 @@ pub fn build( ), ], &mut map, - Country::AE, - "United Arab Emirates", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "اليوم الوطني"), @@ -1242,8 +1243,8 @@ pub fn build( ), ], &mut map, - Country::AE, - "United Arab Emirates", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/am.rs b/src/data/am.rs index ab8e582..8cc8e8a 100644 --- a/src/data/am.rs +++ b/src/data/am.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Armenia"; +const COUNTY_CODE: Country = Country::AM; + /// Generate holiday map for Armenia. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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)?, "Նոր տարվա օր"), ( @@ -43,14 +44,14 @@ pub fn build( (NaiveDate::from_ymd_res(2000, 12, 31)?, "Նոր տարվա գիշեր"), ], &mut map, - Country::AM, - "Armenia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2001, - vec![ + [ (NaiveDate::from_ymd_res(2001, 1, 1)?, "Նոր տարվա օր"), (NaiveDate::from_ymd_res(2001, 1, 2)?, "Նոր տարվա օր"), ( @@ -80,14 +81,14 @@ pub fn build( (NaiveDate::from_ymd_res(2001, 12, 31)?, "Նոր տարվա գիշեր"), ], &mut map, - Country::AM, - "Armenia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2002, - vec![ + [ (NaiveDate::from_ymd_res(2002, 1, 1)?, "Նոր տարվա օր"), (NaiveDate::from_ymd_res(2002, 1, 2)?, "Նոր տարվա օր"), ( @@ -110,14 +111,14 @@ pub fn build( (NaiveDate::from_ymd_res(2002, 12, 31)?, "Նոր տարվա գիշեր"), ], &mut map, - Country::AM, - "Armenia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2003, - vec![ + [ (NaiveDate::from_ymd_res(2003, 1, 1)?, "Նոր տարվա օր"), (NaiveDate::from_ymd_res(2003, 1, 2)?, "Նոր տարվա օր"), ( @@ -141,14 +142,14 @@ pub fn build( (NaiveDate::from_ymd_res(2003, 12, 31)?, "Նոր տարվա գիշեր"), ], &mut map, - Country::AM, - "Armenia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2004, - vec![ + [ (NaiveDate::from_ymd_res(2004, 1, 1)?, "Նոր տարվա օր"), (NaiveDate::from_ymd_res(2004, 1, 2)?, "Նոր տարվա օր"), ( @@ -172,14 +173,14 @@ pub fn build( (NaiveDate::from_ymd_res(2004, 12, 31)?, "Նոր տարվա գիշեր"), ], &mut map, - Country::AM, - "Armenia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2005, - vec![ + [ (NaiveDate::from_ymd_res(2005, 1, 1)?, "Նոր տարվա օր"), (NaiveDate::from_ymd_res(2005, 1, 2)?, "Նոր տարվա օր"), ( @@ -203,14 +204,14 @@ pub fn build( (NaiveDate::from_ymd_res(2005, 12, 31)?, "Նոր տարվա գիշեր"), ], &mut map, - Country::AM, - "Armenia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2006, - vec![ + [ (NaiveDate::from_ymd_res(2006, 1, 1)?, "Նոր տարվա օր"), (NaiveDate::from_ymd_res(2006, 1, 2)?, "Նոր տարվա օր"), ( @@ -234,14 +235,14 @@ pub fn build( (NaiveDate::from_ymd_res(2006, 12, 31)?, "Նոր տարվա գիշեր"), ], &mut map, - Country::AM, - "Armenia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2007, - vec![ + [ (NaiveDate::from_ymd_res(2007, 1, 1)?, "Նոր տարվա օր"), (NaiveDate::from_ymd_res(2007, 1, 2)?, "Նոր տարվա օր"), ( @@ -265,14 +266,14 @@ pub fn build( (NaiveDate::from_ymd_res(2007, 12, 31)?, "Նոր տարվա գիշեր"), ], &mut map, - Country::AM, - "Armenia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2008, - vec![ + [ (NaiveDate::from_ymd_res(2008, 1, 1)?, "Նոր տարվա օր"), (NaiveDate::from_ymd_res(2008, 1, 2)?, "Նոր տարվա օր"), ( @@ -296,14 +297,14 @@ pub fn build( (NaiveDate::from_ymd_res(2008, 12, 31)?, "Նոր տարվա գիշեր"), ], &mut map, - Country::AM, - "Armenia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2009, - vec![ + [ (NaiveDate::from_ymd_res(2009, 1, 1)?, "Նոր տարվա օր"), (NaiveDate::from_ymd_res(2009, 1, 2)?, "Նոր տարվա օր"), ( @@ -327,14 +328,14 @@ pub fn build( (NaiveDate::from_ymd_res(2009, 12, 31)?, "Նոր տարվա գիշեր"), ], &mut map, - Country::AM, - "Armenia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2010, - vec![ + [ (NaiveDate::from_ymd_res(2010, 1, 1)?, "Նոր տարվա օր"), (NaiveDate::from_ymd_res(2010, 1, 2)?, "Նոր տարվա օր"), ( @@ -362,14 +363,14 @@ pub fn build( (NaiveDate::from_ymd_res(2010, 12, 31)?, "Նոր տարվա գիշեր"), ], &mut map, - Country::AM, - "Armenia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2011, - vec![ + [ (NaiveDate::from_ymd_res(2011, 1, 1)?, "Նոր տարվա օր"), (NaiveDate::from_ymd_res(2011, 1, 2)?, "Նոր տարվա օր"), ( @@ -397,14 +398,14 @@ pub fn build( (NaiveDate::from_ymd_res(2011, 12, 31)?, "Նոր տարվա գիշեր"), ], &mut map, - Country::AM, - "Armenia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2012, - vec![ + [ (NaiveDate::from_ymd_res(2012, 1, 1)?, "Նոր տարվա օր"), (NaiveDate::from_ymd_res(2012, 1, 2)?, "Նոր տարվա օր"), ( @@ -432,14 +433,14 @@ pub fn build( (NaiveDate::from_ymd_res(2012, 12, 31)?, "Նոր տարվա գիշեր"), ], &mut map, - Country::AM, - "Armenia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2013, - vec![ + [ (NaiveDate::from_ymd_res(2013, 1, 1)?, "Նոր տարվա օր"), (NaiveDate::from_ymd_res(2013, 1, 2)?, "Նոր տարվա օր"), ( @@ -467,14 +468,14 @@ pub fn build( (NaiveDate::from_ymd_res(2013, 12, 31)?, "Նոր տարվա գիշեր"), ], &mut map, - Country::AM, - "Armenia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2014, - vec![ + [ (NaiveDate::from_ymd_res(2014, 1, 1)?, "Նոր տարվա օր"), (NaiveDate::from_ymd_res(2014, 1, 2)?, "Նոր տարվա օր"), ( @@ -502,14 +503,14 @@ pub fn build( (NaiveDate::from_ymd_res(2014, 12, 31)?, "Նոր տարվա գիշեր"), ], &mut map, - Country::AM, - "Armenia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2015, - vec![ + [ (NaiveDate::from_ymd_res(2015, 1, 1)?, "Նոր տարվա օր"), (NaiveDate::from_ymd_res(2015, 1, 2)?, "Նոր տարվա օր"), ( @@ -537,14 +538,14 @@ pub fn build( (NaiveDate::from_ymd_res(2015, 12, 31)?, "Նոր տարվա գիշեր"), ], &mut map, - Country::AM, - "Armenia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2016, - vec![ + [ (NaiveDate::from_ymd_res(2016, 1, 1)?, "Նոր տարվա օր"), (NaiveDate::from_ymd_res(2016, 1, 2)?, "Նոր տարվա օր"), ( @@ -572,14 +573,14 @@ pub fn build( (NaiveDate::from_ymd_res(2016, 12, 31)?, "Նոր տարվա գիշեր"), ], &mut map, - Country::AM, - "Armenia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2017, - vec![ + [ (NaiveDate::from_ymd_res(2017, 1, 1)?, "Նոր տարվա օր"), (NaiveDate::from_ymd_res(2017, 1, 2)?, "Նոր տարվա օր"), ( @@ -607,14 +608,14 @@ pub fn build( (NaiveDate::from_ymd_res(2017, 12, 31)?, "Նոր տարվա գիշեր"), ], &mut map, - Country::AM, - "Armenia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2018, - vec![ + [ (NaiveDate::from_ymd_res(2018, 1, 1)?, "Նոր տարվա օր"), (NaiveDate::from_ymd_res(2018, 1, 2)?, "Նոր տարվա օր"), ( @@ -642,14 +643,14 @@ pub fn build( (NaiveDate::from_ymd_res(2018, 12, 31)?, "Նոր տարվա գիշեր"), ], &mut map, - Country::AM, - "Armenia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2019, - vec![ + [ (NaiveDate::from_ymd_res(2019, 1, 1)?, "Նոր տարվա օր"), (NaiveDate::from_ymd_res(2019, 1, 2)?, "Նոր տարվա օր"), ( @@ -677,14 +678,14 @@ pub fn build( (NaiveDate::from_ymd_res(2019, 12, 31)?, "Նոր տարվա գիշեր"), ], &mut map, - Country::AM, - "Armenia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2020, - vec![ + [ (NaiveDate::from_ymd_res(2020, 1, 1)?, "Նոր տարվա օր"), (NaiveDate::from_ymd_res(2020, 1, 2)?, "Նոր տարվա օր"), ( @@ -712,14 +713,14 @@ pub fn build( (NaiveDate::from_ymd_res(2020, 12, 31)?, "Նոր տարվա գիշեր"), ], &mut map, - Country::AM, - "Armenia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2021, - vec![ + [ (NaiveDate::from_ymd_res(2021, 1, 1)?, "Նոր տարվա օր"), (NaiveDate::from_ymd_res(2021, 1, 2)?, "Նոր տարվա օր"), ( @@ -747,14 +748,14 @@ pub fn build( (NaiveDate::from_ymd_res(2021, 12, 31)?, "Նոր տարվա գիշեր"), ], &mut map, - Country::AM, - "Armenia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2022, - vec![ + [ (NaiveDate::from_ymd_res(2022, 1, 1)?, "Նոր տարվա օր"), (NaiveDate::from_ymd_res(2022, 1, 2)?, "Նոր տարվա օր"), ( @@ -778,14 +779,14 @@ pub fn build( (NaiveDate::from_ymd_res(2022, 12, 31)?, "Նոր տարվա գիշեր"), ], &mut map, - Country::AM, - "Armenia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2023, - vec![ + [ (NaiveDate::from_ymd_res(2023, 1, 1)?, "Նոր տարվա օր"), (NaiveDate::from_ymd_res(2023, 1, 2)?, "Նոր տարվա օր"), ( @@ -809,14 +810,14 @@ pub fn build( (NaiveDate::from_ymd_res(2023, 12, 31)?, "Նոր տարվա գիշեր"), ], &mut map, - Country::AM, - "Armenia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2024, - vec![ + [ (NaiveDate::from_ymd_res(2024, 1, 1)?, "Նոր տարվա օր"), (NaiveDate::from_ymd_res(2024, 1, 2)?, "Նոր տարվա օր"), ( @@ -840,14 +841,14 @@ pub fn build( (NaiveDate::from_ymd_res(2024, 12, 31)?, "Նոր տարվա գիշեր"), ], &mut map, - Country::AM, - "Armenia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2025, - vec![ + [ (NaiveDate::from_ymd_res(2025, 1, 1)?, "Նոր տարվա օր"), (NaiveDate::from_ymd_res(2025, 1, 2)?, "Նոր տարվա օր"), ( @@ -871,14 +872,14 @@ pub fn build( (NaiveDate::from_ymd_res(2025, 12, 31)?, "Նոր տարվա գիշեր"), ], &mut map, - Country::AM, - "Armenia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2026, - vec![ + [ (NaiveDate::from_ymd_res(2026, 1, 1)?, "Նոր տարվա օր"), (NaiveDate::from_ymd_res(2026, 1, 2)?, "Նոր տարվա օր"), ( @@ -902,14 +903,14 @@ pub fn build( (NaiveDate::from_ymd_res(2026, 12, 31)?, "Նոր տարվա գիշեր"), ], &mut map, - Country::AM, - "Armenia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2027, - vec![ + [ (NaiveDate::from_ymd_res(2027, 1, 1)?, "Նոր տարվա օր"), (NaiveDate::from_ymd_res(2027, 1, 2)?, "Նոր տարվա օր"), ( @@ -933,14 +934,14 @@ pub fn build( (NaiveDate::from_ymd_res(2027, 12, 31)?, "Նոր տարվա գիշեր"), ], &mut map, - Country::AM, - "Armenia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2028, - vec![ + [ (NaiveDate::from_ymd_res(2028, 1, 1)?, "Նոր տարվա օր"), (NaiveDate::from_ymd_res(2028, 1, 2)?, "Նոր տարվա օր"), ( @@ -964,14 +965,14 @@ pub fn build( (NaiveDate::from_ymd_res(2028, 12, 31)?, "Նոր տարվա գիշեր"), ], &mut map, - Country::AM, - "Armenia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2029, - vec![ + [ (NaiveDate::from_ymd_res(2029, 1, 1)?, "Նոր տարվա օր"), (NaiveDate::from_ymd_res(2029, 1, 2)?, "Նոր տարվա օր"), ( @@ -995,14 +996,14 @@ pub fn build( (NaiveDate::from_ymd_res(2029, 12, 31)?, "Նոր տարվա գիշեր"), ], &mut map, - Country::AM, - "Armenia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2030, - vec![ + [ (NaiveDate::from_ymd_res(2030, 1, 1)?, "Նոր տարվա օր"), (NaiveDate::from_ymd_res(2030, 1, 2)?, "Նոր տարվա օր"), ( @@ -1026,8 +1027,8 @@ pub fn build( (NaiveDate::from_ymd_res(2030, 12, 31)?, "Նոր տարվա գիշեր"), ], &mut map, - Country::AM, - "Armenia", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/ao.rs b/src/data/ao.rs index 2436841..df78424 100644 --- a/src/data/ao.rs +++ b/src/data/ao.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Angola"; +const COUNTY_CODE: Country = Country::AO; + /// Generate holiday map for Angola. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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)?, @@ -57,14 +58,14 @@ pub fn build( (NaiveDate::from_ymd_res(2000, 12, 25)?, "Dia do Natal"), ], &mut map, - Country::AO, - "Angola", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2001, - vec![ + [ (NaiveDate::from_ymd_res(2001, 1, 1)?, "Dia do Ano Novo"), ( NaiveDate::from_ymd_res(2001, 1, 4)?, @@ -109,14 +110,14 @@ pub fn build( (NaiveDate::from_ymd_res(2001, 12, 25)?, "Dia do Natal"), ], &mut map, - Country::AO, - "Angola", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2002, - vec![ + [ (NaiveDate::from_ymd_res(2002, 1, 1)?, "Dia do Ano Novo"), ( NaiveDate::from_ymd_res(2002, 1, 4)?, @@ -153,14 +154,14 @@ pub fn build( (NaiveDate::from_ymd_res(2002, 12, 25)?, "Dia do Natal"), ], &mut map, - Country::AO, - "Angola", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2003, - vec![ + [ (NaiveDate::from_ymd_res(2003, 1, 1)?, "Dia do Ano Novo"), ( NaiveDate::from_ymd_res(2003, 1, 4)?, @@ -213,14 +214,14 @@ pub fn build( (NaiveDate::from_ymd_res(2003, 12, 25)?, "Dia do Natal"), ], &mut map, - Country::AO, - "Angola", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2004, - vec![ + [ (NaiveDate::from_ymd_res(2004, 1, 1)?, "Dia do Ano Novo"), ( NaiveDate::from_ymd_res(2004, 1, 4)?, @@ -269,14 +270,14 @@ pub fn build( (NaiveDate::from_ymd_res(2004, 12, 25)?, "Dia do Natal"), ], &mut map, - Country::AO, - "Angola", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2005, - vec![ + [ (NaiveDate::from_ymd_res(2005, 1, 1)?, "Dia do Ano Novo"), ( NaiveDate::from_ymd_res(2005, 1, 4)?, @@ -325,14 +326,14 @@ pub fn build( ), ], &mut map, - Country::AO, - "Angola", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2006, - vec![ + [ (NaiveDate::from_ymd_res(2006, 1, 1)?, "Dia do Ano Novo"), ( NaiveDate::from_ymd_res(2006, 1, 2)?, @@ -381,14 +382,14 @@ pub fn build( (NaiveDate::from_ymd_res(2006, 12, 25)?, "Dia do Natal"), ], &mut map, - Country::AO, - "Angola", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2007, - vec![ + [ (NaiveDate::from_ymd_res(2007, 1, 1)?, "Dia do Ano Novo"), ( NaiveDate::from_ymd_res(2007, 1, 4)?, @@ -437,14 +438,14 @@ pub fn build( (NaiveDate::from_ymd_res(2007, 12, 25)?, "Dia do Natal"), ], &mut map, - Country::AO, - "Angola", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2008, - vec![ + [ (NaiveDate::from_ymd_res(2008, 1, 1)?, "Dia do Ano Novo"), ( NaiveDate::from_ymd_res(2008, 1, 4)?, @@ -497,14 +498,14 @@ pub fn build( (NaiveDate::from_ymd_res(2008, 12, 25)?, "Dia do Natal"), ], &mut map, - Country::AO, - "Angola", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2009, - vec![ + [ (NaiveDate::from_ymd_res(2009, 1, 1)?, "Dia do Ano Novo"), ( NaiveDate::from_ymd_res(2009, 1, 4)?, @@ -553,14 +554,14 @@ pub fn build( (NaiveDate::from_ymd_res(2009, 12, 25)?, "Dia do Natal"), ], &mut map, - Country::AO, - "Angola", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2010, - vec![ + [ (NaiveDate::from_ymd_res(2010, 1, 1)?, "Dia do Ano Novo"), ( NaiveDate::from_ymd_res(2010, 1, 4)?, @@ -605,14 +606,14 @@ pub fn build( (NaiveDate::from_ymd_res(2010, 12, 25)?, "Dia do Natal"), ], &mut map, - Country::AO, - "Angola", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2011, - vec![ + [ (NaiveDate::from_ymd_res(2011, 1, 1)?, "Dia do Ano Novo"), ( NaiveDate::from_ymd_res(2011, 1, 4)?, @@ -654,14 +655,14 @@ pub fn build( ), ], &mut map, - Country::AO, - "Angola", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2012, - vec![ + [ (NaiveDate::from_ymd_res(2012, 1, 1)?, "Dia do Ano Novo"), ( NaiveDate::from_ymd_res(2012, 2, 4)?, @@ -700,14 +701,14 @@ pub fn build( ), ], &mut map, - Country::AO, - "Angola", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2013, - vec![ + [ (NaiveDate::from_ymd_res(2013, 1, 1)?, "Dia do Ano Novo"), ( NaiveDate::from_ymd_res(2013, 2, 4)?, @@ -742,14 +743,14 @@ pub fn build( ), ], &mut map, - Country::AO, - "Angola", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2014, - vec![ + [ (NaiveDate::from_ymd_res(2014, 1, 1)?, "Dia do Ano Novo"), ( NaiveDate::from_ymd_res(2014, 2, 4)?, @@ -784,14 +785,14 @@ pub fn build( ), ], &mut map, - Country::AO, - "Angola", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2015, - vec![ + [ (NaiveDate::from_ymd_res(2015, 1, 1)?, "Dia do Ano Novo"), ( NaiveDate::from_ymd_res(2015, 2, 4)?, @@ -830,14 +831,14 @@ pub fn build( ), ], &mut map, - Country::AO, - "Angola", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2016, - vec![ + [ (NaiveDate::from_ymd_res(2016, 1, 1)?, "Dia do Ano Novo"), ( NaiveDate::from_ymd_res(2016, 2, 4)?, @@ -876,14 +877,14 @@ pub fn build( ), ], &mut map, - Country::AO, - "Angola", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2017, - vec![ + [ (NaiveDate::from_ymd_res(2017, 1, 1)?, "Dia do Ano Novo"), ( NaiveDate::from_ymd_res(2017, 2, 4)?, @@ -926,14 +927,14 @@ pub fn build( ), ], &mut map, - Country::AO, - "Angola", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2018, - vec![ + [ (NaiveDate::from_ymd_res(2018, 1, 1)?, "Dia do Ano Novo"), ( NaiveDate::from_ymd_res(2018, 12, 31)?, @@ -980,14 +981,14 @@ pub fn build( ), ], &mut map, - Country::AO, - "Angola", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2019, - vec![ + [ (NaiveDate::from_ymd_res(2019, 1, 1)?, "Dia do Ano Novo"), ( NaiveDate::from_ymd_res(2019, 2, 4)?, @@ -1038,14 +1039,14 @@ pub fn build( ), ], &mut map, - Country::AO, - "Angola", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2020, - vec![ + [ (NaiveDate::from_ymd_res(2020, 1, 1)?, "Dia do Ano Novo"), ( NaiveDate::from_ymd_res(2020, 2, 4)?, @@ -1096,14 +1097,14 @@ pub fn build( ), ], &mut map, - Country::AO, - "Angola", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2021, - vec![ + [ (NaiveDate::from_ymd_res(2021, 1, 1)?, "Dia do Ano Novo"), ( NaiveDate::from_ymd_res(2021, 2, 4)?, @@ -1162,14 +1163,14 @@ pub fn build( ), ], &mut map, - Country::AO, - "Angola", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2022, - vec![ + [ (NaiveDate::from_ymd_res(2022, 1, 1)?, "Dia do Ano Novo"), ( NaiveDate::from_ymd_res(2022, 2, 4)?, @@ -1216,14 +1217,14 @@ pub fn build( ), ], &mut map, - Country::AO, - "Angola", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2023, - vec![ + [ (NaiveDate::from_ymd_res(2023, 1, 1)?, "Dia do Ano Novo"), ( NaiveDate::from_ymd_res(2023, 2, 4)?, @@ -1278,14 +1279,14 @@ pub fn build( ), ], &mut map, - Country::AO, - "Angola", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2024, - vec![ + [ (NaiveDate::from_ymd_res(2024, 1, 1)?, "Dia do Ano Novo"), ( NaiveDate::from_ymd_res(2024, 2, 4)?, @@ -1336,14 +1337,14 @@ pub fn build( ), ], &mut map, - Country::AO, - "Angola", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2025, - vec![ + [ (NaiveDate::from_ymd_res(2025, 1, 1)?, "Dia do Ano Novo"), ( NaiveDate::from_ymd_res(2025, 2, 4)?, @@ -1402,14 +1403,14 @@ pub fn build( ), ], &mut map, - Country::AO, - "Angola", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2026, - vec![ + [ (NaiveDate::from_ymd_res(2026, 1, 1)?, "Dia do Ano Novo"), ( NaiveDate::from_ymd_res(2026, 1, 2)?, @@ -1460,14 +1461,14 @@ pub fn build( ), ], &mut map, - Country::AO, - "Angola", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2027, - vec![ + [ (NaiveDate::from_ymd_res(2027, 1, 1)?, "Dia do Ano Novo"), ( NaiveDate::from_ymd_res(2027, 2, 4)?, @@ -1526,14 +1527,14 @@ pub fn build( ), ], &mut map, - Country::AO, - "Angola", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2028, - vec![ + [ (NaiveDate::from_ymd_res(2028, 1, 1)?, "Dia do Ano Novo"), ( NaiveDate::from_ymd_res(2028, 2, 4)?, @@ -1588,14 +1589,14 @@ pub fn build( ), ], &mut map, - Country::AO, - "Angola", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2029, - vec![ + [ (NaiveDate::from_ymd_res(2029, 1, 1)?, "Dia do Ano Novo"), ( NaiveDate::from_ymd_res(2029, 12, 31)?, @@ -1654,14 +1655,14 @@ pub fn build( ), ], &mut map, - Country::AO, - "Angola", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2030, - vec![ + [ (NaiveDate::from_ymd_res(2030, 1, 1)?, "Dia do Ano Novo"), ( NaiveDate::from_ymd_res(2030, 2, 4)?, @@ -1712,8 +1713,8 @@ pub fn build( ), ], &mut map, - Country::AO, - "Angola", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/ar.rs b/src/data/ar.rs index 8d20d76..cab02bc 100644 --- a/src/data/ar.rs +++ b/src/data/ar.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Argentina"; +const COUNTY_CODE: Country = Country::AR; + /// Generate holiday map for Argentina. #[allow( unused_mut, @@ -9,38 +12,35 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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"), + [ + (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", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2001, - vec![ + [ (NaiveDate::from_ymd_res(2001, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2001, 4, 2)?, @@ -72,14 +72,14 @@ pub fn build( (NaiveDate::from_ymd_res(2001, 10, 12)?, "Día de la Raza"), ], &mut map, - Country::AR, - "Argentina", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2002, - vec![ + [ (NaiveDate::from_ymd_res(2002, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2002, 4, 2)?, @@ -111,14 +111,14 @@ pub fn build( (NaiveDate::from_ymd_res(2002, 10, 12)?, "Día de la Raza"), ], &mut map, - Country::AR, - "Argentina", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2003, - vec![ + [ (NaiveDate::from_ymd_res(2003, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2003, 4, 2)?, @@ -150,14 +150,14 @@ pub fn build( (NaiveDate::from_ymd_res(2003, 10, 12)?, "Día de la Raza"), ], &mut map, - Country::AR, - "Argentina", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2004, - vec![ + [ (NaiveDate::from_ymd_res(2004, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2004, 4, 2)?, @@ -189,14 +189,14 @@ pub fn build( (NaiveDate::from_ymd_res(2004, 10, 12)?, "Día de la Raza"), ], &mut map, - Country::AR, - "Argentina", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2005, - vec![ + [ (NaiveDate::from_ymd_res(2005, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2005, 4, 2)?, @@ -228,14 +228,14 @@ pub fn build( (NaiveDate::from_ymd_res(2005, 10, 12)?, "Día de la Raza"), ], &mut map, - Country::AR, - "Argentina", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2006, - vec![ + [ (NaiveDate::from_ymd_res(2006, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2006, 3, 24)?, @@ -271,14 +271,14 @@ pub fn build( (NaiveDate::from_ymd_res(2006, 10, 12)?, "Día de la Raza"), ], &mut map, - Country::AR, - "Argentina", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2007, - vec![ + [ (NaiveDate::from_ymd_res(2007, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2007, 3, 24)?, @@ -314,14 +314,14 @@ pub fn build( (NaiveDate::from_ymd_res(2007, 10, 12)?, "Día de la Raza"), ], &mut map, - Country::AR, - "Argentina", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2008, - vec![ + [ (NaiveDate::from_ymd_res(2008, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2008, 3, 24)?, @@ -357,14 +357,14 @@ pub fn build( (NaiveDate::from_ymd_res(2008, 10, 12)?, "Día de la Raza"), ], &mut map, - Country::AR, - "Argentina", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2009, - vec![ + [ (NaiveDate::from_ymd_res(2009, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2009, 3, 24)?, @@ -400,14 +400,14 @@ pub fn build( (NaiveDate::from_ymd_res(2009, 10, 12)?, "Día de la Raza"), ], &mut map, - Country::AR, - "Argentina", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2010, - vec![ + [ (NaiveDate::from_ymd_res(2010, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2010, 3, 24)?, @@ -449,14 +449,14 @@ pub fn build( ), ], &mut map, - Country::AR, - "Argentina", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -509,14 +509,14 @@ pub fn build( ), ], &mut map, - Country::AR, - "Argentina", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -577,44 +577,43 @@ pub fn build( ), ], &mut map, - Country::AR, - "Argentina", + COUNTY_CODE, + COUNTY_NAME, ); 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"), + [ + (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", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -667,14 +666,14 @@ pub fn build( ), ], &mut map, - Country::AR, - "Argentina", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -727,14 +726,14 @@ pub fn build( ), ], &mut map, - Country::AR, - "Argentina", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -791,14 +790,14 @@ pub fn build( ), ], &mut map, - Country::AR, - "Argentina", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -847,14 +846,14 @@ pub fn build( ), ], &mut map, - Country::AR, - "Argentina", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -915,14 +914,14 @@ pub fn build( ), ], &mut map, - Country::AR, - "Argentina", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -983,14 +982,14 @@ pub fn build( ), ], &mut map, - Country::AR, - "Argentina", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1051,14 +1050,14 @@ pub fn build( ), ], &mut map, - Country::AR, - "Argentina", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1118,14 +1117,14 @@ pub fn build( ), ], &mut map, - Country::AR, - "Argentina", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1187,14 +1186,14 @@ pub fn build( ), ], &mut map, - Country::AR, - "Argentina", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1255,14 +1254,14 @@ pub fn build( ), ], &mut map, - Country::AR, - "Argentina", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1323,14 +1322,14 @@ pub fn build( ), ], &mut map, - Country::AR, - "Argentina", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1379,14 +1378,14 @@ pub fn build( ), ], &mut map, - Country::AR, - "Argentina", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1435,14 +1434,14 @@ pub fn build( ), ], &mut map, - Country::AR, - "Argentina", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1491,14 +1490,14 @@ pub fn build( ), ], &mut map, - Country::AR, - "Argentina", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1547,14 +1546,14 @@ pub fn build( ), ], &mut map, - Country::AR, - "Argentina", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1603,14 +1602,14 @@ pub fn build( ), ], &mut map, - Country::AR, - "Argentina", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1659,8 +1658,8 @@ pub fn build( ), ], &mut map, - Country::AR, - "Argentina", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/at.rs b/src/data/at.rs index e539957..0dfd666 100644 --- a/src/data/at.rs +++ b/src/data/at.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Austria"; +const COUNTY_CODE: Country = Country::AT; + /// Generate holiday map for Austria. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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"), @@ -33,14 +34,14 @@ pub fn build( (NaiveDate::from_ymd_res(2000, 12, 26)?, "Stefanitag"), ], &mut map, - Country::AT, - "Austria", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -56,14 +57,14 @@ pub fn build( (NaiveDate::from_ymd_res(2001, 12, 26)?, "Stefanitag"), ], &mut map, - Country::AT, - "Austria", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -79,14 +80,14 @@ pub fn build( (NaiveDate::from_ymd_res(2002, 12, 26)?, "Stefanitag"), ], &mut map, - Country::AT, - "Austria", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -102,14 +103,14 @@ pub fn build( (NaiveDate::from_ymd_res(2003, 12, 26)?, "Stefanitag"), ], &mut map, - Country::AT, - "Austria", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -125,14 +126,14 @@ pub fn build( (NaiveDate::from_ymd_res(2004, 12, 26)?, "Stefanitag"), ], &mut map, - Country::AT, - "Austria", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -148,14 +149,14 @@ pub fn build( (NaiveDate::from_ymd_res(2005, 12, 26)?, "Stefanitag"), ], &mut map, - Country::AT, - "Austria", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -171,14 +172,14 @@ pub fn build( (NaiveDate::from_ymd_res(2006, 12, 26)?, "Stefanitag"), ], &mut map, - Country::AT, - "Austria", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -194,14 +195,14 @@ pub fn build( (NaiveDate::from_ymd_res(2007, 12, 26)?, "Stefanitag"), ], &mut map, - Country::AT, - "Austria", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -219,14 +220,14 @@ pub fn build( (NaiveDate::from_ymd_res(2008, 12, 26)?, "Stefanitag"), ], &mut map, - Country::AT, - "Austria", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -242,14 +243,14 @@ pub fn build( (NaiveDate::from_ymd_res(2009, 12, 26)?, "Stefanitag"), ], &mut map, - Country::AT, - "Austria", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -265,14 +266,14 @@ pub fn build( (NaiveDate::from_ymd_res(2010, 12, 26)?, "Stefanitag"), ], &mut map, - Country::AT, - "Austria", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -288,14 +289,14 @@ pub fn build( (NaiveDate::from_ymd_res(2011, 12, 26)?, "Stefanitag"), ], &mut map, - Country::AT, - "Austria", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -311,14 +312,14 @@ pub fn build( (NaiveDate::from_ymd_res(2012, 12, 26)?, "Stefanitag"), ], &mut map, - Country::AT, - "Austria", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -334,14 +335,14 @@ pub fn build( (NaiveDate::from_ymd_res(2013, 12, 26)?, "Stefanitag"), ], &mut map, - Country::AT, - "Austria", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -357,14 +358,14 @@ pub fn build( (NaiveDate::from_ymd_res(2014, 12, 26)?, "Stefanitag"), ], &mut map, - Country::AT, - "Austria", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -380,14 +381,14 @@ pub fn build( (NaiveDate::from_ymd_res(2015, 12, 26)?, "Stefanitag"), ], &mut map, - Country::AT, - "Austria", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -403,14 +404,14 @@ pub fn build( (NaiveDate::from_ymd_res(2016, 12, 26)?, "Stefanitag"), ], &mut map, - Country::AT, - "Austria", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -426,14 +427,14 @@ pub fn build( (NaiveDate::from_ymd_res(2017, 12, 26)?, "Stefanitag"), ], &mut map, - Country::AT, - "Austria", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -449,14 +450,14 @@ pub fn build( (NaiveDate::from_ymd_res(2018, 12, 26)?, "Stefanitag"), ], &mut map, - Country::AT, - "Austria", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -472,14 +473,14 @@ pub fn build( (NaiveDate::from_ymd_res(2019, 12, 26)?, "Stefanitag"), ], &mut map, - Country::AT, - "Austria", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -495,14 +496,14 @@ pub fn build( (NaiveDate::from_ymd_res(2020, 12, 26)?, "Stefanitag"), ], &mut map, - Country::AT, - "Austria", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -518,14 +519,14 @@ pub fn build( (NaiveDate::from_ymd_res(2021, 12, 26)?, "Stefanitag"), ], &mut map, - Country::AT, - "Austria", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -541,14 +542,14 @@ pub fn build( (NaiveDate::from_ymd_res(2022, 12, 26)?, "Stefanitag"), ], &mut map, - Country::AT, - "Austria", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -564,14 +565,14 @@ pub fn build( (NaiveDate::from_ymd_res(2023, 12, 26)?, "Stefanitag"), ], &mut map, - Country::AT, - "Austria", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -587,14 +588,14 @@ pub fn build( (NaiveDate::from_ymd_res(2024, 12, 26)?, "Stefanitag"), ], &mut map, - Country::AT, - "Austria", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -610,14 +611,14 @@ pub fn build( (NaiveDate::from_ymd_res(2025, 12, 26)?, "Stefanitag"), ], &mut map, - Country::AT, - "Austria", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -633,14 +634,14 @@ pub fn build( (NaiveDate::from_ymd_res(2026, 12, 26)?, "Stefanitag"), ], &mut map, - Country::AT, - "Austria", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -656,14 +657,14 @@ pub fn build( (NaiveDate::from_ymd_res(2027, 12, 26)?, "Stefanitag"), ], &mut map, - Country::AT, - "Austria", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -679,14 +680,14 @@ pub fn build( (NaiveDate::from_ymd_res(2028, 12, 26)?, "Stefanitag"), ], &mut map, - Country::AT, - "Austria", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -702,14 +703,14 @@ pub fn build( (NaiveDate::from_ymd_res(2029, 12, 26)?, "Stefanitag"), ], &mut map, - Country::AT, - "Austria", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -725,8 +726,8 @@ pub fn build( (NaiveDate::from_ymd_res(2030, 12, 26)?, "Stefanitag"), ], &mut map, - Country::AT, - "Austria", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/au.rs b/src/data/au.rs index 6bd6197..a44947e 100644 --- a/src/data/au.rs +++ b/src/data/au.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Australia"; +const COUNTY_CODE: Country = Country::AU; + /// Generate holiday map for Australia. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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"), @@ -27,14 +28,14 @@ pub fn build( (NaiveDate::from_ymd_res(2000, 12, 26)?, "Boxing Day"), ], &mut map, - Country::AU, - "Australia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -44,14 +45,14 @@ pub fn build( (NaiveDate::from_ymd_res(2001, 12, 26)?, "Boxing Day"), ], &mut map, - Country::AU, - "Australia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -61,14 +62,14 @@ pub fn build( (NaiveDate::from_ymd_res(2002, 12, 26)?, "Boxing Day"), ], &mut map, - Country::AU, - "Australia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -78,14 +79,14 @@ pub fn build( (NaiveDate::from_ymd_res(2003, 12, 26)?, "Boxing Day"), ], &mut map, - Country::AU, - "Australia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -95,14 +96,14 @@ pub fn build( (NaiveDate::from_ymd_res(2004, 12, 26)?, "Boxing Day"), ], &mut map, - Country::AU, - "Australia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -112,14 +113,14 @@ pub fn build( (NaiveDate::from_ymd_res(2005, 12, 26)?, "Boxing Day"), ], &mut map, - Country::AU, - "Australia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -129,14 +130,14 @@ pub fn build( (NaiveDate::from_ymd_res(2006, 12, 26)?, "Boxing Day"), ], &mut map, - Country::AU, - "Australia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -146,14 +147,14 @@ pub fn build( (NaiveDate::from_ymd_res(2007, 12, 26)?, "Boxing Day"), ], &mut map, - Country::AU, - "Australia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -163,14 +164,14 @@ pub fn build( (NaiveDate::from_ymd_res(2008, 12, 26)?, "Boxing Day"), ], &mut map, - Country::AU, - "Australia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -180,14 +181,14 @@ pub fn build( (NaiveDate::from_ymd_res(2009, 12, 26)?, "Boxing Day"), ], &mut map, - Country::AU, - "Australia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -197,14 +198,14 @@ pub fn build( (NaiveDate::from_ymd_res(2010, 12, 26)?, "Boxing Day"), ], &mut map, - Country::AU, - "Australia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2011, - vec![ + [ (NaiveDate::from_ymd_res(2011, 4, 22)?, "Good Friday"), ( NaiveDate::from_ymd_res(2011, 4, 25)?, @@ -216,14 +217,14 @@ pub fn build( (NaiveDate::from_ymd_res(2011, 12, 26)?, "Boxing Day"), ], &mut map, - Country::AU, - "Australia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -233,14 +234,14 @@ pub fn build( (NaiveDate::from_ymd_res(2012, 12, 26)?, "Boxing Day"), ], &mut map, - Country::AU, - "Australia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -250,14 +251,14 @@ pub fn build( (NaiveDate::from_ymd_res(2013, 12, 26)?, "Boxing Day"), ], &mut map, - Country::AU, - "Australia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -267,14 +268,14 @@ pub fn build( (NaiveDate::from_ymd_res(2014, 12, 26)?, "Boxing Day"), ], &mut map, - Country::AU, - "Australia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -284,14 +285,14 @@ pub fn build( (NaiveDate::from_ymd_res(2015, 12, 26)?, "Boxing Day"), ], &mut map, - Country::AU, - "Australia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -301,14 +302,14 @@ pub fn build( (NaiveDate::from_ymd_res(2016, 12, 26)?, "Boxing Day"), ], &mut map, - Country::AU, - "Australia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -318,14 +319,14 @@ pub fn build( (NaiveDate::from_ymd_res(2017, 12, 26)?, "Boxing Day"), ], &mut map, - Country::AU, - "Australia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -335,14 +336,14 @@ pub fn build( (NaiveDate::from_ymd_res(2018, 12, 26)?, "Boxing Day"), ], &mut map, - Country::AU, - "Australia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -352,14 +353,14 @@ pub fn build( (NaiveDate::from_ymd_res(2019, 12, 26)?, "Boxing Day"), ], &mut map, - Country::AU, - "Australia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -369,14 +370,14 @@ pub fn build( (NaiveDate::from_ymd_res(2020, 12, 26)?, "Boxing Day"), ], &mut map, - Country::AU, - "Australia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -386,14 +387,14 @@ pub fn build( (NaiveDate::from_ymd_res(2021, 12, 26)?, "Boxing Day"), ], &mut map, - Country::AU, - "Australia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -407,14 +408,14 @@ pub fn build( ), ], &mut map, - Country::AU, - "Australia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -424,14 +425,14 @@ pub fn build( (NaiveDate::from_ymd_res(2023, 12, 26)?, "Boxing Day"), ], &mut map, - Country::AU, - "Australia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -441,14 +442,14 @@ pub fn build( (NaiveDate::from_ymd_res(2024, 12, 26)?, "Boxing Day"), ], &mut map, - Country::AU, - "Australia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -458,14 +459,14 @@ pub fn build( (NaiveDate::from_ymd_res(2025, 12, 26)?, "Boxing Day"), ], &mut map, - Country::AU, - "Australia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -475,14 +476,14 @@ pub fn build( (NaiveDate::from_ymd_res(2026, 12, 26)?, "Boxing Day"), ], &mut map, - Country::AU, - "Australia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -492,14 +493,14 @@ pub fn build( (NaiveDate::from_ymd_res(2027, 12, 26)?, "Boxing Day"), ], &mut map, - Country::AU, - "Australia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -509,14 +510,14 @@ pub fn build( (NaiveDate::from_ymd_res(2028, 12, 26)?, "Boxing Day"), ], &mut map, - Country::AU, - "Australia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -526,14 +527,14 @@ pub fn build( (NaiveDate::from_ymd_res(2029, 12, 26)?, "Boxing Day"), ], &mut map, - Country::AU, - "Australia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -543,8 +544,8 @@ pub fn build( (NaiveDate::from_ymd_res(2030, 12, 26)?, "Boxing Day"), ], &mut map, - Country::AU, - "Australia", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/aw.rs b/src/data/aw.rs index cc7c071..0e8c64e 100644 --- a/src/data/aw.rs +++ b/src/data/aw.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Aruba"; +const COUNTY_CODE: Country = Country::AW; + /// Generate holiday map for Aruba. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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"), ( @@ -43,14 +44,14 @@ pub fn build( ), ], &mut map, - Country::AW, - "Aruba", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -76,14 +77,14 @@ pub fn build( ), ], &mut map, - Country::AW, - "Aruba", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -109,14 +110,14 @@ pub fn build( ), ], &mut map, - Country::AW, - "Aruba", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -142,14 +143,14 @@ pub fn build( ), ], &mut map, - Country::AW, - "Aruba", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -175,14 +176,14 @@ pub fn build( ), ], &mut map, - Country::AW, - "Aruba", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -208,14 +209,14 @@ pub fn build( ), ], &mut map, - Country::AW, - "Aruba", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -241,14 +242,14 @@ pub fn build( ), ], &mut map, - Country::AW, - "Aruba", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -274,14 +275,14 @@ pub fn build( ), ], &mut map, - Country::AW, - "Aruba", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -309,14 +310,14 @@ pub fn build( ), ], &mut map, - Country::AW, - "Aruba", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -342,14 +343,14 @@ pub fn build( ), ], &mut map, - Country::AW, - "Aruba", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -375,14 +376,14 @@ pub fn build( ), ], &mut map, - Country::AW, - "Aruba", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -408,14 +409,14 @@ pub fn build( ), ], &mut map, - Country::AW, - "Aruba", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -441,14 +442,14 @@ pub fn build( ), ], &mut map, - Country::AW, - "Aruba", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -474,14 +475,14 @@ pub fn build( ), ], &mut map, - Country::AW, - "Aruba", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -507,14 +508,14 @@ pub fn build( ), ], &mut map, - Country::AW, - "Aruba", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -540,14 +541,14 @@ pub fn build( ), ], &mut map, - Country::AW, - "Aruba", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -573,14 +574,14 @@ pub fn build( ), ], &mut map, - Country::AW, - "Aruba", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -606,14 +607,14 @@ pub fn build( ), ], &mut map, - Country::AW, - "Aruba", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -639,14 +640,14 @@ pub fn build( ), ], &mut map, - Country::AW, - "Aruba", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -672,14 +673,14 @@ pub fn build( ), ], &mut map, - Country::AW, - "Aruba", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -705,14 +706,14 @@ pub fn build( ), ], &mut map, - Country::AW, - "Aruba", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -738,14 +739,14 @@ pub fn build( ), ], &mut map, - Country::AW, - "Aruba", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -771,14 +772,14 @@ pub fn build( ), ], &mut map, - Country::AW, - "Aruba", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -804,14 +805,14 @@ pub fn build( ), ], &mut map, - Country::AW, - "Aruba", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -837,14 +838,14 @@ pub fn build( ), ], &mut map, - Country::AW, - "Aruba", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -870,14 +871,14 @@ pub fn build( ), ], &mut map, - Country::AW, - "Aruba", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -903,14 +904,14 @@ pub fn build( ), ], &mut map, - Country::AW, - "Aruba", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -936,14 +937,14 @@ pub fn build( ), ], &mut map, - Country::AW, - "Aruba", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -969,14 +970,14 @@ pub fn build( ), ], &mut map, - Country::AW, - "Aruba", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -1002,14 +1003,14 @@ pub fn build( ), ], &mut map, - Country::AW, - "Aruba", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -1035,8 +1036,8 @@ pub fn build( ), ], &mut map, - Country::AW, - "Aruba", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/az.rs b/src/data/az.rs index 6011c6d..47fde5d 100644 --- a/src/data/az.rs +++ b/src/data/az.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Azerbaijan"; +const COUNTY_CODE: Country = Country::AZ; + /// Generate holiday map for Azerbaijan. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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ü"), @@ -58,14 +59,14 @@ pub fn build( ), ], &mut map, - Country::AZ, - "Azerbaijan", + COUNTY_CODE, + COUNTY_NAME, ); 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ü"), @@ -102,14 +103,14 @@ pub fn build( ), ], &mut map, - Country::AZ, - "Azerbaijan", + COUNTY_CODE, + COUNTY_NAME, ); 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ü"), @@ -140,14 +141,14 @@ pub fn build( (NaiveDate::from_ymd_res(2002, 2, 21)?, "Qurban bayrami"), ], &mut map, - Country::AZ, - "Azerbaijan", + COUNTY_CODE, + COUNTY_NAME, ); 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ü"), @@ -178,14 +179,14 @@ pub fn build( (NaiveDate::from_ymd_res(2003, 2, 11)?, "Qurban bayrami"), ], &mut map, - Country::AZ, - "Azerbaijan", + COUNTY_CODE, + COUNTY_NAME, ); 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ü"), @@ -216,14 +217,14 @@ pub fn build( (NaiveDate::from_ymd_res(2004, 2, 1)?, "Qurban bayrami"), ], &mut map, - Country::AZ, - "Azerbaijan", + COUNTY_CODE, + COUNTY_NAME, ); 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ü"), @@ -254,14 +255,14 @@ pub fn build( (NaiveDate::from_ymd_res(2005, 1, 22)?, "Qurban bayrami"), ], &mut map, - Country::AZ, - "Azerbaijan", + COUNTY_CODE, + COUNTY_NAME, ); 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ü"), @@ -302,47 +303,46 @@ pub fn build( ), ], &mut map, - Country::AZ, - "Azerbaijan", + COUNTY_CODE, + COUNTY_NAME, ); 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)"), + [ + (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", + COUNTY_CODE, + COUNTY_NAME, ); 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ü"), @@ -391,14 +391,14 @@ pub fn build( ), ], &mut map, - Country::AZ, - "Azerbaijan", + COUNTY_CODE, + COUNTY_NAME, ); 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ü"), @@ -455,14 +455,14 @@ pub fn build( ), ], &mut map, - Country::AZ, - "Azerbaijan", + COUNTY_CODE, + COUNTY_NAME, ); 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ü"), @@ -519,14 +519,14 @@ pub fn build( ), ], &mut map, - Country::AZ, - "Azerbaijan", + COUNTY_CODE, + COUNTY_NAME, ); 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ü"), @@ -591,14 +591,14 @@ pub fn build( ), ], &mut map, - Country::AZ, - "Azerbaijan", + COUNTY_CODE, + COUNTY_NAME, ); 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ü"), @@ -651,14 +651,14 @@ pub fn build( ), ], &mut map, - Country::AZ, - "Azerbaijan", + COUNTY_CODE, + COUNTY_NAME, ); 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ü"), @@ -719,14 +719,14 @@ pub fn build( ), ], &mut map, - Country::AZ, - "Azerbaijan", + COUNTY_CODE, + COUNTY_NAME, ); 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ü"), @@ -799,14 +799,14 @@ pub fn build( ), ], &mut map, - Country::AZ, - "Azerbaijan", + COUNTY_CODE, + COUNTY_NAME, ); 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ü"), @@ -863,14 +863,14 @@ pub fn build( ), ], &mut map, - Country::AZ, - "Azerbaijan", + COUNTY_CODE, + COUNTY_NAME, ); 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ü"), @@ -923,14 +923,14 @@ pub fn build( ), ], &mut map, - Country::AZ, - "Azerbaijan", + COUNTY_CODE, + COUNTY_NAME, ); 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ü"), @@ -986,14 +986,14 @@ pub fn build( ), ], &mut map, - Country::AZ, - "Azerbaijan", + COUNTY_CODE, + COUNTY_NAME, ); 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ü"), @@ -1049,14 +1049,14 @@ pub fn build( ), ], &mut map, - Country::AZ, - "Azerbaijan", + COUNTY_CODE, + COUNTY_NAME, ); 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ü"), @@ -1113,14 +1113,14 @@ pub fn build( ), ], &mut map, - Country::AZ, - "Azerbaijan", + COUNTY_CODE, + COUNTY_NAME, ); 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ü"), @@ -1197,14 +1197,14 @@ pub fn build( ), ], &mut map, - Country::AZ, - "Azerbaijan", + COUNTY_CODE, + COUNTY_NAME, ); 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ü"), @@ -1274,14 +1274,14 @@ pub fn build( ), ], &mut map, - Country::AZ, - "Azerbaijan", + COUNTY_CODE, + COUNTY_NAME, ); 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ü"), @@ -1355,14 +1355,14 @@ pub fn build( ), ], &mut map, - Country::AZ, - "Azerbaijan", + COUNTY_CODE, + COUNTY_NAME, ); 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ü"), @@ -1428,14 +1428,14 @@ pub fn build( ), ], &mut map, - Country::AZ, - "Azerbaijan", + COUNTY_CODE, + COUNTY_NAME, ); 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ü"), @@ -1503,14 +1503,14 @@ pub fn build( ), ], &mut map, - Country::AZ, - "Azerbaijan", + COUNTY_CODE, + COUNTY_NAME, ); 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ü"), @@ -1592,14 +1592,14 @@ pub fn build( ), ], &mut map, - Country::AZ, - "Azerbaijan", + COUNTY_CODE, + COUNTY_NAME, ); 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ü"), @@ -1666,14 +1666,14 @@ pub fn build( ), ], &mut map, - Country::AZ, - "Azerbaijan", + COUNTY_CODE, + COUNTY_NAME, ); 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ü"), @@ -1747,14 +1747,14 @@ pub fn build( ), ], &mut map, - Country::AZ, - "Azerbaijan", + COUNTY_CODE, + COUNTY_NAME, ); 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ü"), @@ -1828,14 +1828,14 @@ pub fn build( ), ], &mut map, - Country::AZ, - "Azerbaijan", + COUNTY_CODE, + COUNTY_NAME, ); 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ü"), @@ -1893,14 +1893,14 @@ pub fn build( ), ], &mut map, - Country::AZ, - "Azerbaijan", + COUNTY_CODE, + COUNTY_NAME, ); 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ü"), @@ -1974,8 +1974,8 @@ pub fn build( ), ], &mut map, - Country::AZ, - "Azerbaijan", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/ba.rs b/src/data/ba.rs index f02b059..1d60f6d 100644 --- a/src/data/ba.rs +++ b/src/data/ba.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Bosnia and Herzegovina"; +const COUNTY_CODE: Country = Country::BA; + /// Generate holiday map for Bosnia and Herzegovina. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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)", @@ -52,14 +53,14 @@ pub fn build( (NaiveDate::from_ymd_res(2000, 12, 25)?, "Božić (Katolički)"), ], &mut map, - Country::BA, - "Bosnia and Herzegovina", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2001, - vec![ + [ ( NaiveDate::from_ymd_res(2001, 4, 13)?, "Veliki petak (Pravoslavni)", @@ -84,14 +85,14 @@ pub fn build( (NaiveDate::from_ymd_res(2001, 12, 25)?, "Božić (Katolički)"), ], &mut map, - Country::BA, - "Bosnia and Herzegovina", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2002, - vec![ + [ ( NaiveDate::from_ymd_res(2002, 5, 3)?, "Veliki petak (Pravoslavni)", @@ -116,14 +117,14 @@ pub fn build( (NaiveDate::from_ymd_res(2002, 12, 25)?, "Božić (Katolički)"), ], &mut map, - Country::BA, - "Bosnia and Herzegovina", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2003, - vec![ + [ ( NaiveDate::from_ymd_res(2003, 4, 25)?, "Veliki petak (Pravoslavni)", @@ -148,14 +149,14 @@ pub fn build( (NaiveDate::from_ymd_res(2003, 12, 25)?, "Božić (Katolički)"), ], &mut map, - Country::BA, - "Bosnia and Herzegovina", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2004, - vec![ + [ ( NaiveDate::from_ymd_res(2004, 4, 9)?, "Veliki petak (Pravoslavni)", @@ -180,14 +181,14 @@ pub fn build( (NaiveDate::from_ymd_res(2004, 12, 25)?, "Božić (Katolički)"), ], &mut map, - Country::BA, - "Bosnia and Herzegovina", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2005, - vec![ + [ ( NaiveDate::from_ymd_res(2005, 4, 29)?, "Veliki petak (Pravoslavni)", @@ -212,14 +213,14 @@ pub fn build( (NaiveDate::from_ymd_res(2005, 12, 25)?, "Božić (Katolički)"), ], &mut map, - Country::BA, - "Bosnia and Herzegovina", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2006, - vec![ + [ ( NaiveDate::from_ymd_res(2006, 4, 21)?, "Veliki petak (Pravoslavni)", @@ -245,14 +246,14 @@ pub fn build( (NaiveDate::from_ymd_res(2006, 12, 25)?, "Božić (Katolički)"), ], &mut map, - Country::BA, - "Bosnia and Herzegovina", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2007, - vec![ + [ ( NaiveDate::from_ymd_res(2007, 4, 6)?, "Veliki petak (Pravoslavni)", @@ -277,14 +278,14 @@ pub fn build( (NaiveDate::from_ymd_res(2007, 12, 25)?, "Božić (Katolički)"), ], &mut map, - Country::BA, - "Bosnia and Herzegovina", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2008, - vec![ + [ ( NaiveDate::from_ymd_res(2008, 4, 25)?, "Veliki petak (Pravoslavni)", @@ -309,14 +310,14 @@ pub fn build( (NaiveDate::from_ymd_res(2008, 12, 25)?, "Božić (Katolički)"), ], &mut map, - Country::BA, - "Bosnia and Herzegovina", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2009, - vec![ + [ ( NaiveDate::from_ymd_res(2009, 4, 17)?, "Veliki petak (Pravoslavni)", @@ -341,14 +342,14 @@ pub fn build( (NaiveDate::from_ymd_res(2009, 12, 25)?, "Božić (Katolički)"), ], &mut map, - Country::BA, - "Bosnia and Herzegovina", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2010, - vec![ + [ ( NaiveDate::from_ymd_res(2010, 4, 2)?, "Veliki petak (Pravoslavni)", @@ -373,14 +374,14 @@ pub fn build( (NaiveDate::from_ymd_res(2010, 12, 25)?, "Božić (Katolički)"), ], &mut map, - Country::BA, - "Bosnia and Herzegovina", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2011, - vec![ + [ ( NaiveDate::from_ymd_res(2011, 4, 22)?, "Veliki petak (Pravoslavni)", @@ -405,14 +406,14 @@ pub fn build( (NaiveDate::from_ymd_res(2011, 12, 25)?, "Božić (Katolički)"), ], &mut map, - Country::BA, - "Bosnia and Herzegovina", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2012, - vec![ + [ ( NaiveDate::from_ymd_res(2012, 4, 13)?, "Veliki petak (Pravoslavni)", @@ -437,14 +438,14 @@ pub fn build( (NaiveDate::from_ymd_res(2012, 12, 25)?, "Božić (Katolički)"), ], &mut map, - Country::BA, - "Bosnia and Herzegovina", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2013, - vec![ + [ ( NaiveDate::from_ymd_res(2013, 5, 3)?, "Veliki petak (Pravoslavni)", @@ -469,14 +470,14 @@ pub fn build( (NaiveDate::from_ymd_res(2013, 12, 25)?, "Božić (Katolički)"), ], &mut map, - Country::BA, - "Bosnia and Herzegovina", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2014, - vec![ + [ ( NaiveDate::from_ymd_res(2014, 4, 18)?, "Veliki petak (Pravoslavni)", @@ -501,14 +502,14 @@ pub fn build( (NaiveDate::from_ymd_res(2014, 12, 25)?, "Božić (Katolički)"), ], &mut map, - Country::BA, - "Bosnia and Herzegovina", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2015, - vec![ + [ ( NaiveDate::from_ymd_res(2015, 4, 10)?, "Veliki petak (Pravoslavni)", @@ -533,14 +534,14 @@ pub fn build( (NaiveDate::from_ymd_res(2015, 12, 25)?, "Božić (Katolički)"), ], &mut map, - Country::BA, - "Bosnia and Herzegovina", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2016, - vec![ + [ ( NaiveDate::from_ymd_res(2016, 4, 29)?, "Veliki petak (Pravoslavni)", @@ -565,14 +566,14 @@ pub fn build( (NaiveDate::from_ymd_res(2016, 12, 25)?, "Božić (Katolički)"), ], &mut map, - Country::BA, - "Bosnia and Herzegovina", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2017, - vec![ + [ ( NaiveDate::from_ymd_res(2017, 4, 14)?, "Veliki petak (Pravoslavni)", @@ -597,14 +598,14 @@ pub fn build( (NaiveDate::from_ymd_res(2017, 12, 25)?, "Božić (Katolički)"), ], &mut map, - Country::BA, - "Bosnia and Herzegovina", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2018, - vec![ + [ ( NaiveDate::from_ymd_res(2018, 4, 6)?, "Veliki petak (Pravoslavni)", @@ -629,14 +630,14 @@ pub fn build( (NaiveDate::from_ymd_res(2018, 12, 25)?, "Božić (Katolički)"), ], &mut map, - Country::BA, - "Bosnia and Herzegovina", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2019, - vec![ + [ ( NaiveDate::from_ymd_res(2019, 4, 26)?, "Veliki petak (Pravoslavni)", @@ -661,14 +662,14 @@ pub fn build( (NaiveDate::from_ymd_res(2019, 12, 25)?, "Božić (Katolički)"), ], &mut map, - Country::BA, - "Bosnia and Herzegovina", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2020, - vec![ + [ ( NaiveDate::from_ymd_res(2020, 4, 17)?, "Veliki petak (Pravoslavni)", @@ -693,14 +694,14 @@ pub fn build( (NaiveDate::from_ymd_res(2020, 12, 25)?, "Božić (Katolički)"), ], &mut map, - Country::BA, - "Bosnia and Herzegovina", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2021, - vec![ + [ ( NaiveDate::from_ymd_res(2021, 4, 30)?, "Veliki petak (Pravoslavni)", @@ -725,14 +726,14 @@ pub fn build( (NaiveDate::from_ymd_res(2021, 12, 25)?, "Božić (Katolički)"), ], &mut map, - Country::BA, - "Bosnia and Herzegovina", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2022, - vec![ + [ ( NaiveDate::from_ymd_res(2022, 4, 22)?, "Veliki petak (Pravoslavni)", @@ -756,14 +757,14 @@ pub fn build( (NaiveDate::from_ymd_res(2022, 12, 25)?, "Božić (Katolički)"), ], &mut map, - Country::BA, - "Bosnia and Herzegovina", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2023, - vec![ + [ ( NaiveDate::from_ymd_res(2023, 4, 14)?, "Veliki petak (Pravoslavni)", @@ -788,14 +789,14 @@ pub fn build( (NaiveDate::from_ymd_res(2023, 12, 25)?, "Božić (Katolički)"), ], &mut map, - Country::BA, - "Bosnia and Herzegovina", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2024, - vec![ + [ ( NaiveDate::from_ymd_res(2024, 5, 3)?, "Veliki petak (Pravoslavni)", @@ -823,14 +824,14 @@ pub fn build( (NaiveDate::from_ymd_res(2024, 12, 25)?, "Božić (Katolički)"), ], &mut map, - Country::BA, - "Bosnia and Herzegovina", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2025, - vec![ + [ ( NaiveDate::from_ymd_res(2025, 4, 18)?, "Veliki petak (Pravoslavni)", @@ -861,14 +862,14 @@ pub fn build( (NaiveDate::from_ymd_res(2025, 12, 25)?, "Božić (Katolički)"), ], &mut map, - Country::BA, - "Bosnia and Herzegovina", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2026, - vec![ + [ ( NaiveDate::from_ymd_res(2026, 4, 10)?, "Veliki petak (Pravoslavni)", @@ -899,14 +900,14 @@ pub fn build( (NaiveDate::from_ymd_res(2026, 12, 25)?, "Božić (Katolički)"), ], &mut map, - Country::BA, - "Bosnia and Herzegovina", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2027, - vec![ + [ ( NaiveDate::from_ymd_res(2027, 4, 30)?, "Veliki petak (Pravoslavni)", @@ -937,14 +938,14 @@ pub fn build( (NaiveDate::from_ymd_res(2027, 12, 25)?, "Božić (Katolički)"), ], &mut map, - Country::BA, - "Bosnia and Herzegovina", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2028, - vec![ + [ ( NaiveDate::from_ymd_res(2028, 4, 14)?, "Veliki petak (Pravoslavni)", @@ -975,14 +976,14 @@ pub fn build( (NaiveDate::from_ymd_res(2028, 12, 25)?, "Božić (Katolički)"), ], &mut map, - Country::BA, - "Bosnia and Herzegovina", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2029, - vec![ + [ ( NaiveDate::from_ymd_res(2029, 4, 6)?, "Veliki petak (Pravoslavni)", @@ -1013,14 +1014,14 @@ pub fn build( (NaiveDate::from_ymd_res(2029, 12, 25)?, "Božić (Katolički)"), ], &mut map, - Country::BA, - "Bosnia and Herzegovina", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2030, - vec![ + [ ( NaiveDate::from_ymd_res(2030, 4, 26)?, "Veliki petak (Pravoslavni)", @@ -1051,8 +1052,8 @@ pub fn build( (NaiveDate::from_ymd_res(2030, 12, 25)?, "Božić (Katolički)"), ], &mut map, - Country::BA, - "Bosnia and Herzegovina", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/bd.rs b/src/data/bd.rs index 977b413..810ac9a 100644 --- a/src/data/bd.rs +++ b/src/data/bd.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Bangladesh"; +const COUNTY_CODE: Country = Country::BD; + /// Generate holiday map for Bangladesh. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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", @@ -39,14 +40,14 @@ pub fn build( (NaiveDate::from_ymd_res(2000, 12, 16)?, "Victory Day"), ], &mut map, - Country::BD, - "Bangladesh", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2001, - vec![ + [ ( NaiveDate::from_ymd_res(2001, 2, 21)?, "International Mother's language Day", @@ -68,14 +69,14 @@ pub fn build( (NaiveDate::from_ymd_res(2001, 12, 16)?, "Victory Day"), ], &mut map, - Country::BD, - "Bangladesh", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2002, - vec![ + [ ( NaiveDate::from_ymd_res(2002, 2, 21)?, "International Mother's language Day", @@ -97,14 +98,14 @@ pub fn build( (NaiveDate::from_ymd_res(2002, 12, 16)?, "Victory Day"), ], &mut map, - Country::BD, - "Bangladesh", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2003, - vec![ + [ ( NaiveDate::from_ymd_res(2003, 2, 21)?, "International Mother's language Day", @@ -126,14 +127,14 @@ pub fn build( (NaiveDate::from_ymd_res(2003, 12, 16)?, "Victory Day"), ], &mut map, - Country::BD, - "Bangladesh", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2004, - vec![ + [ ( NaiveDate::from_ymd_res(2004, 2, 21)?, "International Mother's language Day", @@ -155,14 +156,14 @@ pub fn build( (NaiveDate::from_ymd_res(2004, 12, 16)?, "Victory Day"), ], &mut map, - Country::BD, - "Bangladesh", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2005, - vec![ + [ ( NaiveDate::from_ymd_res(2005, 2, 21)?, "International Mother's language Day", @@ -184,14 +185,14 @@ pub fn build( (NaiveDate::from_ymd_res(2005, 12, 16)?, "Victory Day"), ], &mut map, - Country::BD, - "Bangladesh", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2006, - vec![ + [ ( NaiveDate::from_ymd_res(2006, 2, 21)?, "International Mother's language Day", @@ -213,14 +214,14 @@ pub fn build( (NaiveDate::from_ymd_res(2006, 12, 16)?, "Victory Day"), ], &mut map, - Country::BD, - "Bangladesh", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2007, - vec![ + [ ( NaiveDate::from_ymd_res(2007, 2, 21)?, "International Mother's language Day", @@ -242,14 +243,14 @@ pub fn build( (NaiveDate::from_ymd_res(2007, 12, 16)?, "Victory Day"), ], &mut map, - Country::BD, - "Bangladesh", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2008, - vec![ + [ ( NaiveDate::from_ymd_res(2008, 2, 21)?, "International Mother's language Day", @@ -271,14 +272,14 @@ pub fn build( (NaiveDate::from_ymd_res(2008, 12, 16)?, "Victory Day"), ], &mut map, - Country::BD, - "Bangladesh", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2009, - vec![ + [ ( NaiveDate::from_ymd_res(2009, 2, 21)?, "International Mother's language Day", @@ -300,14 +301,14 @@ pub fn build( (NaiveDate::from_ymd_res(2009, 12, 16)?, "Victory Day"), ], &mut map, - Country::BD, - "Bangladesh", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2010, - vec![ + [ ( NaiveDate::from_ymd_res(2010, 2, 21)?, "International Mother's language Day", @@ -329,14 +330,14 @@ pub fn build( (NaiveDate::from_ymd_res(2010, 12, 16)?, "Victory Day"), ], &mut map, - Country::BD, - "Bangladesh", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2011, - vec![ + [ ( NaiveDate::from_ymd_res(2011, 2, 21)?, "International Mother's language Day", @@ -358,14 +359,14 @@ pub fn build( (NaiveDate::from_ymd_res(2011, 12, 16)?, "Victory Day"), ], &mut map, - Country::BD, - "Bangladesh", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2012, - vec![ + [ ( NaiveDate::from_ymd_res(2012, 2, 21)?, "International Mother's language Day", @@ -387,14 +388,14 @@ pub fn build( (NaiveDate::from_ymd_res(2012, 12, 16)?, "Victory Day"), ], &mut map, - Country::BD, - "Bangladesh", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2013, - vec![ + [ ( NaiveDate::from_ymd_res(2013, 2, 21)?, "International Mother's language Day", @@ -416,14 +417,14 @@ pub fn build( (NaiveDate::from_ymd_res(2013, 12, 16)?, "Victory Day"), ], &mut map, - Country::BD, - "Bangladesh", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2014, - vec![ + [ ( NaiveDate::from_ymd_res(2014, 2, 21)?, "International Mother's language Day", @@ -445,14 +446,14 @@ pub fn build( (NaiveDate::from_ymd_res(2014, 12, 16)?, "Victory Day"), ], &mut map, - Country::BD, - "Bangladesh", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2015, - vec![ + [ ( NaiveDate::from_ymd_res(2015, 2, 21)?, "International Mother's language Day", @@ -474,14 +475,14 @@ pub fn build( (NaiveDate::from_ymd_res(2015, 12, 16)?, "Victory Day"), ], &mut map, - Country::BD, - "Bangladesh", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2016, - vec![ + [ ( NaiveDate::from_ymd_res(2016, 2, 21)?, "International Mother's language Day", @@ -503,14 +504,14 @@ pub fn build( (NaiveDate::from_ymd_res(2016, 12, 16)?, "Victory Day"), ], &mut map, - Country::BD, - "Bangladesh", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2017, - vec![ + [ ( NaiveDate::from_ymd_res(2017, 2, 21)?, "International Mother's language Day", @@ -532,14 +533,14 @@ pub fn build( (NaiveDate::from_ymd_res(2017, 12, 16)?, "Victory Day"), ], &mut map, - Country::BD, - "Bangladesh", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2018, - vec![ + [ ( NaiveDate::from_ymd_res(2018, 2, 21)?, "International Mother's language Day", @@ -561,14 +562,14 @@ pub fn build( (NaiveDate::from_ymd_res(2018, 12, 16)?, "Victory Day"), ], &mut map, - Country::BD, - "Bangladesh", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2019, - vec![ + [ ( NaiveDate::from_ymd_res(2019, 2, 21)?, "International Mother's language Day", @@ -590,14 +591,14 @@ pub fn build( (NaiveDate::from_ymd_res(2019, 12, 16)?, "Victory Day"), ], &mut map, - Country::BD, - "Bangladesh", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2020, - vec![ + [ ( NaiveDate::from_ymd_res(2020, 2, 21)?, "International Mother's language Day", @@ -619,14 +620,14 @@ pub fn build( (NaiveDate::from_ymd_res(2020, 12, 16)?, "Victory Day"), ], &mut map, - Country::BD, - "Bangladesh", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2021, - vec![ + [ ( NaiveDate::from_ymd_res(2021, 2, 21)?, "International Mother's language Day", @@ -648,14 +649,14 @@ pub fn build( (NaiveDate::from_ymd_res(2021, 12, 16)?, "Victory Day"), ], &mut map, - Country::BD, - "Bangladesh", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2022, - vec![ + [ ( NaiveDate::from_ymd_res(2022, 2, 21)?, "International Mother's language Day", @@ -677,14 +678,14 @@ pub fn build( (NaiveDate::from_ymd_res(2022, 12, 16)?, "Victory Day"), ], &mut map, - Country::BD, - "Bangladesh", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2023, - vec![ + [ ( NaiveDate::from_ymd_res(2023, 2, 21)?, "International Mother's language Day", @@ -706,14 +707,14 @@ pub fn build( (NaiveDate::from_ymd_res(2023, 12, 16)?, "Victory Day"), ], &mut map, - Country::BD, - "Bangladesh", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2024, - vec![ + [ ( NaiveDate::from_ymd_res(2024, 2, 21)?, "International Mother's language Day", @@ -735,14 +736,14 @@ pub fn build( (NaiveDate::from_ymd_res(2024, 12, 16)?, "Victory Day"), ], &mut map, - Country::BD, - "Bangladesh", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2025, - vec![ + [ ( NaiveDate::from_ymd_res(2025, 2, 21)?, "International Mother's language Day", @@ -764,14 +765,14 @@ pub fn build( (NaiveDate::from_ymd_res(2025, 12, 16)?, "Victory Day"), ], &mut map, - Country::BD, - "Bangladesh", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2026, - vec![ + [ ( NaiveDate::from_ymd_res(2026, 2, 21)?, "International Mother's language Day", @@ -793,14 +794,14 @@ pub fn build( (NaiveDate::from_ymd_res(2026, 12, 16)?, "Victory Day"), ], &mut map, - Country::BD, - "Bangladesh", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2027, - vec![ + [ ( NaiveDate::from_ymd_res(2027, 2, 21)?, "International Mother's language Day", @@ -822,14 +823,14 @@ pub fn build( (NaiveDate::from_ymd_res(2027, 12, 16)?, "Victory Day"), ], &mut map, - Country::BD, - "Bangladesh", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2028, - vec![ + [ ( NaiveDate::from_ymd_res(2028, 2, 21)?, "International Mother's language Day", @@ -851,14 +852,14 @@ pub fn build( (NaiveDate::from_ymd_res(2028, 12, 16)?, "Victory Day"), ], &mut map, - Country::BD, - "Bangladesh", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2029, - vec![ + [ ( NaiveDate::from_ymd_res(2029, 2, 21)?, "International Mother's language Day", @@ -880,14 +881,14 @@ pub fn build( (NaiveDate::from_ymd_res(2029, 12, 16)?, "Victory Day"), ], &mut map, - Country::BD, - "Bangladesh", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2030, - vec![ + [ ( NaiveDate::from_ymd_res(2030, 2, 21)?, "International Mother's language Day", @@ -909,8 +910,8 @@ pub fn build( (NaiveDate::from_ymd_res(2030, 12, 16)?, "Victory Day"), ], &mut map, - Country::BD, - "Bangladesh", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/be.rs b/src/data/be.rs index d6a49b8..8f020f9 100644 --- a/src/data/be.rs +++ b/src/data/be.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Belgium"; +const COUNTY_CODE: Country = Country::BE; + /// Generate holiday map for Belgium. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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"), @@ -32,14 +33,14 @@ pub fn build( (NaiveDate::from_ymd_res(2000, 12, 25)?, "Weihnachten"), ], &mut map, - Country::BE, - "Belgium", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -54,14 +55,14 @@ pub fn build( (NaiveDate::from_ymd_res(2001, 12, 25)?, "Weihnachten"), ], &mut map, - Country::BE, - "Belgium", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -76,14 +77,14 @@ pub fn build( (NaiveDate::from_ymd_res(2002, 12, 25)?, "Weihnachten"), ], &mut map, - Country::BE, - "Belgium", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -98,14 +99,14 @@ pub fn build( (NaiveDate::from_ymd_res(2003, 12, 25)?, "Weihnachten"), ], &mut map, - Country::BE, - "Belgium", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -120,14 +121,14 @@ pub fn build( (NaiveDate::from_ymd_res(2004, 12, 25)?, "Weihnachten"), ], &mut map, - Country::BE, - "Belgium", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -142,14 +143,14 @@ pub fn build( (NaiveDate::from_ymd_res(2005, 12, 25)?, "Weihnachten"), ], &mut map, - Country::BE, - "Belgium", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -164,14 +165,14 @@ pub fn build( (NaiveDate::from_ymd_res(2006, 12, 25)?, "Weihnachten"), ], &mut map, - Country::BE, - "Belgium", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -186,14 +187,14 @@ pub fn build( (NaiveDate::from_ymd_res(2007, 12, 25)?, "Weihnachten"), ], &mut map, - Country::BE, - "Belgium", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -210,14 +211,14 @@ pub fn build( (NaiveDate::from_ymd_res(2008, 12, 25)?, "Weihnachten"), ], &mut map, - Country::BE, - "Belgium", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -232,14 +233,14 @@ pub fn build( (NaiveDate::from_ymd_res(2009, 12, 25)?, "Weihnachten"), ], &mut map, - Country::BE, - "Belgium", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -254,14 +255,14 @@ pub fn build( (NaiveDate::from_ymd_res(2010, 12, 25)?, "Weihnachten"), ], &mut map, - Country::BE, - "Belgium", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -276,14 +277,14 @@ pub fn build( (NaiveDate::from_ymd_res(2011, 12, 25)?, "Weihnachten"), ], &mut map, - Country::BE, - "Belgium", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -298,14 +299,14 @@ pub fn build( (NaiveDate::from_ymd_res(2012, 12, 25)?, "Weihnachten"), ], &mut map, - Country::BE, - "Belgium", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -320,14 +321,14 @@ pub fn build( (NaiveDate::from_ymd_res(2013, 12, 25)?, "Weihnachten"), ], &mut map, - Country::BE, - "Belgium", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -342,14 +343,14 @@ pub fn build( (NaiveDate::from_ymd_res(2014, 12, 25)?, "Weihnachten"), ], &mut map, - Country::BE, - "Belgium", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -364,14 +365,14 @@ pub fn build( (NaiveDate::from_ymd_res(2015, 12, 25)?, "Weihnachten"), ], &mut map, - Country::BE, - "Belgium", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -386,14 +387,14 @@ pub fn build( (NaiveDate::from_ymd_res(2016, 12, 25)?, "Weihnachten"), ], &mut map, - Country::BE, - "Belgium", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -408,14 +409,14 @@ pub fn build( (NaiveDate::from_ymd_res(2017, 12, 25)?, "Weihnachten"), ], &mut map, - Country::BE, - "Belgium", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -430,14 +431,14 @@ pub fn build( (NaiveDate::from_ymd_res(2018, 12, 25)?, "Weihnachten"), ], &mut map, - Country::BE, - "Belgium", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -452,14 +453,14 @@ pub fn build( (NaiveDate::from_ymd_res(2019, 12, 25)?, "Weihnachten"), ], &mut map, - Country::BE, - "Belgium", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -474,14 +475,14 @@ pub fn build( (NaiveDate::from_ymd_res(2020, 12, 25)?, "Weihnachten"), ], &mut map, - Country::BE, - "Belgium", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -496,14 +497,14 @@ pub fn build( (NaiveDate::from_ymd_res(2021, 12, 25)?, "Weihnachten"), ], &mut map, - Country::BE, - "Belgium", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -518,14 +519,14 @@ pub fn build( (NaiveDate::from_ymd_res(2022, 12, 25)?, "Weihnachten"), ], &mut map, - Country::BE, - "Belgium", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -540,14 +541,14 @@ pub fn build( (NaiveDate::from_ymd_res(2023, 12, 25)?, "Weihnachten"), ], &mut map, - Country::BE, - "Belgium", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -562,14 +563,14 @@ pub fn build( (NaiveDate::from_ymd_res(2024, 12, 25)?, "Weihnachten"), ], &mut map, - Country::BE, - "Belgium", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -584,14 +585,14 @@ pub fn build( (NaiveDate::from_ymd_res(2025, 12, 25)?, "Weihnachten"), ], &mut map, - Country::BE, - "Belgium", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -606,14 +607,14 @@ pub fn build( (NaiveDate::from_ymd_res(2026, 12, 25)?, "Weihnachten"), ], &mut map, - Country::BE, - "Belgium", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -628,14 +629,14 @@ pub fn build( (NaiveDate::from_ymd_res(2027, 12, 25)?, "Weihnachten"), ], &mut map, - Country::BE, - "Belgium", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -650,14 +651,14 @@ pub fn build( (NaiveDate::from_ymd_res(2028, 12, 25)?, "Weihnachten"), ], &mut map, - Country::BE, - "Belgium", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -672,14 +673,14 @@ pub fn build( (NaiveDate::from_ymd_res(2029, 12, 25)?, "Weihnachten"), ], &mut map, - Country::BE, - "Belgium", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -694,8 +695,8 @@ pub fn build( (NaiveDate::from_ymd_res(2030, 12, 25)?, "Weihnachten"), ], &mut map, - Country::BE, - "Belgium", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/bg.rs b/src/data/bg.rs index 431628a..9073e96 100644 --- a/src/data/bg.rs +++ b/src/data/bg.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Bulgaria"; +const COUNTY_CODE: Country = Country::BG; + /// Generate holiday map for Bulgaria. #[allow( unused_mut, @@ -9,815 +12,782 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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)?, "Рождество Христово"), + [ + (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", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Рождество Христово"), + [ + (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", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Рождество Христово"), + [ + (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", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Рождество Христово"), + [ + (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", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Рождество Христово"), + [ + (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", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Рождество Христово"), + [ + (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", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Рождество Христово"), + [ + (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", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Рождество Христово"), + [ + (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", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Рождество Христово"), + [ + (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", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Рождество Христово"), + [ + (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", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Рождество Христово"), + [ + (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", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Рождество Христово"), + [ + (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", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Рождество Христово"), + [ + (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", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Рождество Христово"), + [ + (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", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Рождество Христово"), + [ + (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", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Рождество Христово"), + [ + (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", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Рождество Христово"), + [ + (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", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Бъдни вечер (почивен ден)"), + [ + (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", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Ден на Независимостта на България (почивен ден)"), + [ + (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", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Ден на Независимостта на България (почивен ден)"), + [ + (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", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Рождество Христово (почивен ден)"), + [ + (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", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Рождество Христово (почивен ден)"), + [ + (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", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Рождество Христово (почивен ден)"), + [ + (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", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Бъдни вечер (почивен ден)"), + [ + (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", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Ден на Независимостта на България (почивен ден)"), + [ + (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", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Ден на Съединението (почивен ден)"), + [ + (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", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Рождество Христово (почивен ден)"), + [ + (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", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Рождество Христово (почивен ден)"), + [ + (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", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Бъдни вечер (почивен ден)"), + [ + (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", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Ден на Независимостта на България (почивен ден)"), + [ + (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", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Ден на Независимостта на България (почивен ден)"), + [ + (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", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/bi.rs b/src/data/bi.rs index b75bbc0..edae9c6 100644 --- a/src/data/bi.rs +++ b/src/data/bi.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Burundi"; +const COUNTY_CODE: Country = Country::BI; + /// Generate holiday map for Burundi. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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"), ( @@ -52,14 +53,14 @@ pub fn build( ), ], &mut map, - Country::BI, - "Burundi", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -102,14 +103,14 @@ pub fn build( ), ], &mut map, - Country::BI, - "Burundi", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -144,14 +145,14 @@ pub fn build( ), ], &mut map, - Country::BI, - "Burundi", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -186,14 +187,14 @@ pub fn build( ), ], &mut map, - Country::BI, - "Burundi", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -236,14 +237,14 @@ pub fn build( ), ], &mut map, - Country::BI, - "Burundi", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -282,14 +283,14 @@ pub fn build( ), ], &mut map, - Country::BI, - "Burundi", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2006, - vec![ + [ (NaiveDate::from_ymd_res(2006, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2006, 1, 2)?, @@ -329,14 +330,14 @@ pub fn build( ), ], &mut map, - Country::BI, - "Burundi", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -371,14 +372,14 @@ pub fn build( ), ], &mut map, - Country::BI, - "Burundi", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -415,14 +416,14 @@ pub fn build( ), ], &mut map, - Country::BI, - "Burundi", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -461,14 +462,14 @@ pub fn build( ), ], &mut map, - Country::BI, - "Burundi", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -503,14 +504,14 @@ pub fn build( ), ], &mut map, - Country::BI, - "Burundi", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -553,14 +554,14 @@ pub fn build( ), ], &mut map, - Country::BI, - "Burundi", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2012, - vec![ + [ (NaiveDate::from_ymd_res(2012, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2012, 1, 2)?, @@ -608,14 +609,14 @@ pub fn build( ), ], &mut map, - Country::BI, - "Burundi", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -650,14 +651,14 @@ pub fn build( ), ], &mut map, - Country::BI, - "Burundi", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -692,14 +693,14 @@ pub fn build( ), ], &mut map, - Country::BI, - "Burundi", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -734,14 +735,14 @@ pub fn build( ), ], &mut map, - Country::BI, - "Burundi", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -784,14 +785,14 @@ pub fn build( ), ], &mut map, - Country::BI, - "Burundi", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2017, - vec![ + [ (NaiveDate::from_ymd_res(2017, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2017, 1, 2)?, @@ -831,14 +832,14 @@ pub fn build( ), ], &mut map, - Country::BI, - "Burundi", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -877,14 +878,14 @@ pub fn build( ), ], &mut map, - Country::BI, - "Burundi", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -923,14 +924,14 @@ pub fn build( ), ], &mut map, - Country::BI, - "Burundi", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -969,14 +970,14 @@ pub fn build( ), ], &mut map, - Country::BI, - "Burundi", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -1010,14 +1011,14 @@ pub fn build( ), ], &mut map, - Country::BI, - "Burundi", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -1056,14 +1057,14 @@ pub fn build( ), ], &mut map, - Country::BI, - "Burundi", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2023, - vec![ + [ (NaiveDate::from_ymd_res(2023, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2023, 1, 2)?, @@ -1103,14 +1104,14 @@ pub fn build( ), ], &mut map, - Country::BI, - "Burundi", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -1153,14 +1154,14 @@ pub fn build( ), ], &mut map, - Country::BI, - "Burundi", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -1207,14 +1208,14 @@ pub fn build( ), ], &mut map, - Country::BI, - "Burundi", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -1253,14 +1254,14 @@ pub fn build( ), ], &mut map, - Country::BI, - "Burundi", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -1303,14 +1304,14 @@ pub fn build( ), ], &mut map, - Country::BI, - "Burundi", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -1345,14 +1346,14 @@ pub fn build( ), ], &mut map, - Country::BI, - "Burundi", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -1395,14 +1396,14 @@ pub fn build( ), ], &mut map, - Country::BI, - "Burundi", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -1441,8 +1442,8 @@ pub fn build( ), ], &mut map, - Country::BI, - "Burundi", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/bo.rs b/src/data/bo.rs index 5eb720b..b7e57ca 100644 --- a/src/data/bo.rs +++ b/src/data/bo.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Bolivia"; +const COUNTY_CODE: Country = Country::BO; + /// Generate holiday map for Bolivia. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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"), @@ -39,14 +40,14 @@ pub fn build( (NaiveDate::from_ymd_res(2000, 12, 25)?, "Navidad"), ], &mut map, - Country::BO, - "Bolivia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -64,14 +65,14 @@ pub fn build( (NaiveDate::from_ymd_res(2001, 12, 25)?, "Navidad"), ], &mut map, - Country::BO, - "Bolivia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -89,14 +90,14 @@ pub fn build( (NaiveDate::from_ymd_res(2002, 12, 25)?, "Navidad"), ], &mut map, - Country::BO, - "Bolivia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -118,14 +119,14 @@ pub fn build( (NaiveDate::from_ymd_res(2003, 12, 25)?, "Navidad"), ], &mut map, - Country::BO, - "Bolivia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -143,14 +144,14 @@ pub fn build( (NaiveDate::from_ymd_res(2004, 12, 25)?, "Navidad"), ], &mut map, - Country::BO, - "Bolivia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -176,14 +177,14 @@ pub fn build( ), ], &mut map, - Country::BO, - "Bolivia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2006, - vec![ + [ (NaiveDate::from_ymd_res(2006, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2006, 1, 2)?, @@ -209,14 +210,14 @@ pub fn build( (NaiveDate::from_ymd_res(2006, 12, 25)?, "Navidad"), ], &mut map, - Country::BO, - "Bolivia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -234,14 +235,14 @@ pub fn build( (NaiveDate::from_ymd_res(2007, 12, 25)?, "Navidad"), ], &mut map, - Country::BO, - "Bolivia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -263,14 +264,14 @@ pub fn build( (NaiveDate::from_ymd_res(2008, 12, 25)?, "Navidad"), ], &mut map, - Country::BO, - "Bolivia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -296,14 +297,14 @@ pub fn build( (NaiveDate::from_ymd_res(2009, 12, 25)?, "Navidad"), ], &mut map, - Country::BO, - "Bolivia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2010, - vec![ + [ (NaiveDate::from_ymd_res(2010, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2010, 1, 22)?, @@ -329,14 +330,14 @@ pub fn build( (NaiveDate::from_ymd_res(2010, 12, 25)?, "Navidad"), ], &mut map, - Country::BO, - "Bolivia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2011, - vec![ + [ (NaiveDate::from_ymd_res(2011, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2011, 1, 22)?, @@ -370,14 +371,14 @@ pub fn build( ), ], &mut map, - Country::BO, - "Bolivia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2012, - vec![ + [ (NaiveDate::from_ymd_res(2012, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2012, 1, 2)?, @@ -415,14 +416,14 @@ pub fn build( (NaiveDate::from_ymd_res(2012, 12, 25)?, "Navidad"), ], &mut map, - Country::BO, - "Bolivia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2013, - vec![ + [ (NaiveDate::from_ymd_res(2013, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2013, 1, 22)?, @@ -448,14 +449,14 @@ pub fn build( (NaiveDate::from_ymd_res(2013, 12, 25)?, "Navidad"), ], &mut map, - Country::BO, - "Bolivia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2014, - vec![ + [ (NaiveDate::from_ymd_res(2014, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2014, 1, 22)?, @@ -489,14 +490,14 @@ pub fn build( (NaiveDate::from_ymd_res(2014, 12, 25)?, "Navidad"), ], &mut map, - Country::BO, - "Bolivia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2015, - vec![ + [ (NaiveDate::from_ymd_res(2015, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2015, 1, 22)?, @@ -526,14 +527,14 @@ pub fn build( (NaiveDate::from_ymd_res(2015, 12, 25)?, "Navidad"), ], &mut map, - Country::BO, - "Bolivia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2016, - vec![ + [ (NaiveDate::from_ymd_res(2016, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2016, 1, 22)?, @@ -567,14 +568,14 @@ pub fn build( ), ], &mut map, - Country::BO, - "Bolivia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2017, - vec![ + [ (NaiveDate::from_ymd_res(2017, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2017, 1, 2)?, @@ -612,14 +613,14 @@ pub fn build( (NaiveDate::from_ymd_res(2017, 12, 25)?, "Navidad"), ], &mut map, - Country::BO, - "Bolivia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2018, - vec![ + [ (NaiveDate::from_ymd_res(2018, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2018, 1, 22)?, @@ -645,14 +646,14 @@ pub fn build( (NaiveDate::from_ymd_res(2018, 12, 25)?, "Navidad"), ], &mut map, - Country::BO, - "Bolivia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2019, - vec![ + [ (NaiveDate::from_ymd_res(2019, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2019, 1, 22)?, @@ -678,14 +679,14 @@ pub fn build( (NaiveDate::from_ymd_res(2019, 12, 25)?, "Navidad"), ], &mut map, - Country::BO, - "Bolivia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2020, - vec![ + [ (NaiveDate::from_ymd_res(2020, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2020, 1, 22)?, @@ -719,14 +720,14 @@ pub fn build( (NaiveDate::from_ymd_res(2020, 12, 25)?, "Navidad"), ], &mut map, - Country::BO, - "Bolivia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2021, - vec![ + [ (NaiveDate::from_ymd_res(2021, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2021, 1, 22)?, @@ -756,14 +757,14 @@ pub fn build( (NaiveDate::from_ymd_res(2021, 12, 25)?, "Navidad"), ], &mut map, - Country::BO, - "Bolivia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2022, - vec![ + [ (NaiveDate::from_ymd_res(2022, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2022, 1, 22)?, @@ -801,14 +802,14 @@ pub fn build( ), ], &mut map, - Country::BO, - "Bolivia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2023, - vec![ + [ (NaiveDate::from_ymd_res(2023, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2023, 1, 2)?, @@ -850,14 +851,14 @@ pub fn build( (NaiveDate::from_ymd_res(2023, 12, 25)?, "Navidad"), ], &mut map, - Country::BO, - "Bolivia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2024, - vec![ + [ (NaiveDate::from_ymd_res(2024, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2024, 1, 22)?, @@ -887,14 +888,14 @@ pub fn build( (NaiveDate::from_ymd_res(2024, 12, 25)?, "Navidad"), ], &mut map, - Country::BO, - "Bolivia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2025, - vec![ + [ (NaiveDate::from_ymd_res(2025, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2025, 1, 22)?, @@ -924,14 +925,14 @@ pub fn build( (NaiveDate::from_ymd_res(2025, 12, 25)?, "Navidad"), ], &mut map, - Country::BO, - "Bolivia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2026, - vec![ + [ (NaiveDate::from_ymd_res(2026, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2026, 1, 22)?, @@ -965,14 +966,14 @@ pub fn build( (NaiveDate::from_ymd_res(2026, 12, 25)?, "Navidad"), ], &mut map, - Country::BO, - "Bolivia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2027, - vec![ + [ (NaiveDate::from_ymd_res(2027, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2027, 1, 22)?, @@ -1002,14 +1003,14 @@ pub fn build( (NaiveDate::from_ymd_res(2027, 12, 25)?, "Navidad"), ], &mut map, - Country::BO, - "Bolivia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2028, - vec![ + [ (NaiveDate::from_ymd_res(2028, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2028, 1, 22)?, @@ -1043,14 +1044,14 @@ pub fn build( (NaiveDate::from_ymd_res(2028, 12, 25)?, "Navidad"), ], &mut map, - Country::BO, - "Bolivia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2029, - vec![ + [ (NaiveDate::from_ymd_res(2029, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2029, 1, 22)?, @@ -1080,14 +1081,14 @@ pub fn build( (NaiveDate::from_ymd_res(2029, 12, 25)?, "Navidad"), ], &mut map, - Country::BO, - "Bolivia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2030, - vec![ + [ (NaiveDate::from_ymd_res(2030, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2030, 1, 22)?, @@ -1117,8 +1118,8 @@ pub fn build( (NaiveDate::from_ymd_res(2030, 12, 25)?, "Navidad"), ], &mut map, - Country::BO, - "Bolivia", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/br.rs b/src/data/br.rs index 50e8ce6..9cb5322 100644 --- a/src/data/br.rs +++ b/src/data/br.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Brazil"; +const COUNTY_CODE: Country = Country::BR; + /// Generate holiday map for Brazil. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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", @@ -43,14 +44,14 @@ pub fn build( (NaiveDate::from_ymd_res(2000, 12, 25)?, "Natal"), ], &mut map, - Country::BR, - "Brazil", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2001, - vec![ + [ ( NaiveDate::from_ymd_res(2001, 1, 1)?, "Confraternização Universal", @@ -74,14 +75,14 @@ pub fn build( (NaiveDate::from_ymd_res(2001, 12, 25)?, "Natal"), ], &mut map, - Country::BR, - "Brazil", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2002, - vec![ + [ ( NaiveDate::from_ymd_res(2002, 1, 1)?, "Confraternização Universal", @@ -105,14 +106,14 @@ pub fn build( (NaiveDate::from_ymd_res(2002, 12, 25)?, "Natal"), ], &mut map, - Country::BR, - "Brazil", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2003, - vec![ + [ ( NaiveDate::from_ymd_res(2003, 1, 1)?, "Confraternização Universal", @@ -136,14 +137,14 @@ pub fn build( (NaiveDate::from_ymd_res(2003, 12, 25)?, "Natal"), ], &mut map, - Country::BR, - "Brazil", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2004, - vec![ + [ ( NaiveDate::from_ymd_res(2004, 1, 1)?, "Confraternização Universal", @@ -167,14 +168,14 @@ pub fn build( (NaiveDate::from_ymd_res(2004, 12, 25)?, "Natal"), ], &mut map, - Country::BR, - "Brazil", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2005, - vec![ + [ ( NaiveDate::from_ymd_res(2005, 1, 1)?, "Confraternização Universal", @@ -198,14 +199,14 @@ pub fn build( (NaiveDate::from_ymd_res(2005, 12, 25)?, "Natal"), ], &mut map, - Country::BR, - "Brazil", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2006, - vec![ + [ ( NaiveDate::from_ymd_res(2006, 1, 1)?, "Confraternização Universal", @@ -229,14 +230,14 @@ pub fn build( (NaiveDate::from_ymd_res(2006, 12, 25)?, "Natal"), ], &mut map, - Country::BR, - "Brazil", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2007, - vec![ + [ ( NaiveDate::from_ymd_res(2007, 1, 1)?, "Confraternização Universal", @@ -260,14 +261,14 @@ pub fn build( (NaiveDate::from_ymd_res(2007, 12, 25)?, "Natal"), ], &mut map, - Country::BR, - "Brazil", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2008, - vec![ + [ ( NaiveDate::from_ymd_res(2008, 1, 1)?, "Confraternização Universal", @@ -291,14 +292,14 @@ pub fn build( (NaiveDate::from_ymd_res(2008, 12, 25)?, "Natal"), ], &mut map, - Country::BR, - "Brazil", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2009, - vec![ + [ ( NaiveDate::from_ymd_res(2009, 1, 1)?, "Confraternização Universal", @@ -322,14 +323,14 @@ pub fn build( (NaiveDate::from_ymd_res(2009, 12, 25)?, "Natal"), ], &mut map, - Country::BR, - "Brazil", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2010, - vec![ + [ ( NaiveDate::from_ymd_res(2010, 1, 1)?, "Confraternização Universal", @@ -353,14 +354,14 @@ pub fn build( (NaiveDate::from_ymd_res(2010, 12, 25)?, "Natal"), ], &mut map, - Country::BR, - "Brazil", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2011, - vec![ + [ ( NaiveDate::from_ymd_res(2011, 1, 1)?, "Confraternização Universal", @@ -384,14 +385,14 @@ pub fn build( (NaiveDate::from_ymd_res(2011, 12, 25)?, "Natal"), ], &mut map, - Country::BR, - "Brazil", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2012, - vec![ + [ ( NaiveDate::from_ymd_res(2012, 1, 1)?, "Confraternização Universal", @@ -415,14 +416,14 @@ pub fn build( (NaiveDate::from_ymd_res(2012, 12, 25)?, "Natal"), ], &mut map, - Country::BR, - "Brazil", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2013, - vec![ + [ ( NaiveDate::from_ymd_res(2013, 1, 1)?, "Confraternização Universal", @@ -446,14 +447,14 @@ pub fn build( (NaiveDate::from_ymd_res(2013, 12, 25)?, "Natal"), ], &mut map, - Country::BR, - "Brazil", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2014, - vec![ + [ ( NaiveDate::from_ymd_res(2014, 1, 1)?, "Confraternização Universal", @@ -477,14 +478,14 @@ pub fn build( (NaiveDate::from_ymd_res(2014, 12, 25)?, "Natal"), ], &mut map, - Country::BR, - "Brazil", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2015, - vec![ + [ ( NaiveDate::from_ymd_res(2015, 1, 1)?, "Confraternização Universal", @@ -508,14 +509,14 @@ pub fn build( (NaiveDate::from_ymd_res(2015, 12, 25)?, "Natal"), ], &mut map, - Country::BR, - "Brazil", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2016, - vec![ + [ ( NaiveDate::from_ymd_res(2016, 1, 1)?, "Confraternização Universal", @@ -539,14 +540,14 @@ pub fn build( (NaiveDate::from_ymd_res(2016, 12, 25)?, "Natal"), ], &mut map, - Country::BR, - "Brazil", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2017, - vec![ + [ ( NaiveDate::from_ymd_res(2017, 1, 1)?, "Confraternização Universal", @@ -570,14 +571,14 @@ pub fn build( (NaiveDate::from_ymd_res(2017, 12, 25)?, "Natal"), ], &mut map, - Country::BR, - "Brazil", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2018, - vec![ + [ ( NaiveDate::from_ymd_res(2018, 1, 1)?, "Confraternização Universal", @@ -601,14 +602,14 @@ pub fn build( (NaiveDate::from_ymd_res(2018, 12, 25)?, "Natal"), ], &mut map, - Country::BR, - "Brazil", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2019, - vec![ + [ ( NaiveDate::from_ymd_res(2019, 1, 1)?, "Confraternização Universal", @@ -632,14 +633,14 @@ pub fn build( (NaiveDate::from_ymd_res(2019, 12, 25)?, "Natal"), ], &mut map, - Country::BR, - "Brazil", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2020, - vec![ + [ ( NaiveDate::from_ymd_res(2020, 1, 1)?, "Confraternização Universal", @@ -663,14 +664,14 @@ pub fn build( (NaiveDate::from_ymd_res(2020, 12, 25)?, "Natal"), ], &mut map, - Country::BR, - "Brazil", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2021, - vec![ + [ ( NaiveDate::from_ymd_res(2021, 1, 1)?, "Confraternização Universal", @@ -694,14 +695,14 @@ pub fn build( (NaiveDate::from_ymd_res(2021, 12, 25)?, "Natal"), ], &mut map, - Country::BR, - "Brazil", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2022, - vec![ + [ ( NaiveDate::from_ymd_res(2022, 1, 1)?, "Confraternização Universal", @@ -725,14 +726,14 @@ pub fn build( (NaiveDate::from_ymd_res(2022, 12, 25)?, "Natal"), ], &mut map, - Country::BR, - "Brazil", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2023, - vec![ + [ ( NaiveDate::from_ymd_res(2023, 1, 1)?, "Confraternização Universal", @@ -756,14 +757,14 @@ pub fn build( (NaiveDate::from_ymd_res(2023, 12, 25)?, "Natal"), ], &mut map, - Country::BR, - "Brazil", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2024, - vec![ + [ ( NaiveDate::from_ymd_res(2024, 1, 1)?, "Confraternização Universal", @@ -787,14 +788,14 @@ pub fn build( (NaiveDate::from_ymd_res(2024, 12, 25)?, "Natal"), ], &mut map, - Country::BR, - "Brazil", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2025, - vec![ + [ ( NaiveDate::from_ymd_res(2025, 1, 1)?, "Confraternização Universal", @@ -818,14 +819,14 @@ pub fn build( (NaiveDate::from_ymd_res(2025, 12, 25)?, "Natal"), ], &mut map, - Country::BR, - "Brazil", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2026, - vec![ + [ ( NaiveDate::from_ymd_res(2026, 1, 1)?, "Confraternização Universal", @@ -849,14 +850,14 @@ pub fn build( (NaiveDate::from_ymd_res(2026, 12, 25)?, "Natal"), ], &mut map, - Country::BR, - "Brazil", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2027, - vec![ + [ ( NaiveDate::from_ymd_res(2027, 1, 1)?, "Confraternização Universal", @@ -880,14 +881,14 @@ pub fn build( (NaiveDate::from_ymd_res(2027, 12, 25)?, "Natal"), ], &mut map, - Country::BR, - "Brazil", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2028, - vec![ + [ ( NaiveDate::from_ymd_res(2028, 1, 1)?, "Confraternização Universal", @@ -911,14 +912,14 @@ pub fn build( (NaiveDate::from_ymd_res(2028, 12, 25)?, "Natal"), ], &mut map, - Country::BR, - "Brazil", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2029, - vec![ + [ ( NaiveDate::from_ymd_res(2029, 1, 1)?, "Confraternização Universal", @@ -942,14 +943,14 @@ pub fn build( (NaiveDate::from_ymd_res(2029, 12, 25)?, "Natal"), ], &mut map, - Country::BR, - "Brazil", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2030, - vec![ + [ ( NaiveDate::from_ymd_res(2030, 1, 1)?, "Confraternização Universal", @@ -973,8 +974,8 @@ pub fn build( (NaiveDate::from_ymd_res(2030, 12, 25)?, "Natal"), ], &mut map, - Country::BR, - "Brazil", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/bw.rs b/src/data/bw.rs index a267f9a..58ac461 100644 --- a/src/data/bw.rs +++ b/src/data/bw.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Botswana"; +const COUNTY_CODE: Country = Country::BW; + /// Generate holiday map for Botswana. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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)?, @@ -54,14 +55,14 @@ pub fn build( (NaiveDate::from_ymd_res(2000, 12, 26)?, "Boxing Day"), ], &mut map, - Country::BW, - "Botswana", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2001, - vec![ + [ (NaiveDate::from_ymd_res(2001, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2001, 1, 2)?, @@ -98,14 +99,14 @@ pub fn build( (NaiveDate::from_ymd_res(2001, 12, 26)?, "Boxing Day"), ], &mut map, - Country::BW, - "Botswana", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2002, - vec![ + [ (NaiveDate::from_ymd_res(2002, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2002, 1, 2)?, @@ -134,14 +135,14 @@ pub fn build( (NaiveDate::from_ymd_res(2002, 12, 26)?, "Boxing Day"), ], &mut map, - Country::BW, - "Botswana", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2003, - vec![ + [ (NaiveDate::from_ymd_res(2003, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2003, 1, 2)?, @@ -170,14 +171,14 @@ pub fn build( (NaiveDate::from_ymd_res(2003, 12, 26)?, "Boxing Day"), ], &mut map, - Country::BW, - "Botswana", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2004, - vec![ + [ (NaiveDate::from_ymd_res(2004, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2004, 1, 2)?, @@ -210,14 +211,14 @@ pub fn build( ), ], &mut map, - Country::BW, - "Botswana", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2005, - vec![ + [ (NaiveDate::from_ymd_res(2005, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2005, 1, 2)?, @@ -258,14 +259,14 @@ pub fn build( (NaiveDate::from_ymd_res(2005, 12, 26)?, "Boxing Day"), ], &mut map, - Country::BW, - "Botswana", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2006, - vec![ + [ (NaiveDate::from_ymd_res(2006, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2006, 1, 3)?, @@ -302,14 +303,14 @@ pub fn build( (NaiveDate::from_ymd_res(2006, 12, 26)?, "Boxing Day"), ], &mut map, - Country::BW, - "Botswana", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2007, - vec![ + [ (NaiveDate::from_ymd_res(2007, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2007, 1, 2)?, @@ -346,14 +347,14 @@ pub fn build( (NaiveDate::from_ymd_res(2007, 12, 26)?, "Boxing Day"), ], &mut map, - Country::BW, - "Botswana", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2008, - vec![ + [ (NaiveDate::from_ymd_res(2008, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2008, 1, 2)?, @@ -384,14 +385,14 @@ pub fn build( (NaiveDate::from_ymd_res(2008, 12, 26)?, "Boxing Day"), ], &mut map, - Country::BW, - "Botswana", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2009, - vec![ + [ (NaiveDate::from_ymd_res(2009, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2009, 1, 2)?, @@ -420,14 +421,14 @@ pub fn build( (NaiveDate::from_ymd_res(2009, 12, 26)?, "Boxing Day"), ], &mut map, - Country::BW, - "Botswana", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2010, - vec![ + [ (NaiveDate::from_ymd_res(2010, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2010, 1, 2)?, @@ -460,14 +461,14 @@ pub fn build( ), ], &mut map, - Country::BW, - "Botswana", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2011, - vec![ + [ (NaiveDate::from_ymd_res(2011, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2011, 1, 2)?, @@ -508,14 +509,14 @@ pub fn build( (NaiveDate::from_ymd_res(2011, 12, 26)?, "Boxing Day"), ], &mut map, - Country::BW, - "Botswana", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2012, - vec![ + [ (NaiveDate::from_ymd_res(2012, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2012, 1, 3)?, @@ -556,14 +557,14 @@ pub fn build( (NaiveDate::from_ymd_res(2012, 12, 26)?, "Boxing Day"), ], &mut map, - Country::BW, - "Botswana", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2013, - vec![ + [ (NaiveDate::from_ymd_res(2013, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2013, 1, 2)?, @@ -592,14 +593,14 @@ pub fn build( (NaiveDate::from_ymd_res(2013, 12, 26)?, "Boxing Day"), ], &mut map, - Country::BW, - "Botswana", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2014, - vec![ + [ (NaiveDate::from_ymd_res(2014, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2014, 1, 2)?, @@ -628,14 +629,14 @@ pub fn build( (NaiveDate::from_ymd_res(2014, 12, 26)?, "Boxing Day"), ], &mut map, - Country::BW, - "Botswana", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2015, - vec![ + [ (NaiveDate::from_ymd_res(2015, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2015, 1, 2)?, @@ -664,14 +665,14 @@ pub fn build( (NaiveDate::from_ymd_res(2015, 12, 26)?, "Boxing Day"), ], &mut map, - Country::BW, - "Botswana", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2016, - vec![ + [ (NaiveDate::from_ymd_res(2016, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2016, 1, 2)?, @@ -708,14 +709,14 @@ pub fn build( (NaiveDate::from_ymd_res(2016, 12, 26)?, "Boxing Day"), ], &mut map, - Country::BW, - "Botswana", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2017, - vec![ + [ (NaiveDate::from_ymd_res(2017, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2017, 1, 3)?, @@ -752,14 +753,14 @@ pub fn build( (NaiveDate::from_ymd_res(2017, 12, 26)?, "Boxing Day"), ], &mut map, - Country::BW, - "Botswana", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2018, - vec![ + [ (NaiveDate::from_ymd_res(2018, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2018, 1, 2)?, @@ -796,14 +797,14 @@ pub fn build( (NaiveDate::from_ymd_res(2018, 12, 26)?, "Boxing Day"), ], &mut map, - Country::BW, - "Botswana", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2019, - vec![ + [ (NaiveDate::from_ymd_res(2019, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2019, 1, 2)?, @@ -833,14 +834,14 @@ pub fn build( (NaiveDate::from_ymd_res(2019, 7, 2)?, "Public Holiday"), ], &mut map, - Country::BW, - "Botswana", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2020, - vec![ + [ (NaiveDate::from_ymd_res(2020, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2020, 1, 2)?, @@ -870,14 +871,14 @@ pub fn build( (NaiveDate::from_ymd_res(2020, 12, 28)?, "Boxing Day Holiday"), ], &mut map, - Country::BW, - "Botswana", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2021, - vec![ + [ (NaiveDate::from_ymd_res(2021, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2021, 1, 2)?, @@ -911,14 +912,14 @@ pub fn build( ), ], &mut map, - Country::BW, - "Botswana", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2022, - vec![ + [ (NaiveDate::from_ymd_res(2022, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2022, 1, 2)?, @@ -959,14 +960,14 @@ pub fn build( (NaiveDate::from_ymd_res(2022, 12, 26)?, "Boxing Day"), ], &mut map, - Country::BW, - "Botswana", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2023, - vec![ + [ (NaiveDate::from_ymd_res(2023, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2023, 1, 3)?, @@ -1003,14 +1004,14 @@ pub fn build( (NaiveDate::from_ymd_res(2023, 12, 26)?, "Boxing Day"), ], &mut map, - Country::BW, - "Botswana", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2024, - vec![ + [ (NaiveDate::from_ymd_res(2024, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2024, 1, 2)?, @@ -1039,14 +1040,14 @@ pub fn build( (NaiveDate::from_ymd_res(2024, 12, 26)?, "Boxing Day"), ], &mut map, - Country::BW, - "Botswana", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2025, - vec![ + [ (NaiveDate::from_ymd_res(2025, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2025, 1, 2)?, @@ -1075,14 +1076,14 @@ pub fn build( (NaiveDate::from_ymd_res(2025, 12, 26)?, "Boxing Day"), ], &mut map, - Country::BW, - "Botswana", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2026, - vec![ + [ (NaiveDate::from_ymd_res(2026, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2026, 1, 2)?, @@ -1112,14 +1113,14 @@ pub fn build( (NaiveDate::from_ymd_res(2026, 12, 28)?, "Boxing Day Holiday"), ], &mut map, - Country::BW, - "Botswana", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2027, - vec![ + [ (NaiveDate::from_ymd_res(2027, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2027, 1, 2)?, @@ -1153,14 +1154,14 @@ pub fn build( ), ], &mut map, - Country::BW, - "Botswana", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2028, - vec![ + [ (NaiveDate::from_ymd_res(2028, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2028, 1, 2)?, @@ -1197,14 +1198,14 @@ pub fn build( (NaiveDate::from_ymd_res(2028, 12, 26)?, "Boxing Day"), ], &mut map, - Country::BW, - "Botswana", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2029, - vec![ + [ (NaiveDate::from_ymd_res(2029, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2029, 1, 2)?, @@ -1241,14 +1242,14 @@ pub fn build( (NaiveDate::from_ymd_res(2029, 12, 26)?, "Boxing Day"), ], &mut map, - Country::BW, - "Botswana", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2030, - vec![ + [ (NaiveDate::from_ymd_res(2030, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2030, 1, 2)?, @@ -1277,8 +1278,8 @@ pub fn build( (NaiveDate::from_ymd_res(2030, 12, 26)?, "Boxing Day"), ], &mut map, - Country::BW, - "Botswana", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/by.rs b/src/data/by.rs index 234d9bf..ef5c867 100644 --- a/src/data/by.rs +++ b/src/data/by.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Belarus"; +const COUNTY_CODE: Country = Country::BY; + /// Generate holiday map for Belarus. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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)?, @@ -51,14 +52,14 @@ pub fn build( ), ], &mut map, - Country::BY, - "Belarus", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2001, - vec![ + [ (NaiveDate::from_ymd_res(2001, 1, 1)?, "Новы год"), ( NaiveDate::from_ymd_res(2001, 1, 7)?, @@ -110,14 +111,14 @@ pub fn build( ), ], &mut map, - Country::BY, - "Belarus", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2002, - vec![ + [ (NaiveDate::from_ymd_res(2002, 1, 1)?, "Новы год"), ( NaiveDate::from_ymd_res(2002, 1, 7)?, @@ -153,14 +154,14 @@ pub fn build( ), ], &mut map, - Country::BY, - "Belarus", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2003, - vec![ + [ (NaiveDate::from_ymd_res(2003, 1, 1)?, "Новы год"), ( NaiveDate::from_ymd_res(2003, 1, 7)?, @@ -192,14 +193,14 @@ pub fn build( ), ], &mut map, - Country::BY, - "Belarus", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2004, - vec![ + [ (NaiveDate::from_ymd_res(2004, 1, 1)?, "Новы год"), ( NaiveDate::from_ymd_res(2004, 1, 7)?, @@ -239,14 +240,14 @@ pub fn build( ), ], &mut map, - Country::BY, - "Belarus", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2005, - vec![ + [ (NaiveDate::from_ymd_res(2005, 1, 1)?, "Новы год"), ( NaiveDate::from_ymd_res(2005, 1, 7)?, @@ -274,14 +275,14 @@ pub fn build( ), ], &mut map, - Country::BY, - "Belarus", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2006, - vec![ + [ (NaiveDate::from_ymd_res(2006, 1, 1)?, "Новы год"), ( NaiveDate::from_ymd_res(2006, 1, 7)?, @@ -317,14 +318,14 @@ pub fn build( ), ], &mut map, - Country::BY, - "Belarus", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2007, - vec![ + [ (NaiveDate::from_ymd_res(2007, 1, 1)?, "Новы год"), ( NaiveDate::from_ymd_res(2007, 1, 7)?, @@ -376,14 +377,14 @@ pub fn build( ), ], &mut map, - Country::BY, - "Belarus", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2008, - vec![ + [ (NaiveDate::from_ymd_res(2008, 1, 1)?, "Новы год"), ( NaiveDate::from_ymd_res(2008, 1, 7)?, @@ -423,14 +424,14 @@ pub fn build( ), ], &mut map, - Country::BY, - "Belarus", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2009, - vec![ + [ (NaiveDate::from_ymd_res(2009, 1, 1)?, "Новы год"), ( NaiveDate::from_ymd_res(2009, 1, 7)?, @@ -462,14 +463,14 @@ pub fn build( ), ], &mut map, - Country::BY, - "Belarus", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2010, - vec![ + [ (NaiveDate::from_ymd_res(2010, 1, 1)?, "Новы год"), ( NaiveDate::from_ymd_res(2010, 1, 7)?, @@ -505,14 +506,14 @@ pub fn build( ), ], &mut map, - Country::BY, - "Belarus", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2011, - vec![ + [ (NaiveDate::from_ymd_res(2011, 1, 1)?, "Новы год"), ( NaiveDate::from_ymd_res(2011, 1, 7)?, @@ -544,14 +545,14 @@ pub fn build( ), ], &mut map, - Country::BY, - "Belarus", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2012, - vec![ + [ (NaiveDate::from_ymd_res(2012, 1, 1)?, "Новы год"), ( NaiveDate::from_ymd_res(2012, 1, 7)?, @@ -595,14 +596,14 @@ pub fn build( ), ], &mut map, - Country::BY, - "Belarus", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2013, - vec![ + [ (NaiveDate::from_ymd_res(2013, 1, 1)?, "Новы год"), ( NaiveDate::from_ymd_res(2013, 1, 7)?, @@ -634,14 +635,14 @@ pub fn build( ), ], &mut map, - Country::BY, - "Belarus", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2014, - vec![ + [ (NaiveDate::from_ymd_res(2014, 1, 1)?, "Новы год"), ( NaiveDate::from_ymd_res(2014, 1, 7)?, @@ -685,14 +686,14 @@ pub fn build( ), ], &mut map, - Country::BY, - "Belarus", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2015, - vec![ + [ (NaiveDate::from_ymd_res(2015, 1, 1)?, "Новы год"), ( NaiveDate::from_ymd_res(2015, 1, 7)?, @@ -724,14 +725,14 @@ pub fn build( ), ], &mut map, - Country::BY, - "Belarus", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2016, - vec![ + [ (NaiveDate::from_ymd_res(2016, 1, 1)?, "Новы год"), ( NaiveDate::from_ymd_res(2016, 1, 7)?, @@ -763,14 +764,14 @@ pub fn build( ), ], &mut map, - Country::BY, - "Belarus", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2017, - vec![ + [ (NaiveDate::from_ymd_res(2017, 1, 1)?, "Новы год"), ( NaiveDate::from_ymd_res(2017, 1, 7)?, @@ -810,14 +811,14 @@ pub fn build( ), ], &mut map, - Country::BY, - "Belarus", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2018, - vec![ + [ (NaiveDate::from_ymd_res(2018, 1, 1)?, "Новы год"), ( NaiveDate::from_ymd_res(2018, 1, 7)?, @@ -869,14 +870,14 @@ pub fn build( ), ], &mut map, - Country::BY, - "Belarus", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2019, - vec![ + [ (NaiveDate::from_ymd_res(2019, 1, 1)?, "Новы год"), ( NaiveDate::from_ymd_res(2019, 1, 7)?, @@ -912,14 +913,14 @@ pub fn build( ), ], &mut map, - Country::BY, - "Belarus", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2020, - vec![ + [ (NaiveDate::from_ymd_res(2020, 1, 1)?, "Новы год"), (NaiveDate::from_ymd_res(2020, 1, 2)?, "Новы год"), ( @@ -952,14 +953,14 @@ pub fn build( ), ], &mut map, - Country::BY, - "Belarus", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2021, - vec![ + [ (NaiveDate::from_ymd_res(2021, 1, 1)?, "Новы год"), (NaiveDate::from_ymd_res(2021, 1, 2)?, "Новы год"), ( @@ -992,14 +993,14 @@ pub fn build( ), ], &mut map, - Country::BY, - "Belarus", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2022, - vec![ + [ (NaiveDate::from_ymd_res(2022, 1, 1)?, "Новы год"), (NaiveDate::from_ymd_res(2022, 1, 2)?, "Новы год"), ( @@ -1032,14 +1033,14 @@ pub fn build( ), ], &mut map, - Country::BY, - "Belarus", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2023, - vec![ + [ (NaiveDate::from_ymd_res(2023, 1, 1)?, "Новы год"), (NaiveDate::from_ymd_res(2023, 1, 2)?, "Новы год"), ( @@ -1076,14 +1077,14 @@ pub fn build( ), ], &mut map, - Country::BY, - "Belarus", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2024, - vec![ + [ (NaiveDate::from_ymd_res(2024, 1, 1)?, "Новы год"), (NaiveDate::from_ymd_res(2024, 1, 2)?, "Новы год"), ( @@ -1108,14 +1109,14 @@ pub fn build( ), ], &mut map, - Country::BY, - "Belarus", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2025, - vec![ + [ (NaiveDate::from_ymd_res(2025, 1, 1)?, "Новы год"), (NaiveDate::from_ymd_res(2025, 1, 2)?, "Новы год"), ( @@ -1140,14 +1141,14 @@ pub fn build( ), ], &mut map, - Country::BY, - "Belarus", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2026, - vec![ + [ (NaiveDate::from_ymd_res(2026, 1, 1)?, "Новы год"), (NaiveDate::from_ymd_res(2026, 1, 2)?, "Новы год"), ( @@ -1172,14 +1173,14 @@ pub fn build( ), ], &mut map, - Country::BY, - "Belarus", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2027, - vec![ + [ (NaiveDate::from_ymd_res(2027, 1, 1)?, "Новы год"), (NaiveDate::from_ymd_res(2027, 1, 2)?, "Новы год"), ( @@ -1204,14 +1205,14 @@ pub fn build( ), ], &mut map, - Country::BY, - "Belarus", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2028, - vec![ + [ (NaiveDate::from_ymd_res(2028, 1, 1)?, "Новы год"), (NaiveDate::from_ymd_res(2028, 1, 2)?, "Новы год"), ( @@ -1236,14 +1237,14 @@ pub fn build( ), ], &mut map, - Country::BY, - "Belarus", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2029, - vec![ + [ (NaiveDate::from_ymd_res(2029, 1, 1)?, "Новы год"), (NaiveDate::from_ymd_res(2029, 1, 2)?, "Новы год"), ( @@ -1268,14 +1269,14 @@ pub fn build( ), ], &mut map, - Country::BY, - "Belarus", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2030, - vec![ + [ (NaiveDate::from_ymd_res(2030, 1, 1)?, "Новы год"), (NaiveDate::from_ymd_res(2030, 1, 2)?, "Новы год"), ( @@ -1300,8 +1301,8 @@ pub fn build( ), ], &mut map, - Country::BY, - "Belarus", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/ca.rs b/src/data/ca.rs index e399fff..079be47 100644 --- a/src/data/ca.rs +++ b/src/data/ca.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Canada"; +const COUNTY_CODE: Country = Country::CA; + /// Generate holiday map for Canada. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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)?, @@ -29,14 +30,14 @@ pub fn build( (NaiveDate::from_ymd_res(2000, 12, 25)?, "Christmas Day"), ], &mut map, - Country::CA, - "Canada", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -44,14 +45,14 @@ pub fn build( (NaiveDate::from_ymd_res(2001, 12, 25)?, "Christmas Day"), ], &mut map, - Country::CA, - "Canada", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -59,14 +60,14 @@ pub fn build( (NaiveDate::from_ymd_res(2002, 12, 25)?, "Christmas Day"), ], &mut map, - Country::CA, - "Canada", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -74,14 +75,14 @@ pub fn build( (NaiveDate::from_ymd_res(2003, 12, 25)?, "Christmas Day"), ], &mut map, - Country::CA, - "Canada", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -93,14 +94,14 @@ pub fn build( ), ], &mut map, - Country::CA, - "Canada", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2005, - vec![ + [ (NaiveDate::from_ymd_res(2005, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2005, 1, 3)?, @@ -116,14 +117,14 @@ pub fn build( ), ], &mut map, - Country::CA, - "Canada", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2006, - vec![ + [ (NaiveDate::from_ymd_res(2006, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2006, 1, 2)?, @@ -135,14 +136,14 @@ pub fn build( (NaiveDate::from_ymd_res(2006, 12, 25)?, "Christmas Day"), ], &mut map, - Country::CA, - "Canada", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -150,14 +151,14 @@ pub fn build( (NaiveDate::from_ymd_res(2007, 12, 25)?, "Christmas Day"), ], &mut map, - Country::CA, - "Canada", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -165,14 +166,14 @@ pub fn build( (NaiveDate::from_ymd_res(2008, 12, 25)?, "Christmas Day"), ], &mut map, - Country::CA, - "Canada", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -180,14 +181,14 @@ pub fn build( (NaiveDate::from_ymd_res(2009, 12, 25)?, "Christmas Day"), ], &mut map, - Country::CA, - "Canada", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -199,14 +200,14 @@ pub fn build( ), ], &mut map, - Country::CA, - "Canada", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2011, - vec![ + [ (NaiveDate::from_ymd_res(2011, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2011, 1, 3)?, @@ -222,14 +223,14 @@ pub fn build( ), ], &mut map, - Country::CA, - "Canada", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2012, - vec![ + [ (NaiveDate::from_ymd_res(2012, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2012, 1, 2)?, @@ -241,14 +242,14 @@ pub fn build( (NaiveDate::from_ymd_res(2012, 12, 25)?, "Christmas Day"), ], &mut map, - Country::CA, - "Canada", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -256,14 +257,14 @@ pub fn build( (NaiveDate::from_ymd_res(2013, 12, 25)?, "Christmas Day"), ], &mut map, - Country::CA, - "Canada", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -271,14 +272,14 @@ pub fn build( (NaiveDate::from_ymd_res(2014, 12, 25)?, "Christmas Day"), ], &mut map, - Country::CA, - "Canada", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -286,14 +287,14 @@ pub fn build( (NaiveDate::from_ymd_res(2015, 12, 25)?, "Christmas Day"), ], &mut map, - Country::CA, - "Canada", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -305,14 +306,14 @@ pub fn build( ), ], &mut map, - Country::CA, - "Canada", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2017, - vec![ + [ (NaiveDate::from_ymd_res(2017, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2017, 1, 2)?, @@ -324,14 +325,14 @@ pub fn build( (NaiveDate::from_ymd_res(2017, 12, 25)?, "Christmas Day"), ], &mut map, - Country::CA, - "Canada", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -339,14 +340,14 @@ pub fn build( (NaiveDate::from_ymd_res(2018, 12, 25)?, "Christmas Day"), ], &mut map, - Country::CA, - "Canada", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -354,14 +355,14 @@ pub fn build( (NaiveDate::from_ymd_res(2019, 12, 25)?, "Christmas Day"), ], &mut map, - Country::CA, - "Canada", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -369,14 +370,14 @@ pub fn build( (NaiveDate::from_ymd_res(2020, 12, 25)?, "Christmas Day"), ], &mut map, - Country::CA, - "Canada", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -388,14 +389,14 @@ pub fn build( ), ], &mut map, - Country::CA, - "Canada", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2022, - vec![ + [ (NaiveDate::from_ymd_res(2022, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2022, 1, 3)?, @@ -411,14 +412,14 @@ pub fn build( ), ], &mut map, - Country::CA, - "Canada", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2023, - vec![ + [ (NaiveDate::from_ymd_res(2023, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2023, 1, 2)?, @@ -430,14 +431,14 @@ pub fn build( (NaiveDate::from_ymd_res(2023, 12, 25)?, "Christmas Day"), ], &mut map, - Country::CA, - "Canada", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -445,14 +446,14 @@ pub fn build( (NaiveDate::from_ymd_res(2024, 12, 25)?, "Christmas Day"), ], &mut map, - Country::CA, - "Canada", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -460,14 +461,14 @@ pub fn build( (NaiveDate::from_ymd_res(2025, 12, 25)?, "Christmas Day"), ], &mut map, - Country::CA, - "Canada", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -475,14 +476,14 @@ pub fn build( (NaiveDate::from_ymd_res(2026, 12, 25)?, "Christmas Day"), ], &mut map, - Country::CA, - "Canada", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -494,14 +495,14 @@ pub fn build( ), ], &mut map, - Country::CA, - "Canada", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2028, - vec![ + [ (NaiveDate::from_ymd_res(2028, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2028, 1, 3)?, @@ -513,14 +514,14 @@ pub fn build( (NaiveDate::from_ymd_res(2028, 12, 25)?, "Christmas Day"), ], &mut map, - Country::CA, - "Canada", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -528,14 +529,14 @@ pub fn build( (NaiveDate::from_ymd_res(2029, 12, 25)?, "Christmas Day"), ], &mut map, - Country::CA, - "Canada", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -543,8 +544,8 @@ pub fn build( (NaiveDate::from_ymd_res(2030, 12, 25)?, "Christmas Day"), ], &mut map, - Country::CA, - "Canada", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/ch.rs b/src/data/ch.rs index 56abe16..7b9bb51 100644 --- a/src/data/ch.rs +++ b/src/data/ch.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Switzerland"; +const COUNTY_CODE: Country = Country::CH; + /// Generate holiday map for Switzerland. #[allow( unused_mut, @@ -9,443 +12,441 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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", + COUNTY_CODE, + COUNTY_NAME, ); 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", + COUNTY_CODE, + COUNTY_NAME, ); 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", + COUNTY_CODE, + COUNTY_NAME, ); 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", + COUNTY_CODE, + COUNTY_NAME, ); 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", + COUNTY_CODE, + COUNTY_NAME, ); 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", + COUNTY_CODE, + COUNTY_NAME, ); 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", + COUNTY_CODE, + COUNTY_NAME, ); 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", + COUNTY_CODE, + COUNTY_NAME, ); 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", + COUNTY_CODE, + COUNTY_NAME, ); 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", + COUNTY_CODE, + COUNTY_NAME, ); 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", + COUNTY_CODE, + COUNTY_NAME, ); 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", + COUNTY_CODE, + COUNTY_NAME, ); 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", + COUNTY_CODE, + COUNTY_NAME, ); 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", + COUNTY_CODE, + COUNTY_NAME, ); 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", + COUNTY_CODE, + COUNTY_NAME, ); 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", + COUNTY_CODE, + COUNTY_NAME, ); 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", + COUNTY_CODE, + COUNTY_NAME, ); 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", + COUNTY_CODE, + COUNTY_NAME, ); 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", + COUNTY_CODE, + COUNTY_NAME, ); 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", + COUNTY_CODE, + COUNTY_NAME, ); 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", + COUNTY_CODE, + COUNTY_NAME, ); 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", + COUNTY_CODE, + COUNTY_NAME, ); 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", + COUNTY_CODE, + COUNTY_NAME, ); 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", + COUNTY_CODE, + COUNTY_NAME, ); 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", + COUNTY_CODE, + COUNTY_NAME, ); 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", + COUNTY_CODE, + COUNTY_NAME, ); 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", + COUNTY_CODE, + COUNTY_NAME, ); 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", + COUNTY_CODE, + COUNTY_NAME, ); 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", + COUNTY_CODE, + COUNTY_NAME, ); 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", + COUNTY_CODE, + COUNTY_NAME, ); 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", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/cl.rs b/src/data/cl.rs index 806aece..66fd4e1 100644 --- a/src/data/cl.rs +++ b/src/data/cl.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Chile"; +const COUNTY_CODE: Country = Country::CL; + /// Generate holiday map for Chile. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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"), @@ -65,14 +66,14 @@ pub fn build( (NaiveDate::from_ymd_res(2000, 12, 25)?, "Navidad"), ], &mut map, - Country::CL, - "Chile", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -120,14 +121,14 @@ pub fn build( (NaiveDate::from_ymd_res(2001, 12, 25)?, "Navidad"), ], &mut map, - Country::CL, - "Chile", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -171,14 +172,14 @@ pub fn build( (NaiveDate::from_ymd_res(2002, 12, 25)?, "Navidad"), ], &mut map, - Country::CL, - "Chile", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -222,14 +223,14 @@ pub fn build( (NaiveDate::from_ymd_res(2003, 12, 25)?, "Navidad"), ], &mut map, - Country::CL, - "Chile", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -273,14 +274,14 @@ pub fn build( (NaiveDate::from_ymd_res(2004, 12, 25)?, "Navidad"), ], &mut map, - Country::CL, - "Chile", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -324,14 +325,14 @@ pub fn build( (NaiveDate::from_ymd_res(2005, 12, 25)?, "Navidad"), ], &mut map, - Country::CL, - "Chile", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -375,14 +376,14 @@ pub fn build( (NaiveDate::from_ymd_res(2006, 12, 25)?, "Navidad"), ], &mut map, - Country::CL, - "Chile", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -427,14 +428,14 @@ pub fn build( (NaiveDate::from_ymd_res(2007, 12, 25)?, "Navidad"), ], &mut map, - Country::CL, - "Chile", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -482,14 +483,14 @@ pub fn build( (NaiveDate::from_ymd_res(2008, 12, 25)?, "Navidad"), ], &mut map, - Country::CL, - "Chile", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -537,14 +538,14 @@ pub fn build( (NaiveDate::from_ymd_res(2009, 12, 25)?, "Navidad"), ], &mut map, - Country::CL, - "Chile", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -592,14 +593,14 @@ pub fn build( (NaiveDate::from_ymd_res(2010, 12, 25)?, "Navidad"), ], &mut map, - Country::CL, - "Chile", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -647,14 +648,14 @@ pub fn build( (NaiveDate::from_ymd_res(2011, 12, 25)?, "Navidad"), ], &mut map, - Country::CL, - "Chile", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -703,14 +704,14 @@ pub fn build( (NaiveDate::from_ymd_res(2012, 12, 25)?, "Navidad"), ], &mut map, - Country::CL, - "Chile", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -759,14 +760,14 @@ pub fn build( (NaiveDate::from_ymd_res(2013, 12, 25)?, "Navidad"), ], &mut map, - Country::CL, - "Chile", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -814,14 +815,14 @@ pub fn build( (NaiveDate::from_ymd_res(2014, 12, 25)?, "Navidad"), ], &mut map, - Country::CL, - "Chile", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -869,14 +870,14 @@ pub fn build( (NaiveDate::from_ymd_res(2015, 12, 25)?, "Navidad"), ], &mut map, - Country::CL, - "Chile", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -924,14 +925,14 @@ pub fn build( (NaiveDate::from_ymd_res(2016, 12, 25)?, "Navidad"), ], &mut map, - Country::CL, - "Chile", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -980,14 +981,14 @@ pub fn build( (NaiveDate::from_ymd_res(2017, 12, 25)?, "Navidad"), ], &mut map, - Country::CL, - "Chile", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1036,14 +1037,14 @@ pub fn build( (NaiveDate::from_ymd_res(2018, 12, 25)?, "Navidad"), ], &mut map, - Country::CL, - "Chile", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1092,14 +1093,14 @@ pub fn build( (NaiveDate::from_ymd_res(2019, 12, 25)?, "Navidad"), ], &mut map, - Country::CL, - "Chile", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1147,14 +1148,14 @@ pub fn build( (NaiveDate::from_ymd_res(2020, 12, 25)?, "Navidad"), ], &mut map, - Country::CL, - "Chile", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1207,14 +1208,14 @@ pub fn build( (NaiveDate::from_ymd_res(2021, 12, 25)?, "Navidad"), ], &mut map, - Country::CL, - "Chile", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1267,14 +1268,14 @@ pub fn build( (NaiveDate::from_ymd_res(2022, 9, 16)?, "Feriado nacional"), ], &mut map, - Country::CL, - "Chile", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1327,14 +1328,14 @@ pub fn build( (NaiveDate::from_ymd_res(2023, 12, 25)?, "Navidad"), ], &mut map, - Country::CL, - "Chile", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1387,14 +1388,14 @@ pub fn build( (NaiveDate::from_ymd_res(2024, 12, 25)?, "Navidad"), ], &mut map, - Country::CL, - "Chile", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1446,14 +1447,14 @@ pub fn build( (NaiveDate::from_ymd_res(2025, 12, 25)?, "Navidad"), ], &mut map, - Country::CL, - "Chile", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1505,14 +1506,14 @@ pub fn build( (NaiveDate::from_ymd_res(2026, 12, 25)?, "Navidad"), ], &mut map, - Country::CL, - "Chile", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1565,14 +1566,14 @@ pub fn build( (NaiveDate::from_ymd_res(2027, 12, 25)?, "Navidad"), ], &mut map, - Country::CL, - "Chile", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1624,14 +1625,14 @@ pub fn build( (NaiveDate::from_ymd_res(2028, 12, 25)?, "Navidad"), ], &mut map, - Country::CL, - "Chile", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1684,14 +1685,14 @@ pub fn build( (NaiveDate::from_ymd_res(2029, 12, 25)?, "Navidad"), ], &mut map, - Country::CL, - "Chile", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1744,8 +1745,8 @@ pub fn build( (NaiveDate::from_ymd_res(2030, 12, 25)?, "Navidad"), ], &mut map, - Country::CL, - "Chile", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/cn.rs b/src/data/cn.rs index 8d1d66f..694189b 100644 --- a/src/data/cn.rs +++ b/src/data/cn.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "China"; +const COUNTY_CODE: Country = Country::CN; + /// Generate holiday map for China. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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)?, "春节"), @@ -34,14 +35,14 @@ pub fn build( (NaiveDate::from_ymd_res(2000, 10, 4)?, "国庆节(观察日)"), ], &mut map, - Country::CN, - "China", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "春节"), @@ -78,14 +79,14 @@ pub fn build( ), ], &mut map, - Country::CN, - "China", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "春节"), @@ -130,14 +131,14 @@ pub fn build( ), ], &mut map, - Country::CN, - "China", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "春节"), @@ -177,14 +178,14 @@ pub fn build( ), ], &mut map, - Country::CN, - "China", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "春节"), @@ -226,14 +227,14 @@ pub fn build( ), ], &mut map, - Country::CN, - "China", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "春节"), @@ -274,14 +275,14 @@ pub fn build( ), ], &mut map, - Country::CN, - "China", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "春节"), @@ -325,14 +326,14 @@ pub fn build( ), ], &mut map, - Country::CN, - "China", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "春节"), @@ -382,14 +383,14 @@ pub fn build( ), ], &mut map, - Country::CN, - "China", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "春节"), @@ -425,14 +426,14 @@ pub fn build( ), ], &mut map, - Country::CN, - "China", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "春节"), @@ -473,14 +474,14 @@ pub fn build( ), ], &mut map, - Country::CN, - "China", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "春节"), @@ -531,14 +532,14 @@ pub fn build( ), ], &mut map, - Country::CN, - "China", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "春节"), @@ -576,14 +577,14 @@ pub fn build( ), ], &mut map, - Country::CN, - "China", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "春节"), @@ -629,14 +630,14 @@ pub fn build( (NaiveDate::from_ymd_res(2012, 6, 22)?, "端午节(观察日)"), ], &mut map, - Country::CN, - "China", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "春节"), @@ -700,14 +701,14 @@ pub fn build( ), ], &mut map, - Country::CN, - "China", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "春节"), @@ -744,14 +745,14 @@ pub fn build( ), ], &mut map, - Country::CN, - "China", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "春节"), @@ -794,14 +795,14 @@ pub fn build( (NaiveDate::from_ymd_res(2015, 10, 6)?, "中秋节(观察日)"), ], &mut map, - Country::CN, - "China", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "春节"), @@ -842,14 +843,14 @@ pub fn build( ), ], &mut map, - Country::CN, - "China", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "春节"), @@ -887,14 +888,14 @@ pub fn build( ), ], &mut map, - Country::CN, - "China", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "春节"), @@ -938,14 +939,14 @@ pub fn build( ), ], &mut map, - Country::CN, - "China", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "春节"), @@ -975,14 +976,14 @@ pub fn build( ), ], &mut map, - Country::CN, - "China", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "春节"), @@ -1028,14 +1029,14 @@ pub fn build( (NaiveDate::from_ymd_res(2020, 10, 6)?, "中秋节(观察日)"), ], &mut map, - Country::CN, - "China", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "春节"), @@ -1083,14 +1084,14 @@ pub fn build( ), ], &mut map, - Country::CN, - "China", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "春节"), @@ -1137,14 +1138,14 @@ pub fn build( ), ], &mut map, - Country::CN, - "China", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "春节"), @@ -1189,14 +1190,14 @@ pub fn build( ), ], &mut map, - Country::CN, - "China", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "春节"), @@ -1244,14 +1245,14 @@ pub fn build( ), ], &mut map, - Country::CN, - "China", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "春节"), @@ -1266,14 +1267,14 @@ pub fn build( (NaiveDate::from_ymd_res(2025, 6, 2)?, "端午节(观察日)"), ], &mut map, - Country::CN, - "China", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "春节"), @@ -1289,14 +1290,14 @@ pub fn build( (NaiveDate::from_ymd_res(2026, 10, 5)?, "国庆节(观察日)"), ], &mut map, - Country::CN, - "China", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "春节"), @@ -1315,14 +1316,14 @@ pub fn build( (NaiveDate::from_ymd_res(2027, 10, 5)?, "国庆节(观察日)"), ], &mut map, - Country::CN, - "China", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "春节"), @@ -1338,14 +1339,14 @@ pub fn build( (NaiveDate::from_ymd_res(2028, 10, 4)?, "国庆节(观察日)"), ], &mut map, - Country::CN, - "China", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "春节"), @@ -1361,14 +1362,14 @@ pub fn build( (NaiveDate::from_ymd_res(2029, 9, 24)?, "中秋节(观察日)"), ], &mut map, - Country::CN, - "China", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "春节"), @@ -1383,8 +1384,8 @@ pub fn build( (NaiveDate::from_ymd_res(2030, 2, 6)?, "春节(观察日)"), ], &mut map, - Country::CN, - "China", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/co.rs b/src/data/co.rs index aba7141..f411c31 100644 --- a/src/data/co.rs +++ b/src/data/co.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Colombia"; +const COUNTY_CODE: Country = Country::CO; + /// Generate holiday map for Colombia. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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)?, @@ -70,14 +71,14 @@ pub fn build( (NaiveDate::from_ymd_res(2000, 12, 25)?, "Navidad"), ], &mut map, - Country::CO, - "Colombia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2001, - vec![ + [ (NaiveDate::from_ymd_res(2001, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2001, 1, 8)?, @@ -131,14 +132,14 @@ pub fn build( (NaiveDate::from_ymd_res(2001, 12, 25)?, "Navidad"), ], &mut map, - Country::CO, - "Colombia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2002, - vec![ + [ (NaiveDate::from_ymd_res(2002, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2002, 1, 7)?, @@ -195,14 +196,14 @@ pub fn build( (NaiveDate::from_ymd_res(2002, 12, 25)?, "Navidad"), ], &mut map, - Country::CO, - "Colombia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2003, - vec![ + [ (NaiveDate::from_ymd_res(2003, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2003, 1, 6)?, @@ -255,14 +256,14 @@ pub fn build( (NaiveDate::from_ymd_res(2003, 12, 25)?, "Navidad"), ], &mut map, - Country::CO, - "Colombia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2004, - vec![ + [ (NaiveDate::from_ymd_res(2004, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2004, 1, 12)?, @@ -319,14 +320,14 @@ pub fn build( (NaiveDate::from_ymd_res(2004, 12, 25)?, "Navidad"), ], &mut map, - Country::CO, - "Colombia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2005, - vec![ + [ (NaiveDate::from_ymd_res(2005, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2005, 1, 10)?, @@ -380,14 +381,14 @@ pub fn build( (NaiveDate::from_ymd_res(2005, 12, 25)?, "Navidad"), ], &mut map, - Country::CO, - "Colombia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2006, - vec![ + [ (NaiveDate::from_ymd_res(2006, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2006, 1, 9)?, @@ -444,14 +445,14 @@ pub fn build( (NaiveDate::from_ymd_res(2006, 12, 25)?, "Navidad"), ], &mut map, - Country::CO, - "Colombia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2007, - vec![ + [ (NaiveDate::from_ymd_res(2007, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2007, 1, 8)?, @@ -505,14 +506,14 @@ pub fn build( (NaiveDate::from_ymd_res(2007, 12, 25)?, "Navidad"), ], &mut map, - Country::CO, - "Colombia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2008, - vec![ + [ (NaiveDate::from_ymd_res(2008, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2008, 1, 7)?, @@ -569,14 +570,14 @@ pub fn build( (NaiveDate::from_ymd_res(2008, 12, 25)?, "Navidad"), ], &mut map, - Country::CO, - "Colombia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2009, - vec![ + [ (NaiveDate::from_ymd_res(2009, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2009, 1, 12)?, @@ -630,14 +631,14 @@ pub fn build( (NaiveDate::from_ymd_res(2009, 12, 25)?, "Navidad"), ], &mut map, - Country::CO, - "Colombia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2010, - vec![ + [ (NaiveDate::from_ymd_res(2010, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2010, 1, 11)?, @@ -694,14 +695,14 @@ pub fn build( (NaiveDate::from_ymd_res(2010, 12, 25)?, "Navidad"), ], &mut map, - Country::CO, - "Colombia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2011, - vec![ + [ (NaiveDate::from_ymd_res(2011, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2011, 1, 10)?, @@ -751,14 +752,14 @@ pub fn build( (NaiveDate::from_ymd_res(2011, 12, 25)?, "Navidad"), ], &mut map, - Country::CO, - "Colombia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2012, - vec![ + [ (NaiveDate::from_ymd_res(2012, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2012, 1, 9)?, @@ -812,14 +813,14 @@ pub fn build( (NaiveDate::from_ymd_res(2012, 12, 25)?, "Navidad"), ], &mut map, - Country::CO, - "Colombia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2013, - vec![ + [ (NaiveDate::from_ymd_res(2013, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2013, 1, 7)?, @@ -876,14 +877,14 @@ pub fn build( (NaiveDate::from_ymd_res(2013, 12, 25)?, "Navidad"), ], &mut map, - Country::CO, - "Colombia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2014, - vec![ + [ (NaiveDate::from_ymd_res(2014, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2014, 1, 6)?, @@ -936,14 +937,14 @@ pub fn build( (NaiveDate::from_ymd_res(2014, 12, 25)?, "Navidad"), ], &mut map, - Country::CO, - "Colombia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2015, - vec![ + [ (NaiveDate::from_ymd_res(2015, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2015, 1, 12)?, @@ -997,14 +998,14 @@ pub fn build( (NaiveDate::from_ymd_res(2015, 12, 25)?, "Navidad"), ], &mut map, - Country::CO, - "Colombia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2016, - vec![ + [ (NaiveDate::from_ymd_res(2016, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2016, 1, 11)?, @@ -1058,14 +1059,14 @@ pub fn build( (NaiveDate::from_ymd_res(2016, 12, 25)?, "Navidad"), ], &mut map, - Country::CO, - "Colombia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2017, - vec![ + [ (NaiveDate::from_ymd_res(2017, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2017, 1, 9)?, @@ -1122,14 +1123,14 @@ pub fn build( (NaiveDate::from_ymd_res(2017, 12, 25)?, "Navidad"), ], &mut map, - Country::CO, - "Colombia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2018, - vec![ + [ (NaiveDate::from_ymd_res(2018, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2018, 1, 8)?, @@ -1183,14 +1184,14 @@ pub fn build( (NaiveDate::from_ymd_res(2018, 12, 25)?, "Navidad"), ], &mut map, - Country::CO, - "Colombia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2019, - vec![ + [ (NaiveDate::from_ymd_res(2019, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2019, 1, 7)?, @@ -1243,14 +1244,14 @@ pub fn build( (NaiveDate::from_ymd_res(2019, 12, 25)?, "Navidad"), ], &mut map, - Country::CO, - "Colombia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2020, - vec![ + [ (NaiveDate::from_ymd_res(2020, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2020, 1, 6)?, @@ -1304,14 +1305,14 @@ pub fn build( (NaiveDate::from_ymd_res(2020, 12, 25)?, "Navidad"), ], &mut map, - Country::CO, - "Colombia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2021, - vec![ + [ (NaiveDate::from_ymd_res(2021, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2021, 1, 11)?, @@ -1368,14 +1369,14 @@ pub fn build( (NaiveDate::from_ymd_res(2021, 12, 25)?, "Navidad"), ], &mut map, - Country::CO, - "Colombia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2022, - vec![ + [ (NaiveDate::from_ymd_res(2022, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2022, 1, 10)?, @@ -1429,14 +1430,14 @@ pub fn build( (NaiveDate::from_ymd_res(2022, 12, 25)?, "Navidad"), ], &mut map, - Country::CO, - "Colombia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2023, - vec![ + [ (NaiveDate::from_ymd_res(2023, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2023, 1, 9)?, @@ -1493,14 +1494,14 @@ pub fn build( (NaiveDate::from_ymd_res(2023, 12, 25)?, "Navidad"), ], &mut map, - Country::CO, - "Colombia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2024, - vec![ + [ (NaiveDate::from_ymd_res(2024, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2024, 1, 8)?, @@ -1557,14 +1558,14 @@ pub fn build( (NaiveDate::from_ymd_res(2024, 12, 25)?, "Navidad"), ], &mut map, - Country::CO, - "Colombia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2025, - vec![ + [ (NaiveDate::from_ymd_res(2025, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2025, 1, 6)?, @@ -1617,14 +1618,14 @@ pub fn build( (NaiveDate::from_ymd_res(2025, 12, 25)?, "Navidad"), ], &mut map, - Country::CO, - "Colombia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2026, - vec![ + [ (NaiveDate::from_ymd_res(2026, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2026, 1, 12)?, @@ -1678,14 +1679,14 @@ pub fn build( (NaiveDate::from_ymd_res(2026, 12, 25)?, "Navidad"), ], &mut map, - Country::CO, - "Colombia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2027, - vec![ + [ (NaiveDate::from_ymd_res(2027, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2027, 1, 11)?, @@ -1742,14 +1743,14 @@ pub fn build( (NaiveDate::from_ymd_res(2027, 12, 25)?, "Navidad"), ], &mut map, - Country::CO, - "Colombia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2028, - vec![ + [ (NaiveDate::from_ymd_res(2028, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2028, 1, 10)?, @@ -1806,14 +1807,14 @@ pub fn build( (NaiveDate::from_ymd_res(2028, 12, 25)?, "Navidad"), ], &mut map, - Country::CO, - "Colombia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2029, - vec![ + [ (NaiveDate::from_ymd_res(2029, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2029, 1, 8)?, @@ -1867,14 +1868,14 @@ pub fn build( (NaiveDate::from_ymd_res(2029, 12, 25)?, "Navidad"), ], &mut map, - Country::CO, - "Colombia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2030, - vec![ + [ (NaiveDate::from_ymd_res(2030, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2030, 1, 7)?, @@ -1927,8 +1928,8 @@ pub fn build( (NaiveDate::from_ymd_res(2030, 12, 25)?, "Navidad"), ], &mut map, - Country::CO, - "Colombia", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/cu.rs b/src/data/cu.rs index 5dc9b47..97b1049 100644 --- a/src/data/cu.rs +++ b/src/data/cu.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Cuba"; +const COUNTY_CODE: Country = Country::CU; + /// Generate holiday map for Cuba. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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", @@ -45,14 +46,14 @@ pub fn build( (NaiveDate::from_ymd_res(2000, 12, 25)?, "Día de Navidad"), ], &mut map, - Country::CU, - "Cuba", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2001, - vec![ + [ ( NaiveDate::from_ymd_res(2001, 1, 1)?, "Triunfo de la Revolución", @@ -80,14 +81,14 @@ pub fn build( (NaiveDate::from_ymd_res(2001, 12, 25)?, "Día de Navidad"), ], &mut map, - Country::CU, - "Cuba", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2002, - vec![ + [ ( NaiveDate::from_ymd_res(2002, 1, 1)?, "Triunfo de la Revolución", @@ -115,14 +116,14 @@ pub fn build( (NaiveDate::from_ymd_res(2002, 12, 25)?, "Día de Navidad"), ], &mut map, - Country::CU, - "Cuba", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2003, - vec![ + [ ( NaiveDate::from_ymd_res(2003, 1, 1)?, "Triunfo de la Revolución", @@ -150,14 +151,14 @@ pub fn build( (NaiveDate::from_ymd_res(2003, 12, 25)?, "Día de Navidad"), ], &mut map, - Country::CU, - "Cuba", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2004, - vec![ + [ ( NaiveDate::from_ymd_res(2004, 1, 1)?, "Triunfo de la Revolución", @@ -189,14 +190,14 @@ pub fn build( (NaiveDate::from_ymd_res(2004, 12, 25)?, "Día de Navidad"), ], &mut map, - Country::CU, - "Cuba", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2005, - vec![ + [ ( NaiveDate::from_ymd_res(2005, 1, 1)?, "Triunfo de la Revolución", @@ -228,14 +229,14 @@ pub fn build( (NaiveDate::from_ymd_res(2005, 12, 25)?, "Día de Navidad"), ], &mut map, - Country::CU, - "Cuba", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2006, - vec![ + [ ( NaiveDate::from_ymd_res(2006, 1, 1)?, "Triunfo de la Revolución", @@ -267,14 +268,14 @@ pub fn build( (NaiveDate::from_ymd_res(2006, 12, 25)?, "Día de Navidad"), ], &mut map, - Country::CU, - "Cuba", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2007, - vec![ + [ ( NaiveDate::from_ymd_res(2007, 1, 1)?, "Triunfo de la Revolución", @@ -306,14 +307,14 @@ pub fn build( ), ], &mut map, - Country::CU, - "Cuba", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2008, - vec![ + [ ( NaiveDate::from_ymd_res(2008, 1, 1)?, "Triunfo de la Revolución", @@ -346,14 +347,14 @@ pub fn build( ), ], &mut map, - Country::CU, - "Cuba", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2009, - vec![ + [ ( NaiveDate::from_ymd_res(2009, 1, 1)?, "Triunfo de la Revolución", @@ -386,14 +387,14 @@ pub fn build( ), ], &mut map, - Country::CU, - "Cuba", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2010, - vec![ + [ ( NaiveDate::from_ymd_res(2010, 1, 1)?, "Triunfo de la Revolución", @@ -430,14 +431,14 @@ pub fn build( ), ], &mut map, - Country::CU, - "Cuba", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2011, - vec![ + [ ( NaiveDate::from_ymd_res(2011, 1, 1)?, "Triunfo de la Revolución", @@ -474,14 +475,14 @@ pub fn build( ), ], &mut map, - Country::CU, - "Cuba", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2012, - vec![ + [ ( NaiveDate::from_ymd_res(2012, 1, 1)?, "Triunfo de la Revolución", @@ -518,14 +519,14 @@ pub fn build( ), ], &mut map, - Country::CU, - "Cuba", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2013, - vec![ + [ ( NaiveDate::from_ymd_res(2013, 1, 1)?, "Triunfo de la Revolución", @@ -559,14 +560,14 @@ pub fn build( ), ], &mut map, - Country::CU, - "Cuba", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2014, - vec![ + [ ( NaiveDate::from_ymd_res(2014, 1, 1)?, "Triunfo de la Revolución", @@ -600,14 +601,14 @@ pub fn build( ), ], &mut map, - Country::CU, - "Cuba", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2015, - vec![ + [ ( NaiveDate::from_ymd_res(2015, 1, 1)?, "Triunfo de la Revolución", @@ -641,14 +642,14 @@ pub fn build( ), ], &mut map, - Country::CU, - "Cuba", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2016, - vec![ + [ ( NaiveDate::from_ymd_res(2016, 1, 1)?, "Triunfo de la Revolución", @@ -686,14 +687,14 @@ pub fn build( ), ], &mut map, - Country::CU, - "Cuba", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2017, - vec![ + [ ( NaiveDate::from_ymd_res(2017, 1, 1)?, "Triunfo de la Revolución", @@ -727,14 +728,14 @@ pub fn build( ), ], &mut map, - Country::CU, - "Cuba", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2018, - vec![ + [ ( NaiveDate::from_ymd_res(2018, 1, 1)?, "Triunfo de la Revolución", @@ -768,14 +769,14 @@ pub fn build( ), ], &mut map, - Country::CU, - "Cuba", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2019, - vec![ + [ ( NaiveDate::from_ymd_res(2019, 1, 1)?, "Triunfo de la Revolución", @@ -809,14 +810,14 @@ pub fn build( ), ], &mut map, - Country::CU, - "Cuba", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2020, - vec![ + [ ( NaiveDate::from_ymd_res(2020, 1, 1)?, "Triunfo de la Revolución", @@ -850,14 +851,14 @@ pub fn build( ), ], &mut map, - Country::CU, - "Cuba", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2021, - vec![ + [ ( NaiveDate::from_ymd_res(2021, 1, 1)?, "Triunfo de la Revolución", @@ -895,14 +896,14 @@ pub fn build( ), ], &mut map, - Country::CU, - "Cuba", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2022, - vec![ + [ ( NaiveDate::from_ymd_res(2022, 1, 1)?, "Triunfo de la Revolución", @@ -940,14 +941,14 @@ pub fn build( ), ], &mut map, - Country::CU, - "Cuba", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2023, - vec![ + [ ( NaiveDate::from_ymd_res(2023, 1, 1)?, "Triunfo de la Revolución", @@ -981,14 +982,14 @@ pub fn build( ), ], &mut map, - Country::CU, - "Cuba", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2024, - vec![ + [ ( NaiveDate::from_ymd_res(2024, 1, 1)?, "Triunfo de la Revolución", @@ -1022,14 +1023,14 @@ pub fn build( ), ], &mut map, - Country::CU, - "Cuba", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2025, - vec![ + [ ( NaiveDate::from_ymd_res(2025, 1, 1)?, "Triunfo de la Revolución", @@ -1063,14 +1064,14 @@ pub fn build( ), ], &mut map, - Country::CU, - "Cuba", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2026, - vec![ + [ ( NaiveDate::from_ymd_res(2026, 1, 1)?, "Triunfo de la Revolución", @@ -1104,14 +1105,14 @@ pub fn build( ), ], &mut map, - Country::CU, - "Cuba", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2027, - vec![ + [ ( NaiveDate::from_ymd_res(2027, 1, 1)?, "Triunfo de la Revolución", @@ -1149,14 +1150,14 @@ pub fn build( ), ], &mut map, - Country::CU, - "Cuba", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2028, - vec![ + [ ( NaiveDate::from_ymd_res(2028, 1, 1)?, "Triunfo de la Revolución", @@ -1190,14 +1191,14 @@ pub fn build( ), ], &mut map, - Country::CU, - "Cuba", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2029, - vec![ + [ ( NaiveDate::from_ymd_res(2029, 1, 1)?, "Triunfo de la Revolución", @@ -1231,14 +1232,14 @@ pub fn build( ), ], &mut map, - Country::CU, - "Cuba", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2030, - vec![ + [ ( NaiveDate::from_ymd_res(2030, 1, 1)?, "Triunfo de la Revolución", @@ -1272,8 +1273,8 @@ pub fn build( ), ], &mut map, - Country::CU, - "Cuba", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/cw.rs b/src/data/cw.rs index eed58ac..5333c94 100644 --- a/src/data/cw.rs +++ b/src/data/cw.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Curaçao"; +const COUNTY_CODE: Country = Country::CW; + /// Generate holiday map for Curaçao. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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)?, @@ -46,14 +47,14 @@ pub fn build( ), ], &mut map, - Country::CW, - "Curaçao", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2001, - vec![ + [ (NaiveDate::from_ymd_res(2001, 1, 1)?, "Aña Nobo"), ( NaiveDate::from_ymd_res(2001, 2, 26)?, @@ -82,14 +83,14 @@ pub fn build( ), ], &mut map, - Country::CW, - "Curaçao", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2002, - vec![ + [ (NaiveDate::from_ymd_res(2002, 1, 1)?, "Aña Nobo"), ( NaiveDate::from_ymd_res(2002, 2, 11)?, @@ -118,14 +119,14 @@ pub fn build( ), ], &mut map, - Country::CW, - "Curaçao", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2003, - vec![ + [ (NaiveDate::from_ymd_res(2003, 1, 1)?, "Aña Nobo"), ( NaiveDate::from_ymd_res(2003, 3, 3)?, @@ -154,14 +155,14 @@ pub fn build( ), ], &mut map, - Country::CW, - "Curaçao", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2004, - vec![ + [ (NaiveDate::from_ymd_res(2004, 1, 1)?, "Aña Nobo"), ( NaiveDate::from_ymd_res(2004, 2, 23)?, @@ -190,14 +191,14 @@ pub fn build( ), ], &mut map, - Country::CW, - "Curaçao", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2005, - vec![ + [ (NaiveDate::from_ymd_res(2005, 1, 1)?, "Aña Nobo"), ( NaiveDate::from_ymd_res(2005, 2, 7)?, @@ -226,14 +227,14 @@ pub fn build( ), ], &mut map, - Country::CW, - "Curaçao", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2006, - vec![ + [ (NaiveDate::from_ymd_res(2006, 1, 1)?, "Aña Nobo"), ( NaiveDate::from_ymd_res(2006, 2, 27)?, @@ -262,14 +263,14 @@ pub fn build( ), ], &mut map, - Country::CW, - "Curaçao", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2007, - vec![ + [ (NaiveDate::from_ymd_res(2007, 1, 1)?, "Aña Nobo"), ( NaiveDate::from_ymd_res(2007, 2, 19)?, @@ -295,14 +296,14 @@ pub fn build( ), ], &mut map, - Country::CW, - "Curaçao", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2008, - vec![ + [ (NaiveDate::from_ymd_res(2008, 1, 1)?, "Aña Nobo"), ( NaiveDate::from_ymd_res(2008, 2, 4)?, @@ -333,14 +334,14 @@ pub fn build( ), ], &mut map, - Country::CW, - "Curaçao", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2009, - vec![ + [ (NaiveDate::from_ymd_res(2009, 1, 1)?, "Aña Nobo"), ( NaiveDate::from_ymd_res(2009, 2, 23)?, @@ -369,14 +370,14 @@ pub fn build( ), ], &mut map, - Country::CW, - "Curaçao", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2010, - vec![ + [ (NaiveDate::from_ymd_res(2010, 1, 1)?, "Aña Nobo"), ( NaiveDate::from_ymd_res(2010, 2, 15)?, @@ -403,14 +404,14 @@ pub fn build( ), ], &mut map, - Country::CW, - "Curaçao", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2011, - vec![ + [ (NaiveDate::from_ymd_res(2011, 1, 1)?, "Aña Nobo"), ( NaiveDate::from_ymd_res(2011, 3, 7)?, @@ -440,14 +441,14 @@ pub fn build( ), ], &mut map, - Country::CW, - "Curaçao", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2012, - vec![ + [ (NaiveDate::from_ymd_res(2012, 1, 1)?, "Aña Nobo"), ( NaiveDate::from_ymd_res(2012, 2, 20)?, @@ -474,14 +475,14 @@ pub fn build( ), ], &mut map, - Country::CW, - "Curaçao", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2013, - vec![ + [ (NaiveDate::from_ymd_res(2013, 1, 1)?, "Aña Nobo"), ( NaiveDate::from_ymd_res(2013, 2, 11)?, @@ -511,14 +512,14 @@ pub fn build( ), ], &mut map, - Country::CW, - "Curaçao", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2014, - vec![ + [ (NaiveDate::from_ymd_res(2014, 1, 1)?, "Aña Nobo"), ( NaiveDate::from_ymd_res(2014, 3, 3)?, @@ -548,14 +549,14 @@ pub fn build( ), ], &mut map, - Country::CW, - "Curaçao", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2015, - vec![ + [ (NaiveDate::from_ymd_res(2015, 1, 1)?, "Aña Nobo"), ( NaiveDate::from_ymd_res(2015, 2, 16)?, @@ -582,14 +583,14 @@ pub fn build( ), ], &mut map, - Country::CW, - "Curaçao", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2016, - vec![ + [ (NaiveDate::from_ymd_res(2016, 1, 1)?, "Aña Nobo"), ( NaiveDate::from_ymd_res(2016, 2, 8)?, @@ -619,14 +620,14 @@ pub fn build( ), ], &mut map, - Country::CW, - "Curaçao", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2017, - vec![ + [ (NaiveDate::from_ymd_res(2017, 1, 1)?, "Aña Nobo"), ( NaiveDate::from_ymd_res(2017, 2, 27)?, @@ -656,14 +657,14 @@ pub fn build( ), ], &mut map, - Country::CW, - "Curaçao", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2018, - vec![ + [ (NaiveDate::from_ymd_res(2018, 1, 1)?, "Aña Nobo"), ( NaiveDate::from_ymd_res(2018, 2, 12)?, @@ -690,14 +691,14 @@ pub fn build( ), ], &mut map, - Country::CW, - "Curaçao", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2019, - vec![ + [ (NaiveDate::from_ymd_res(2019, 1, 1)?, "Aña Nobo"), ( NaiveDate::from_ymd_res(2019, 3, 4)?, @@ -727,14 +728,14 @@ pub fn build( ), ], &mut map, - Country::CW, - "Curaçao", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2020, - vec![ + [ (NaiveDate::from_ymd_res(2020, 1, 1)?, "Aña Nobo"), ( NaiveDate::from_ymd_res(2020, 2, 24)?, @@ -764,14 +765,14 @@ pub fn build( ), ], &mut map, - Country::CW, - "Curaçao", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2021, - vec![ + [ (NaiveDate::from_ymd_res(2021, 1, 1)?, "Aña Nobo"), ( NaiveDate::from_ymd_res(2021, 2, 15)?, @@ -798,14 +799,14 @@ pub fn build( ), ], &mut map, - Country::CW, - "Curaçao", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2022, - vec![ + [ (NaiveDate::from_ymd_res(2022, 1, 1)?, "Aña Nobo"), ( NaiveDate::from_ymd_res(2022, 2, 28)?, @@ -835,14 +836,14 @@ pub fn build( ), ], &mut map, - Country::CW, - "Curaçao", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2023, - vec![ + [ (NaiveDate::from_ymd_res(2023, 1, 1)?, "Aña Nobo"), ( NaiveDate::from_ymd_res(2023, 2, 20)?, @@ -869,14 +870,14 @@ pub fn build( ), ], &mut map, - Country::CW, - "Curaçao", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2024, - vec![ + [ (NaiveDate::from_ymd_res(2024, 1, 1)?, "Aña Nobo"), ( NaiveDate::from_ymd_res(2024, 2, 12)?, @@ -906,14 +907,14 @@ pub fn build( ), ], &mut map, - Country::CW, - "Curaçao", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2025, - vec![ + [ (NaiveDate::from_ymd_res(2025, 1, 1)?, "Aña Nobo"), ( NaiveDate::from_ymd_res(2025, 3, 3)?, @@ -943,14 +944,14 @@ pub fn build( ), ], &mut map, - Country::CW, - "Curaçao", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2026, - vec![ + [ (NaiveDate::from_ymd_res(2026, 1, 1)?, "Aña Nobo"), ( NaiveDate::from_ymd_res(2026, 2, 16)?, @@ -977,14 +978,14 @@ pub fn build( ), ], &mut map, - Country::CW, - "Curaçao", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2027, - vec![ + [ (NaiveDate::from_ymd_res(2027, 1, 1)?, "Aña Nobo"), ( NaiveDate::from_ymd_res(2027, 2, 8)?, @@ -1014,14 +1015,14 @@ pub fn build( ), ], &mut map, - Country::CW, - "Curaçao", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2028, - vec![ + [ (NaiveDate::from_ymd_res(2028, 1, 1)?, "Aña Nobo"), ( NaiveDate::from_ymd_res(2028, 2, 28)?, @@ -1051,14 +1052,14 @@ pub fn build( ), ], &mut map, - Country::CW, - "Curaçao", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2029, - vec![ + [ (NaiveDate::from_ymd_res(2029, 1, 1)?, "Aña Nobo"), ( NaiveDate::from_ymd_res(2029, 2, 12)?, @@ -1085,14 +1086,14 @@ pub fn build( ), ], &mut map, - Country::CW, - "Curaçao", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2030, - vec![ + [ (NaiveDate::from_ymd_res(2030, 1, 1)?, "Aña Nobo"), ( NaiveDate::from_ymd_res(2030, 3, 4)?, @@ -1122,8 +1123,8 @@ pub fn build( ), ], &mut map, - Country::CW, - "Curaçao", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/cy.rs b/src/data/cy.rs index 1e6ad8a..e98be44 100644 --- a/src/data/cy.rs +++ b/src/data/cy.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Cyprus"; +const COUNTY_CODE: Country = Country::CY; + /// Generate holiday map for Cyprus. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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)?, "Καθαρά Δευτέρα"), @@ -52,14 +53,14 @@ pub fn build( ), ], &mut map, - Country::CY, - "Cyprus", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Καθαρά Δευτέρα"), @@ -95,14 +96,14 @@ pub fn build( ), ], &mut map, - Country::CY, - "Cyprus", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Καθαρά Δευτέρα"), @@ -138,14 +139,14 @@ pub fn build( ), ], &mut map, - Country::CY, - "Cyprus", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Καθαρά Δευτέρα"), @@ -181,14 +182,14 @@ pub fn build( ), ], &mut map, - Country::CY, - "Cyprus", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Καθαρά Δευτέρα"), @@ -224,14 +225,14 @@ pub fn build( ), ], &mut map, - Country::CY, - "Cyprus", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Καθαρά Δευτέρα"), @@ -269,14 +270,14 @@ pub fn build( ), ], &mut map, - Country::CY, - "Cyprus", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Καθαρά Δευτέρα"), @@ -312,14 +313,14 @@ pub fn build( ), ], &mut map, - Country::CY, - "Cyprus", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Καθαρά Δευτέρα"), @@ -355,14 +356,14 @@ pub fn build( ), ], &mut map, - Country::CY, - "Cyprus", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Καθαρά Δευτέρα"), @@ -398,14 +399,14 @@ pub fn build( ), ], &mut map, - Country::CY, - "Cyprus", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Καθαρά Δευτέρα"), @@ -441,14 +442,14 @@ pub fn build( ), ], &mut map, - Country::CY, - "Cyprus", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Καθαρά Δευτέρα"), @@ -484,14 +485,14 @@ pub fn build( ), ], &mut map, - Country::CY, - "Cyprus", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Καθαρά Δευτέρα"), @@ -527,14 +528,14 @@ pub fn build( ), ], &mut map, - Country::CY, - "Cyprus", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Καθαρά Δευτέρα"), @@ -570,14 +571,14 @@ pub fn build( ), ], &mut map, - Country::CY, - "Cyprus", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Καθαρά Δευτέρα"), @@ -613,14 +614,14 @@ pub fn build( ), ], &mut map, - Country::CY, - "Cyprus", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Καθαρά Δευτέρα"), @@ -656,14 +657,14 @@ pub fn build( ), ], &mut map, - Country::CY, - "Cyprus", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Καθαρά Δευτέρα"), @@ -699,14 +700,14 @@ pub fn build( ), ], &mut map, - Country::CY, - "Cyprus", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Καθαρά Δευτέρα"), @@ -744,14 +745,14 @@ pub fn build( ), ], &mut map, - Country::CY, - "Cyprus", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Καθαρά Δευτέρα"), @@ -787,14 +788,14 @@ pub fn build( ), ], &mut map, - Country::CY, - "Cyprus", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Καθαρά Δευτέρα"), @@ -830,14 +831,14 @@ pub fn build( ), ], &mut map, - Country::CY, - "Cyprus", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Καθαρά Δευτέρα"), @@ -873,14 +874,14 @@ pub fn build( ), ], &mut map, - Country::CY, - "Cyprus", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Καθαρά Δευτέρα"), @@ -916,14 +917,14 @@ pub fn build( ), ], &mut map, - Country::CY, - "Cyprus", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Καθαρά Δευτέρα"), @@ -959,14 +960,14 @@ pub fn build( ), ], &mut map, - Country::CY, - "Cyprus", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Καθαρά Δευτέρα"), @@ -1002,14 +1003,14 @@ pub fn build( ), ], &mut map, - Country::CY, - "Cyprus", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Καθαρά Δευτέρα"), @@ -1045,14 +1046,14 @@ pub fn build( ), ], &mut map, - Country::CY, - "Cyprus", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Καθαρά Δευτέρα"), @@ -1088,14 +1089,14 @@ pub fn build( ), ], &mut map, - Country::CY, - "Cyprus", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Καθαρά Δευτέρα"), @@ -1131,14 +1132,14 @@ pub fn build( ), ], &mut map, - Country::CY, - "Cyprus", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Καθαρά Δευτέρα"), @@ -1174,14 +1175,14 @@ pub fn build( ), ], &mut map, - Country::CY, - "Cyprus", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Καθαρά Δευτέρα"), @@ -1217,14 +1218,14 @@ pub fn build( ), ], &mut map, - Country::CY, - "Cyprus", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Καθαρά Δευτέρα"), @@ -1260,14 +1261,14 @@ pub fn build( ), ], &mut map, - Country::CY, - "Cyprus", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Καθαρά Δευτέρα"), @@ -1303,14 +1304,14 @@ pub fn build( ), ], &mut map, - Country::CY, - "Cyprus", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Καθαρά Δευτέρα"), @@ -1346,8 +1347,8 @@ pub fn build( ), ], &mut map, - Country::CY, - "Cyprus", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/cz.rs b/src/data/cz.rs index add9152..0a2b6aa 100644 --- a/src/data/cz.rs +++ b/src/data/cz.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Czechia"; +const COUNTY_CODE: Country = Country::CZ; + /// Generate holiday map for Czechia. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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", @@ -47,14 +48,14 @@ pub fn build( (NaiveDate::from_ymd_res(2000, 12, 26)?, "2. svátek vánoční"), ], &mut map, - Country::CZ, - "Czechia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2001, - vec![ + [ ( NaiveDate::from_ymd_res(2001, 1, 1)?, "Den obnovy samostatného českého státu", @@ -84,14 +85,14 @@ pub fn build( (NaiveDate::from_ymd_res(2001, 12, 26)?, "2. svátek vánoční"), ], &mut map, - Country::CZ, - "Czechia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2002, - vec![ + [ ( NaiveDate::from_ymd_res(2002, 1, 1)?, "Den obnovy samostatného českého státu", @@ -121,14 +122,14 @@ pub fn build( (NaiveDate::from_ymd_res(2002, 12, 26)?, "2. svátek vánoční"), ], &mut map, - Country::CZ, - "Czechia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2003, - vec![ + [ ( NaiveDate::from_ymd_res(2003, 1, 1)?, "Den obnovy samostatného českého státu", @@ -158,14 +159,14 @@ pub fn build( (NaiveDate::from_ymd_res(2003, 12, 26)?, "2. svátek vánoční"), ], &mut map, - Country::CZ, - "Czechia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2004, - vec![ + [ ( NaiveDate::from_ymd_res(2004, 1, 1)?, "Den obnovy samostatného českého státu", @@ -195,14 +196,14 @@ pub fn build( (NaiveDate::from_ymd_res(2004, 12, 26)?, "2. svátek vánoční"), ], &mut map, - Country::CZ, - "Czechia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2005, - vec![ + [ ( NaiveDate::from_ymd_res(2005, 1, 1)?, "Den obnovy samostatného českého státu", @@ -232,14 +233,14 @@ pub fn build( (NaiveDate::from_ymd_res(2005, 12, 26)?, "2. svátek vánoční"), ], &mut map, - Country::CZ, - "Czechia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2006, - vec![ + [ ( NaiveDate::from_ymd_res(2006, 1, 1)?, "Den obnovy samostatného českého státu", @@ -269,14 +270,14 @@ pub fn build( (NaiveDate::from_ymd_res(2006, 12, 26)?, "2. svátek vánoční"), ], &mut map, - Country::CZ, - "Czechia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2007, - vec![ + [ ( NaiveDate::from_ymd_res(2007, 1, 1)?, "Den obnovy samostatného českého státu", @@ -306,14 +307,14 @@ pub fn build( (NaiveDate::from_ymd_res(2007, 12, 26)?, "2. svátek vánoční"), ], &mut map, - Country::CZ, - "Czechia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2008, - vec![ + [ ( NaiveDate::from_ymd_res(2008, 1, 1)?, "Den obnovy samostatného českého státu", @@ -343,14 +344,14 @@ pub fn build( (NaiveDate::from_ymd_res(2008, 12, 26)?, "2. svátek vánoční"), ], &mut map, - Country::CZ, - "Czechia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2009, - vec![ + [ ( NaiveDate::from_ymd_res(2009, 1, 1)?, "Den obnovy samostatného českého státu", @@ -380,14 +381,14 @@ pub fn build( (NaiveDate::from_ymd_res(2009, 12, 26)?, "2. svátek vánoční"), ], &mut map, - Country::CZ, - "Czechia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2010, - vec![ + [ ( NaiveDate::from_ymd_res(2010, 1, 1)?, "Den obnovy samostatného českého státu", @@ -417,14 +418,14 @@ pub fn build( (NaiveDate::from_ymd_res(2010, 12, 26)?, "2. svátek vánoční"), ], &mut map, - Country::CZ, - "Czechia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2011, - vec![ + [ ( NaiveDate::from_ymd_res(2011, 1, 1)?, "Den obnovy samostatného českého státu", @@ -454,14 +455,14 @@ pub fn build( (NaiveDate::from_ymd_res(2011, 12, 26)?, "2. svátek vánoční"), ], &mut map, - Country::CZ, - "Czechia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2012, - vec![ + [ ( NaiveDate::from_ymd_res(2012, 1, 1)?, "Den obnovy samostatného českého státu", @@ -491,14 +492,14 @@ pub fn build( (NaiveDate::from_ymd_res(2012, 12, 26)?, "2. svátek vánoční"), ], &mut map, - Country::CZ, - "Czechia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2013, - vec![ + [ ( NaiveDate::from_ymd_res(2013, 1, 1)?, "Den obnovy samostatného českého státu", @@ -528,14 +529,14 @@ pub fn build( (NaiveDate::from_ymd_res(2013, 12, 26)?, "2. svátek vánoční"), ], &mut map, - Country::CZ, - "Czechia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2014, - vec![ + [ ( NaiveDate::from_ymd_res(2014, 1, 1)?, "Den obnovy samostatného českého státu", @@ -565,14 +566,14 @@ pub fn build( (NaiveDate::from_ymd_res(2014, 12, 26)?, "2. svátek vánoční"), ], &mut map, - Country::CZ, - "Czechia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2015, - vec![ + [ ( NaiveDate::from_ymd_res(2015, 1, 1)?, "Den obnovy samostatného českého státu", @@ -602,14 +603,14 @@ pub fn build( (NaiveDate::from_ymd_res(2015, 12, 26)?, "2. svátek vánoční"), ], &mut map, - Country::CZ, - "Czechia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2016, - vec![ + [ ( NaiveDate::from_ymd_res(2016, 1, 1)?, "Den obnovy samostatného českého státu", @@ -640,14 +641,14 @@ pub fn build( (NaiveDate::from_ymd_res(2016, 12, 26)?, "2. svátek vánoční"), ], &mut map, - Country::CZ, - "Czechia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2017, - vec![ + [ ( NaiveDate::from_ymd_res(2017, 1, 1)?, "Den obnovy samostatného českého státu", @@ -678,14 +679,14 @@ pub fn build( (NaiveDate::from_ymd_res(2017, 12, 26)?, "2. svátek vánoční"), ], &mut map, - Country::CZ, - "Czechia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2018, - vec![ + [ ( NaiveDate::from_ymd_res(2018, 1, 1)?, "Den obnovy samostatného českého státu", @@ -716,14 +717,14 @@ pub fn build( (NaiveDate::from_ymd_res(2018, 12, 26)?, "2. svátek vánoční"), ], &mut map, - Country::CZ, - "Czechia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2019, - vec![ + [ ( NaiveDate::from_ymd_res(2019, 1, 1)?, "Den obnovy samostatného českého státu", @@ -754,14 +755,14 @@ pub fn build( (NaiveDate::from_ymd_res(2019, 12, 26)?, "2. svátek vánoční"), ], &mut map, - Country::CZ, - "Czechia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2020, - vec![ + [ ( NaiveDate::from_ymd_res(2020, 1, 1)?, "Den obnovy samostatného českého státu", @@ -792,14 +793,14 @@ pub fn build( (NaiveDate::from_ymd_res(2020, 12, 26)?, "2. svátek vánoční"), ], &mut map, - Country::CZ, - "Czechia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2021, - vec![ + [ ( NaiveDate::from_ymd_res(2021, 1, 1)?, "Den obnovy samostatného českého státu", @@ -830,14 +831,14 @@ pub fn build( (NaiveDate::from_ymd_res(2021, 12, 26)?, "2. svátek vánoční"), ], &mut map, - Country::CZ, - "Czechia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2022, - vec![ + [ ( NaiveDate::from_ymd_res(2022, 1, 1)?, "Den obnovy samostatného českého státu", @@ -868,14 +869,14 @@ pub fn build( (NaiveDate::from_ymd_res(2022, 12, 26)?, "2. svátek vánoční"), ], &mut map, - Country::CZ, - "Czechia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2023, - vec![ + [ ( NaiveDate::from_ymd_res(2023, 1, 1)?, "Den obnovy samostatného českého státu", @@ -906,14 +907,14 @@ pub fn build( (NaiveDate::from_ymd_res(2023, 12, 26)?, "2. svátek vánoční"), ], &mut map, - Country::CZ, - "Czechia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2024, - vec![ + [ ( NaiveDate::from_ymd_res(2024, 1, 1)?, "Den obnovy samostatného českého státu", @@ -944,14 +945,14 @@ pub fn build( (NaiveDate::from_ymd_res(2024, 12, 26)?, "2. svátek vánoční"), ], &mut map, - Country::CZ, - "Czechia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2025, - vec![ + [ ( NaiveDate::from_ymd_res(2025, 1, 1)?, "Den obnovy samostatného českého státu", @@ -982,14 +983,14 @@ pub fn build( (NaiveDate::from_ymd_res(2025, 12, 26)?, "2. svátek vánoční"), ], &mut map, - Country::CZ, - "Czechia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2026, - vec![ + [ ( NaiveDate::from_ymd_res(2026, 1, 1)?, "Den obnovy samostatného českého státu", @@ -1020,14 +1021,14 @@ pub fn build( (NaiveDate::from_ymd_res(2026, 12, 26)?, "2. svátek vánoční"), ], &mut map, - Country::CZ, - "Czechia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2027, - vec![ + [ ( NaiveDate::from_ymd_res(2027, 1, 1)?, "Den obnovy samostatného českého státu", @@ -1058,14 +1059,14 @@ pub fn build( (NaiveDate::from_ymd_res(2027, 12, 26)?, "2. svátek vánoční"), ], &mut map, - Country::CZ, - "Czechia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2028, - vec![ + [ ( NaiveDate::from_ymd_res(2028, 1, 1)?, "Den obnovy samostatného českého státu", @@ -1096,14 +1097,14 @@ pub fn build( (NaiveDate::from_ymd_res(2028, 12, 26)?, "2. svátek vánoční"), ], &mut map, - Country::CZ, - "Czechia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2029, - vec![ + [ ( NaiveDate::from_ymd_res(2029, 1, 1)?, "Den obnovy samostatného českého státu", @@ -1134,14 +1135,14 @@ pub fn build( (NaiveDate::from_ymd_res(2029, 12, 26)?, "2. svátek vánoční"), ], &mut map, - Country::CZ, - "Czechia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2030, - vec![ + [ ( NaiveDate::from_ymd_res(2030, 1, 1)?, "Den obnovy samostatného českého státu", @@ -1172,8 +1173,8 @@ pub fn build( (NaiveDate::from_ymd_res(2030, 12, 26)?, "2. svátek vánoční"), ], &mut map, - Country::CZ, - "Czechia", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/de.rs b/src/data/de.rs index 1001f73..73fb8ac 100644 --- a/src/data/de.rs +++ b/src/data/de.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Germany"; +const COUNTY_CODE: Country = Country::DE; + /// Generate holiday map for Germany. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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"), @@ -38,14 +39,14 @@ pub fn build( ), ], &mut map, - Country::DE, - "Germany", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -66,14 +67,14 @@ pub fn build( ), ], &mut map, - Country::DE, - "Germany", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -94,14 +95,14 @@ pub fn build( ), ], &mut map, - Country::DE, - "Germany", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -122,14 +123,14 @@ pub fn build( ), ], &mut map, - Country::DE, - "Germany", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -150,14 +151,14 @@ pub fn build( ), ], &mut map, - Country::DE, - "Germany", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -178,14 +179,14 @@ pub fn build( ), ], &mut map, - Country::DE, - "Germany", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -206,14 +207,14 @@ pub fn build( ), ], &mut map, - Country::DE, - "Germany", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -234,14 +235,14 @@ pub fn build( ), ], &mut map, - Country::DE, - "Germany", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -264,14 +265,14 @@ pub fn build( ), ], &mut map, - Country::DE, - "Germany", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -292,14 +293,14 @@ pub fn build( ), ], &mut map, - Country::DE, - "Germany", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -320,14 +321,14 @@ pub fn build( ), ], &mut map, - Country::DE, - "Germany", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -348,14 +349,14 @@ pub fn build( ), ], &mut map, - Country::DE, - "Germany", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -376,14 +377,14 @@ pub fn build( ), ], &mut map, - Country::DE, - "Germany", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -404,14 +405,14 @@ pub fn build( ), ], &mut map, - Country::DE, - "Germany", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -432,14 +433,14 @@ pub fn build( ), ], &mut map, - Country::DE, - "Germany", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -460,14 +461,14 @@ pub fn build( ), ], &mut map, - Country::DE, - "Germany", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -488,14 +489,14 @@ pub fn build( ), ], &mut map, - Country::DE, - "Germany", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -517,14 +518,14 @@ pub fn build( (NaiveDate::from_ymd_res(2017, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE, - "Germany", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -545,14 +546,14 @@ pub fn build( ), ], &mut map, - Country::DE, - "Germany", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -573,14 +574,14 @@ pub fn build( ), ], &mut map, - Country::DE, - "Germany", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -601,14 +602,14 @@ pub fn build( ), ], &mut map, - Country::DE, - "Germany", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -629,14 +630,14 @@ pub fn build( ), ], &mut map, - Country::DE, - "Germany", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -657,14 +658,14 @@ pub fn build( ), ], &mut map, - Country::DE, - "Germany", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -685,14 +686,14 @@ pub fn build( ), ], &mut map, - Country::DE, - "Germany", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -713,14 +714,14 @@ pub fn build( ), ], &mut map, - Country::DE, - "Germany", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -741,14 +742,14 @@ pub fn build( ), ], &mut map, - Country::DE, - "Germany", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -769,14 +770,14 @@ pub fn build( ), ], &mut map, - Country::DE, - "Germany", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -797,14 +798,14 @@ pub fn build( ), ], &mut map, - Country::DE, - "Germany", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -825,14 +826,14 @@ pub fn build( ), ], &mut map, - Country::DE, - "Germany", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -853,14 +854,14 @@ pub fn build( ), ], &mut map, - Country::DE, - "Germany", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -881,8 +882,8 @@ pub fn build( ), ], &mut map, - Country::DE, - "Germany", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/de_bb.rs b/src/data/de_bb.rs index 1100efb..9ae907b 100644 --- a/src/data/de_bb.rs +++ b/src/data/de_bb.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Germany (Brandenburg)"; +const COUNTY_CODE: Country = Country::DE_BB; + /// Generate holiday map for Germany (Brandenburg). #[allow( unused_mut, @@ -9,972 +12,442 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); - build_year( + let mut national_holidays = de::build(years)?; + + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2000, 4, 23)?, "Ostersonntag"), (NaiveDate::from_ymd_res(2000, 6, 11)?, "Pfingstsonntag"), (NaiveDate::from_ymd_res(2000, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_BB, - "Germany (Brandenburg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2001, 4, 15)?, "Ostersonntag"), (NaiveDate::from_ymd_res(2001, 6, 3)?, "Pfingstsonntag"), (NaiveDate::from_ymd_res(2001, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_BB, - "Germany (Brandenburg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2002, 3, 31)?, "Ostersonntag"), (NaiveDate::from_ymd_res(2002, 5, 19)?, "Pfingstsonntag"), (NaiveDate::from_ymd_res(2002, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_BB, - "Germany (Brandenburg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2003, 4, 20)?, "Ostersonntag"), (NaiveDate::from_ymd_res(2003, 6, 8)?, "Pfingstsonntag"), (NaiveDate::from_ymd_res(2003, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_BB, - "Germany (Brandenburg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2004, 4, 11)?, "Ostersonntag"), (NaiveDate::from_ymd_res(2004, 5, 30)?, "Pfingstsonntag"), (NaiveDate::from_ymd_res(2004, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_BB, - "Germany (Brandenburg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2005, 3, 27)?, "Ostersonntag"), (NaiveDate::from_ymd_res(2005, 5, 15)?, "Pfingstsonntag"), (NaiveDate::from_ymd_res(2005, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_BB, - "Germany (Brandenburg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2006, 4, 16)?, "Ostersonntag"), (NaiveDate::from_ymd_res(2006, 6, 4)?, "Pfingstsonntag"), (NaiveDate::from_ymd_res(2006, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_BB, - "Germany (Brandenburg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2007, 4, 8)?, "Ostersonntag"), (NaiveDate::from_ymd_res(2007, 5, 27)?, "Pfingstsonntag"), (NaiveDate::from_ymd_res(2007, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_BB, - "Germany (Brandenburg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2008, 3, 23)?, "Ostersonntag"), (NaiveDate::from_ymd_res(2008, 5, 11)?, "Pfingstsonntag"), (NaiveDate::from_ymd_res(2008, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_BB, - "Germany (Brandenburg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2009, 4, 12)?, "Ostersonntag"), (NaiveDate::from_ymd_res(2009, 5, 31)?, "Pfingstsonntag"), (NaiveDate::from_ymd_res(2009, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_BB, - "Germany (Brandenburg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2010, 4, 4)?, "Ostersonntag"), (NaiveDate::from_ymd_res(2010, 5, 23)?, "Pfingstsonntag"), (NaiveDate::from_ymd_res(2010, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_BB, - "Germany (Brandenburg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2011, 4, 24)?, "Ostersonntag"), (NaiveDate::from_ymd_res(2011, 6, 12)?, "Pfingstsonntag"), (NaiveDate::from_ymd_res(2011, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_BB, - "Germany (Brandenburg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2012, 4, 8)?, "Ostersonntag"), (NaiveDate::from_ymd_res(2012, 5, 27)?, "Pfingstsonntag"), (NaiveDate::from_ymd_res(2012, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_BB, - "Germany (Brandenburg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2013, 3, 31)?, "Ostersonntag"), (NaiveDate::from_ymd_res(2013, 5, 19)?, "Pfingstsonntag"), (NaiveDate::from_ymd_res(2013, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_BB, - "Germany (Brandenburg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2014, 4, 20)?, "Ostersonntag"), (NaiveDate::from_ymd_res(2014, 6, 8)?, "Pfingstsonntag"), (NaiveDate::from_ymd_res(2014, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_BB, - "Germany (Brandenburg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2015, 4, 5)?, "Ostersonntag"), (NaiveDate::from_ymd_res(2015, 5, 24)?, "Pfingstsonntag"), (NaiveDate::from_ymd_res(2015, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_BB, - "Germany (Brandenburg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2016, 3, 27)?, "Ostersonntag"), (NaiveDate::from_ymd_res(2016, 5, 15)?, "Pfingstsonntag"), (NaiveDate::from_ymd_res(2016, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_BB, - "Germany (Brandenburg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2017, 4, 16)?, "Ostersonntag"), (NaiveDate::from_ymd_res(2017, 6, 4)?, "Pfingstsonntag"), ], &mut map, - Country::DE_BB, - "Germany (Brandenburg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2018, 4, 1)?, "Ostersonntag"), (NaiveDate::from_ymd_res(2018, 5, 20)?, "Pfingstsonntag"), (NaiveDate::from_ymd_res(2018, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_BB, - "Germany (Brandenburg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2019, 4, 21)?, "Ostersonntag"), (NaiveDate::from_ymd_res(2019, 6, 9)?, "Pfingstsonntag"), (NaiveDate::from_ymd_res(2019, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_BB, - "Germany (Brandenburg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2020, 4, 12)?, "Ostersonntag"), (NaiveDate::from_ymd_res(2020, 5, 31)?, "Pfingstsonntag"), (NaiveDate::from_ymd_res(2020, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_BB, - "Germany (Brandenburg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2021, 4, 4)?, "Ostersonntag"), (NaiveDate::from_ymd_res(2021, 5, 23)?, "Pfingstsonntag"), (NaiveDate::from_ymd_res(2021, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_BB, - "Germany (Brandenburg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2022, 4, 17)?, "Ostersonntag"), (NaiveDate::from_ymd_res(2022, 6, 5)?, "Pfingstsonntag"), (NaiveDate::from_ymd_res(2022, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_BB, - "Germany (Brandenburg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2023, 4, 9)?, "Ostersonntag"), (NaiveDate::from_ymd_res(2023, 5, 28)?, "Pfingstsonntag"), (NaiveDate::from_ymd_res(2023, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_BB, - "Germany (Brandenburg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2024, 3, 31)?, "Ostersonntag"), (NaiveDate::from_ymd_res(2024, 5, 19)?, "Pfingstsonntag"), (NaiveDate::from_ymd_res(2024, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_BB, - "Germany (Brandenburg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2025, 4, 20)?, "Ostersonntag"), (NaiveDate::from_ymd_res(2025, 6, 8)?, "Pfingstsonntag"), (NaiveDate::from_ymd_res(2025, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_BB, - "Germany (Brandenburg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2026, 4, 5)?, "Ostersonntag"), (NaiveDate::from_ymd_res(2026, 5, 24)?, "Pfingstsonntag"), (NaiveDate::from_ymd_res(2026, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_BB, - "Germany (Brandenburg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2027, 3, 28)?, "Ostersonntag"), (NaiveDate::from_ymd_res(2027, 5, 16)?, "Pfingstsonntag"), (NaiveDate::from_ymd_res(2027, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_BB, - "Germany (Brandenburg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2028, 4, 16)?, "Ostersonntag"), (NaiveDate::from_ymd_res(2028, 6, 4)?, "Pfingstsonntag"), (NaiveDate::from_ymd_res(2028, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_BB, - "Germany (Brandenburg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2029, 4, 1)?, "Ostersonntag"), (NaiveDate::from_ymd_res(2029, 5, 20)?, "Pfingstsonntag"), (NaiveDate::from_ymd_res(2029, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_BB, - "Germany (Brandenburg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2030, 4, 21)?, "Ostersonntag"), (NaiveDate::from_ymd_res(2030, 6, 9)?, "Pfingstsonntag"), (NaiveDate::from_ymd_res(2030, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_BB, - "Germany (Brandenburg)", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/de_be.rs b/src/data/de_be.rs index 1123f07..5554378 100644 --- a/src/data/de_be.rs +++ b/src/data/de_be.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Germany (Berlin)"; +const COUNTY_CODE: Country = Country::DE_BE; + /// Generate holiday map for Germany (Berlin). #[allow( unused_mut, @@ -9,918 +12,355 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); - build_year( + let mut national_holidays = de::build(years)?; + + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_BE, - "Germany (Berlin)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_BE, - "Germany (Berlin)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_BE, - "Germany (Berlin)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_BE, - "Germany (Berlin)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_BE, - "Germany (Berlin)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_BE, - "Germany (Berlin)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_BE, - "Germany (Berlin)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_BE, - "Germany (Berlin)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_BE, - "Germany (Berlin)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_BE, - "Germany (Berlin)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_BE, - "Germany (Berlin)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_BE, - "Germany (Berlin)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_BE, - "Germany (Berlin)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_BE, - "Germany (Berlin)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_BE, - "Germany (Berlin)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_BE, - "Germany (Berlin)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_BE, - "Germany (Berlin)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_BE, - "Germany (Berlin)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_BE, - "Germany (Berlin)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ( - NaiveDate::from_ymd_res(2019, 3, 8)?, - "Internationaler Frauentag", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2019, 3, 8)?, + "Internationaler Frauentag", + )], &mut map, - Country::DE_BE, - "Germany (Berlin)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2020, 3, 8)?, "Internationaler Frauentag"), - (NaiveDate::from_ymd_res(2020, 5, 8)?, "75. Jahrestag der Befreiung vom Nationalsozialismus und der Beendigung des Zweiten Weltkriegs in Europa"), + &mut national_holidays, + [ + (NaiveDate::from_ymd_res(2020, 3, 8)?, "Internationaler Frauentag"), + (NaiveDate::from_ymd_res(2020, 5, 8)?, "75. Jahrestag der Befreiung vom Nationalsozialismus und der Beendigung des Zweiten Weltkriegs in Europa"), ], &mut map, - Country::DE_BE, - "Germany (Berlin)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ( - NaiveDate::from_ymd_res(2021, 3, 8)?, - "Internationaler Frauentag", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2021, 3, 8)?, + "Internationaler Frauentag", + )], &mut map, - Country::DE_BE, - "Germany (Berlin)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ( - NaiveDate::from_ymd_res(2022, 3, 8)?, - "Internationaler Frauentag", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2022, 3, 8)?, + "Internationaler Frauentag", + )], &mut map, - Country::DE_BE, - "Germany (Berlin)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ( - NaiveDate::from_ymd_res(2023, 3, 8)?, - "Internationaler Frauentag", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2023, 3, 8)?, + "Internationaler Frauentag", + )], &mut map, - Country::DE_BE, - "Germany (Berlin)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ( - NaiveDate::from_ymd_res(2024, 3, 8)?, - "Internationaler Frauentag", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2024, 3, 8)?, + "Internationaler Frauentag", + )], &mut map, - Country::DE_BE, - "Germany (Berlin)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ( - NaiveDate::from_ymd_res(2025, 3, 8)?, - "Internationaler Frauentag", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2025, 3, 8)?, + "Internationaler Frauentag", + )], &mut map, - Country::DE_BE, - "Germany (Berlin)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ( - NaiveDate::from_ymd_res(2026, 3, 8)?, - "Internationaler Frauentag", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2026, 3, 8)?, + "Internationaler Frauentag", + )], &mut map, - Country::DE_BE, - "Germany (Berlin)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ( - NaiveDate::from_ymd_res(2027, 3, 8)?, - "Internationaler Frauentag", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2027, 3, 8)?, + "Internationaler Frauentag", + )], &mut map, - Country::DE_BE, - "Germany (Berlin)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ( - NaiveDate::from_ymd_res(2028, 3, 8)?, - "Internationaler Frauentag", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2028, 3, 8)?, + "Internationaler Frauentag", + )], &mut map, - Country::DE_BE, - "Germany (Berlin)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ( - NaiveDate::from_ymd_res(2029, 3, 8)?, - "Internationaler Frauentag", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2029, 3, 8)?, + "Internationaler Frauentag", + )], &mut map, - Country::DE_BE, - "Germany (Berlin)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ( - NaiveDate::from_ymd_res(2030, 3, 8)?, - "Internationaler Frauentag", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2030, 3, 8)?, + "Internationaler Frauentag", + )], &mut map, - Country::DE_BE, - "Germany (Berlin)", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/de_bw.rs b/src/data/de_bw.rs index bad78cf..df5bc0c 100644 --- a/src/data/de_bw.rs +++ b/src/data/de_bw.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Germany (Baden-Württemberg)"; +const COUNTY_CODE: Country = Country::DE_BW; + /// Generate holiday map for Germany (Baden-Württemberg). #[allow( unused_mut, @@ -9,973 +12,443 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); - build_year( + let mut national_holidays = de::build(years)?; + + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2000, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2000, 6, 22)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2000, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BW, - "Germany (Baden-Württemberg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2001, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2001, 6, 14)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2001, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BW, - "Germany (Baden-Württemberg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2002, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2002, 5, 30)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2002, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BW, - "Germany (Baden-Württemberg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2003, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2003, 6, 19)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2003, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BW, - "Germany (Baden-Württemberg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2004, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2004, 6, 10)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2004, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BW, - "Germany (Baden-Württemberg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2005, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2005, 5, 26)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2005, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BW, - "Germany (Baden-Württemberg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2006, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2006, 6, 15)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2006, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BW, - "Germany (Baden-Württemberg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2007, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2007, 6, 7)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2007, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BW, - "Germany (Baden-Württemberg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2008, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2008, 5, 22)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2008, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BW, - "Germany (Baden-Württemberg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2009, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2009, 6, 11)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2009, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BW, - "Germany (Baden-Württemberg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2010, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2010, 6, 3)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2010, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BW, - "Germany (Baden-Württemberg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2011, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2011, 6, 23)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2011, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BW, - "Germany (Baden-Württemberg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2012, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2012, 6, 7)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2012, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BW, - "Germany (Baden-Württemberg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2013, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2013, 5, 30)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2013, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BW, - "Germany (Baden-Württemberg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2014, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2014, 6, 19)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2014, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BW, - "Germany (Baden-Württemberg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2015, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2015, 6, 4)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2015, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BW, - "Germany (Baden-Württemberg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2016, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2016, 5, 26)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2016, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BW, - "Germany (Baden-Württemberg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2017, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2017, 6, 15)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2017, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BW, - "Germany (Baden-Württemberg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2018, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2018, 5, 31)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2018, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BW, - "Germany (Baden-Württemberg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2019, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2019, 6, 20)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2019, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BW, - "Germany (Baden-Württemberg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2020, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2020, 6, 11)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2020, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BW, - "Germany (Baden-Württemberg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2021, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2021, 6, 3)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2021, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BW, - "Germany (Baden-Württemberg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2022, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2022, 6, 16)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2022, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BW, - "Germany (Baden-Württemberg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2023, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2023, 6, 8)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2023, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BW, - "Germany (Baden-Württemberg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2024, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2024, 5, 30)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2024, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BW, - "Germany (Baden-Württemberg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2025, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2025, 6, 19)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2025, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BW, - "Germany (Baden-Württemberg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2026, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2026, 6, 4)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2026, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BW, - "Germany (Baden-Württemberg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2027, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2027, 5, 27)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2027, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BW, - "Germany (Baden-Württemberg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2028, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2028, 6, 15)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2028, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BW, - "Germany (Baden-Württemberg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2029, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2029, 5, 31)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2029, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BW, - "Germany (Baden-Württemberg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2030, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2030, 6, 20)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2030, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BW, - "Germany (Baden-Württemberg)", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/de_by.rs b/src/data/de_by.rs index 4a0e89e..6c493b4 100644 --- a/src/data/de_by.rs +++ b/src/data/de_by.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Germany (Bavaria (Bayern))"; +const COUNTY_CODE: Country = Country::DE_BY; + /// Generate holiday map for Germany (Bavaria (Bayern)). #[allow( unused_mut, @@ -9,1004 +12,474 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); - build_year( + let mut national_holidays = de::build(years)?; + + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2000, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2000, 6, 22)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2000, 8, 15)?, "Mariä Himmelfahrt"), (NaiveDate::from_ymd_res(2000, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BY, - "Germany (Bavaria (Bayern))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2001, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2001, 6, 14)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2001, 8, 15)?, "Mariä Himmelfahrt"), (NaiveDate::from_ymd_res(2001, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BY, - "Germany (Bavaria (Bayern))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2002, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2002, 5, 30)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2002, 8, 15)?, "Mariä Himmelfahrt"), (NaiveDate::from_ymd_res(2002, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BY, - "Germany (Bavaria (Bayern))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2003, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2003, 6, 19)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2003, 8, 15)?, "Mariä Himmelfahrt"), (NaiveDate::from_ymd_res(2003, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BY, - "Germany (Bavaria (Bayern))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2004, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2004, 6, 10)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2004, 8, 15)?, "Mariä Himmelfahrt"), (NaiveDate::from_ymd_res(2004, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BY, - "Germany (Bavaria (Bayern))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2005, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2005, 5, 26)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2005, 8, 15)?, "Mariä Himmelfahrt"), (NaiveDate::from_ymd_res(2005, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BY, - "Germany (Bavaria (Bayern))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2006, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2006, 6, 15)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2006, 8, 15)?, "Mariä Himmelfahrt"), (NaiveDate::from_ymd_res(2006, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BY, - "Germany (Bavaria (Bayern))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2007, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2007, 6, 7)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2007, 8, 15)?, "Mariä Himmelfahrt"), (NaiveDate::from_ymd_res(2007, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BY, - "Germany (Bavaria (Bayern))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2008, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2008, 5, 22)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2008, 8, 15)?, "Mariä Himmelfahrt"), (NaiveDate::from_ymd_res(2008, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BY, - "Germany (Bavaria (Bayern))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2009, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2009, 6, 11)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2009, 8, 15)?, "Mariä Himmelfahrt"), (NaiveDate::from_ymd_res(2009, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BY, - "Germany (Bavaria (Bayern))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2010, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2010, 6, 3)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2010, 8, 15)?, "Mariä Himmelfahrt"), (NaiveDate::from_ymd_res(2010, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BY, - "Germany (Bavaria (Bayern))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2011, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2011, 6, 23)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2011, 8, 15)?, "Mariä Himmelfahrt"), (NaiveDate::from_ymd_res(2011, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BY, - "Germany (Bavaria (Bayern))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2012, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2012, 6, 7)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2012, 8, 15)?, "Mariä Himmelfahrt"), (NaiveDate::from_ymd_res(2012, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BY, - "Germany (Bavaria (Bayern))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2013, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2013, 5, 30)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2013, 8, 15)?, "Mariä Himmelfahrt"), (NaiveDate::from_ymd_res(2013, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BY, - "Germany (Bavaria (Bayern))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2014, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2014, 6, 19)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2014, 8, 15)?, "Mariä Himmelfahrt"), (NaiveDate::from_ymd_res(2014, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BY, - "Germany (Bavaria (Bayern))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2015, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2015, 6, 4)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2015, 8, 15)?, "Mariä Himmelfahrt"), (NaiveDate::from_ymd_res(2015, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BY, - "Germany (Bavaria (Bayern))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2016, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2016, 5, 26)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2016, 8, 15)?, "Mariä Himmelfahrt"), (NaiveDate::from_ymd_res(2016, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BY, - "Germany (Bavaria (Bayern))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2017, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2017, 6, 15)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2017, 8, 15)?, "Mariä Himmelfahrt"), (NaiveDate::from_ymd_res(2017, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BY, - "Germany (Bavaria (Bayern))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2018, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2018, 5, 31)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2018, 8, 15)?, "Mariä Himmelfahrt"), (NaiveDate::from_ymd_res(2018, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BY, - "Germany (Bavaria (Bayern))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2019, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2019, 6, 20)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2019, 8, 15)?, "Mariä Himmelfahrt"), (NaiveDate::from_ymd_res(2019, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BY, - "Germany (Bavaria (Bayern))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2020, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2020, 6, 11)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2020, 8, 15)?, "Mariä Himmelfahrt"), (NaiveDate::from_ymd_res(2020, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BY, - "Germany (Bavaria (Bayern))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2021, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2021, 6, 3)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2021, 8, 15)?, "Mariä Himmelfahrt"), (NaiveDate::from_ymd_res(2021, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BY, - "Germany (Bavaria (Bayern))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2022, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2022, 6, 16)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2022, 8, 15)?, "Mariä Himmelfahrt"), (NaiveDate::from_ymd_res(2022, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BY, - "Germany (Bavaria (Bayern))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2023, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2023, 6, 8)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2023, 8, 15)?, "Mariä Himmelfahrt"), (NaiveDate::from_ymd_res(2023, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BY, - "Germany (Bavaria (Bayern))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2024, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2024, 5, 30)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2024, 8, 15)?, "Mariä Himmelfahrt"), (NaiveDate::from_ymd_res(2024, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BY, - "Germany (Bavaria (Bayern))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2025, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2025, 6, 19)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2025, 8, 15)?, "Mariä Himmelfahrt"), (NaiveDate::from_ymd_res(2025, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BY, - "Germany (Bavaria (Bayern))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2026, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2026, 6, 4)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2026, 8, 15)?, "Mariä Himmelfahrt"), (NaiveDate::from_ymd_res(2026, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BY, - "Germany (Bavaria (Bayern))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2027, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2027, 5, 27)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2027, 8, 15)?, "Mariä Himmelfahrt"), (NaiveDate::from_ymd_res(2027, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BY, - "Germany (Bavaria (Bayern))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2028, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2028, 6, 15)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2028, 8, 15)?, "Mariä Himmelfahrt"), (NaiveDate::from_ymd_res(2028, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BY, - "Germany (Bavaria (Bayern))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2029, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2029, 5, 31)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2029, 8, 15)?, "Mariä Himmelfahrt"), (NaiveDate::from_ymd_res(2029, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BY, - "Germany (Bavaria (Bayern))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2030, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2030, 6, 20)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2030, 8, 15)?, "Mariä Himmelfahrt"), (NaiveDate::from_ymd_res(2030, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BY, - "Germany (Bavaria (Bayern))", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/de_byp.rs b/src/data/de_byp.rs index a3ccfad..7fa49cb 100644 --- a/src/data/de_byp.rs +++ b/src/data/de_byp.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Germany (Bavaria (Bayern) with more protestants)"; +const COUNTY_CODE: Country = Country::DE_BYP; + /// Generate holiday map for Germany (Bavaria (Bayern) with more protestants). #[allow( unused_mut, @@ -9,973 +12,443 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); - build_year( + let mut national_holidays = de::build(years)?; + + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2000, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2000, 6, 22)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2000, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BYP, - "Germany (Bavaria (Bayern) with more protestants)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2001, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2001, 6, 14)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2001, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BYP, - "Germany (Bavaria (Bayern) with more protestants)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2002, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2002, 5, 30)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2002, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BYP, - "Germany (Bavaria (Bayern) with more protestants)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2003, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2003, 6, 19)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2003, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BYP, - "Germany (Bavaria (Bayern) with more protestants)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2004, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2004, 6, 10)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2004, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BYP, - "Germany (Bavaria (Bayern) with more protestants)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2005, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2005, 5, 26)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2005, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BYP, - "Germany (Bavaria (Bayern) with more protestants)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2006, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2006, 6, 15)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2006, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BYP, - "Germany (Bavaria (Bayern) with more protestants)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2007, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2007, 6, 7)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2007, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BYP, - "Germany (Bavaria (Bayern) with more protestants)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2008, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2008, 5, 22)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2008, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BYP, - "Germany (Bavaria (Bayern) with more protestants)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2009, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2009, 6, 11)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2009, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BYP, - "Germany (Bavaria (Bayern) with more protestants)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2010, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2010, 6, 3)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2010, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BYP, - "Germany (Bavaria (Bayern) with more protestants)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2011, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2011, 6, 23)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2011, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BYP, - "Germany (Bavaria (Bayern) with more protestants)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2012, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2012, 6, 7)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2012, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BYP, - "Germany (Bavaria (Bayern) with more protestants)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2013, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2013, 5, 30)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2013, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BYP, - "Germany (Bavaria (Bayern) with more protestants)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2014, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2014, 6, 19)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2014, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BYP, - "Germany (Bavaria (Bayern) with more protestants)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2015, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2015, 6, 4)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2015, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BYP, - "Germany (Bavaria (Bayern) with more protestants)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2016, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2016, 5, 26)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2016, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BYP, - "Germany (Bavaria (Bayern) with more protestants)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2017, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2017, 6, 15)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2017, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BYP, - "Germany (Bavaria (Bayern) with more protestants)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2018, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2018, 5, 31)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2018, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BYP, - "Germany (Bavaria (Bayern) with more protestants)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2019, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2019, 6, 20)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2019, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BYP, - "Germany (Bavaria (Bayern) with more protestants)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2020, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2020, 6, 11)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2020, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BYP, - "Germany (Bavaria (Bayern) with more protestants)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2021, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2021, 6, 3)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2021, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BYP, - "Germany (Bavaria (Bayern) with more protestants)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2022, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2022, 6, 16)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2022, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BYP, - "Germany (Bavaria (Bayern) with more protestants)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2023, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2023, 6, 8)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2023, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BYP, - "Germany (Bavaria (Bayern) with more protestants)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2024, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2024, 5, 30)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2024, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BYP, - "Germany (Bavaria (Bayern) with more protestants)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2025, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2025, 6, 19)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2025, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BYP, - "Germany (Bavaria (Bayern) with more protestants)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2026, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2026, 6, 4)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2026, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BYP, - "Germany (Bavaria (Bayern) with more protestants)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2027, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2027, 5, 27)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2027, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BYP, - "Germany (Bavaria (Bayern) with more protestants)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2028, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2028, 6, 15)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2028, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BYP, - "Germany (Bavaria (Bayern) with more protestants)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2029, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2029, 5, 31)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2029, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BYP, - "Germany (Bavaria (Bayern) with more protestants)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2030, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2030, 6, 20)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2030, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_BYP, - "Germany (Bavaria (Bayern) with more protestants)", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/de_hb.rs b/src/data/de_hb.rs index dab2a7d..a93eb21 100644 --- a/src/data/de_hb.rs +++ b/src/data/de_hb.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Germany (Bremen)"; +const COUNTY_CODE: Country = Country::DE_HB; + /// Generate holiday map for Germany (Bremen). #[allow( unused_mut, @@ -9,893 +12,319 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); - build_year( + let mut national_holidays = de::build(years)?; + + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_HB, - "Germany (Bremen)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_HB, - "Germany (Bremen)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_HB, - "Germany (Bremen)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_HB, - "Germany (Bremen)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_HB, - "Germany (Bremen)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_HB, - "Germany (Bremen)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_HB, - "Germany (Bremen)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_HB, - "Germany (Bremen)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_HB, - "Germany (Bremen)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_HB, - "Germany (Bremen)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_HB, - "Germany (Bremen)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_HB, - "Germany (Bremen)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_HB, - "Germany (Bremen)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_HB, - "Germany (Bremen)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_HB, - "Germany (Bremen)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_HB, - "Germany (Bremen)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_HB, - "Germany (Bremen)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_HB, - "Germany (Bremen)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2018, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2018, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_HB, - "Germany (Bremen)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2019, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2019, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_HB, - "Germany (Bremen)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2020, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2020, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_HB, - "Germany (Bremen)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2021, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2021, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_HB, - "Germany (Bremen)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2022, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2022, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_HB, - "Germany (Bremen)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2023, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2023, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_HB, - "Germany (Bremen)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2024, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2024, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_HB, - "Germany (Bremen)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2025, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2025, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_HB, - "Germany (Bremen)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2026, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2026, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_HB, - "Germany (Bremen)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2027, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2027, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_HB, - "Germany (Bremen)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2028, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2028, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_HB, - "Germany (Bremen)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2029, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2029, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_HB, - "Germany (Bremen)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2030, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2030, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_HB, - "Germany (Bremen)", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/de_he.rs b/src/data/de_he.rs index af30529..edb1b9f 100644 --- a/src/data/de_he.rs +++ b/src/data/de_he.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Germany (Hesse (Hessen))"; +const COUNTY_CODE: Country = Country::DE_HE; + /// Generate holiday map for Germany (Hesse (Hessen)). #[allow( unused_mut, @@ -9,911 +12,319 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); - build_year( + let mut national_holidays = de::build(years)?; + + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2000, 6, 22)?, "Fronleichnam"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2000, 6, 22)?, "Fronleichnam")], &mut map, - Country::DE_HE, - "Germany (Hesse (Hessen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2001, 6, 14)?, "Fronleichnam"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2001, 6, 14)?, "Fronleichnam")], &mut map, - Country::DE_HE, - "Germany (Hesse (Hessen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2002, 5, 30)?, "Fronleichnam"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2002, 5, 30)?, "Fronleichnam")], &mut map, - Country::DE_HE, - "Germany (Hesse (Hessen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2003, 6, 19)?, "Fronleichnam"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2003, 6, 19)?, "Fronleichnam")], &mut map, - Country::DE_HE, - "Germany (Hesse (Hessen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2004, 6, 10)?, "Fronleichnam"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2004, 6, 10)?, "Fronleichnam")], &mut map, - Country::DE_HE, - "Germany (Hesse (Hessen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2005, 5, 26)?, "Fronleichnam"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2005, 5, 26)?, "Fronleichnam")], &mut map, - Country::DE_HE, - "Germany (Hesse (Hessen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2006, 6, 15)?, "Fronleichnam"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2006, 6, 15)?, "Fronleichnam")], &mut map, - Country::DE_HE, - "Germany (Hesse (Hessen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2007, 6, 7)?, "Fronleichnam"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2007, 6, 7)?, "Fronleichnam")], &mut map, - Country::DE_HE, - "Germany (Hesse (Hessen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2008, 5, 22)?, "Fronleichnam"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2008, 5, 22)?, "Fronleichnam")], &mut map, - Country::DE_HE, - "Germany (Hesse (Hessen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2009, 6, 11)?, "Fronleichnam"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2009, 6, 11)?, "Fronleichnam")], &mut map, - Country::DE_HE, - "Germany (Hesse (Hessen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2010, 6, 3)?, "Fronleichnam"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2010, 6, 3)?, "Fronleichnam")], &mut map, - Country::DE_HE, - "Germany (Hesse (Hessen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2011, 6, 23)?, "Fronleichnam"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2011, 6, 23)?, "Fronleichnam")], &mut map, - Country::DE_HE, - "Germany (Hesse (Hessen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2012, 6, 7)?, "Fronleichnam"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2012, 6, 7)?, "Fronleichnam")], &mut map, - Country::DE_HE, - "Germany (Hesse (Hessen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2013, 5, 30)?, "Fronleichnam"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2013, 5, 30)?, "Fronleichnam")], &mut map, - Country::DE_HE, - "Germany (Hesse (Hessen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2014, 6, 19)?, "Fronleichnam"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2014, 6, 19)?, "Fronleichnam")], &mut map, - Country::DE_HE, - "Germany (Hesse (Hessen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2015, 6, 4)?, "Fronleichnam"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2015, 6, 4)?, "Fronleichnam")], &mut map, - Country::DE_HE, - "Germany (Hesse (Hessen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2016, 5, 26)?, "Fronleichnam"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2016, 5, 26)?, "Fronleichnam")], &mut map, - Country::DE_HE, - "Germany (Hesse (Hessen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2017, 6, 15)?, "Fronleichnam"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2017, 6, 15)?, "Fronleichnam")], &mut map, - Country::DE_HE, - "Germany (Hesse (Hessen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2018, 5, 31)?, "Fronleichnam"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2018, 5, 31)?, "Fronleichnam")], &mut map, - Country::DE_HE, - "Germany (Hesse (Hessen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2019, 6, 20)?, "Fronleichnam"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2019, 6, 20)?, "Fronleichnam")], &mut map, - Country::DE_HE, - "Germany (Hesse (Hessen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2020, 6, 11)?, "Fronleichnam"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2020, 6, 11)?, "Fronleichnam")], &mut map, - Country::DE_HE, - "Germany (Hesse (Hessen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2021, 6, 3)?, "Fronleichnam"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2021, 6, 3)?, "Fronleichnam")], &mut map, - Country::DE_HE, - "Germany (Hesse (Hessen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2022, 6, 16)?, "Fronleichnam"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2022, 6, 16)?, "Fronleichnam")], &mut map, - Country::DE_HE, - "Germany (Hesse (Hessen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2023, 6, 8)?, "Fronleichnam"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2023, 6, 8)?, "Fronleichnam")], &mut map, - Country::DE_HE, - "Germany (Hesse (Hessen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2024, 5, 30)?, "Fronleichnam"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2024, 5, 30)?, "Fronleichnam")], &mut map, - Country::DE_HE, - "Germany (Hesse (Hessen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2025, 6, 19)?, "Fronleichnam"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2025, 6, 19)?, "Fronleichnam")], &mut map, - Country::DE_HE, - "Germany (Hesse (Hessen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2026, 6, 4)?, "Fronleichnam"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2026, 6, 4)?, "Fronleichnam")], &mut map, - Country::DE_HE, - "Germany (Hesse (Hessen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2027, 5, 27)?, "Fronleichnam"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2027, 5, 27)?, "Fronleichnam")], &mut map, - Country::DE_HE, - "Germany (Hesse (Hessen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2028, 6, 15)?, "Fronleichnam"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2028, 6, 15)?, "Fronleichnam")], &mut map, - Country::DE_HE, - "Germany (Hesse (Hessen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2029, 5, 31)?, "Fronleichnam"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2029, 5, 31)?, "Fronleichnam")], &mut map, - Country::DE_HE, - "Germany (Hesse (Hessen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2030, 6, 20)?, "Fronleichnam"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2030, 6, 20)?, "Fronleichnam")], &mut map, - Country::DE_HE, - "Germany (Hesse (Hessen))", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/de_hh.rs b/src/data/de_hh.rs index a3e2427..bdad2eb 100644 --- a/src/data/de_hh.rs +++ b/src/data/de_hh.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Germany (Hamburg)"; +const COUNTY_CODE: Country = Country::DE_HH; + /// Generate holiday map for Germany (Hamburg). #[allow( unused_mut, @@ -9,893 +12,319 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); - build_year( + let mut national_holidays = de::build(years)?; + + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_HH, - "Germany (Hamburg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_HH, - "Germany (Hamburg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_HH, - "Germany (Hamburg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_HH, - "Germany (Hamburg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_HH, - "Germany (Hamburg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_HH, - "Germany (Hamburg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_HH, - "Germany (Hamburg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_HH, - "Germany (Hamburg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_HH, - "Germany (Hamburg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_HH, - "Germany (Hamburg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_HH, - "Germany (Hamburg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_HH, - "Germany (Hamburg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_HH, - "Germany (Hamburg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_HH, - "Germany (Hamburg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_HH, - "Germany (Hamburg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_HH, - "Germany (Hamburg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_HH, - "Germany (Hamburg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_HH, - "Germany (Hamburg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2018, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2018, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_HH, - "Germany (Hamburg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2019, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2019, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_HH, - "Germany (Hamburg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2020, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2020, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_HH, - "Germany (Hamburg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2021, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2021, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_HH, - "Germany (Hamburg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2022, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2022, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_HH, - "Germany (Hamburg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2023, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2023, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_HH, - "Germany (Hamburg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2024, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2024, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_HH, - "Germany (Hamburg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2025, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2025, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_HH, - "Germany (Hamburg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2026, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2026, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_HH, - "Germany (Hamburg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2027, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2027, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_HH, - "Germany (Hamburg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2028, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2028, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_HH, - "Germany (Hamburg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2029, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2029, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_HH, - "Germany (Hamburg)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2030, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2030, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_HH, - "Germany (Hamburg)", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/de_mv.rs b/src/data/de_mv.rs index e1b4fa9..af9102a 100644 --- a/src/data/de_mv.rs +++ b/src/data/de_mv.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Germany (Mecklenburg-Vorpommern)"; +const COUNTY_CODE: Country = Country::DE_MV; + /// Generate holiday map for Germany (Mecklenburg-Vorpommern). #[allow( unused_mut, @@ -9,702 +12,246 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); - build_year( + let mut national_holidays = de::build(years)?; + + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2000, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2000, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_MV, - "Germany (Mecklenburg-Vorpommern)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2001, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2001, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_MV, - "Germany (Mecklenburg-Vorpommern)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2002, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2002, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_MV, - "Germany (Mecklenburg-Vorpommern)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2003, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2003, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_MV, - "Germany (Mecklenburg-Vorpommern)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2004, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2004, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_MV, - "Germany (Mecklenburg-Vorpommern)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2005, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2005, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_MV, - "Germany (Mecklenburg-Vorpommern)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2006, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2006, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_MV, - "Germany (Mecklenburg-Vorpommern)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2007, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2007, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_MV, - "Germany (Mecklenburg-Vorpommern)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2008, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2008, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_MV, - "Germany (Mecklenburg-Vorpommern)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2009, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2009, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_MV, - "Germany (Mecklenburg-Vorpommern)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2010, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2010, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_MV, - "Germany (Mecklenburg-Vorpommern)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2011, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2011, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_MV, - "Germany (Mecklenburg-Vorpommern)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2012, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2012, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_MV, - "Germany (Mecklenburg-Vorpommern)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2013, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2013, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_MV, - "Germany (Mecklenburg-Vorpommern)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2014, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2014, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_MV, - "Germany (Mecklenburg-Vorpommern)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2015, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2015, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_MV, - "Germany (Mecklenburg-Vorpommern)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2016, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2016, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_MV, - "Germany (Mecklenburg-Vorpommern)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_MV, - "Germany (Mecklenburg-Vorpommern)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2018, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2018, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_MV, - "Germany (Mecklenburg-Vorpommern)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2019, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2019, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_MV, - "Germany (Mecklenburg-Vorpommern)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2020, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2020, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_MV, - "Germany (Mecklenburg-Vorpommern)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2021, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2021, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_MV, - "Germany (Mecklenburg-Vorpommern)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2022, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2022, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_MV, - "Germany (Mecklenburg-Vorpommern)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ ( NaiveDate::from_ymd_res(2023, 3, 8)?, "Internationaler Frauentag", @@ -712,32 +259,15 @@ pub fn build( (NaiveDate::from_ymd_res(2023, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_MV, - "Germany (Mecklenburg-Vorpommern)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ ( NaiveDate::from_ymd_res(2024, 3, 8)?, "Internationaler Frauentag", @@ -745,32 +275,15 @@ pub fn build( (NaiveDate::from_ymd_res(2024, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_MV, - "Germany (Mecklenburg-Vorpommern)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ ( NaiveDate::from_ymd_res(2025, 3, 8)?, "Internationaler Frauentag", @@ -778,32 +291,15 @@ pub fn build( (NaiveDate::from_ymd_res(2025, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_MV, - "Germany (Mecklenburg-Vorpommern)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ ( NaiveDate::from_ymd_res(2026, 3, 8)?, "Internationaler Frauentag", @@ -811,32 +307,15 @@ pub fn build( (NaiveDate::from_ymd_res(2026, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_MV, - "Germany (Mecklenburg-Vorpommern)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ ( NaiveDate::from_ymd_res(2027, 3, 8)?, "Internationaler Frauentag", @@ -844,32 +323,15 @@ pub fn build( (NaiveDate::from_ymd_res(2027, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_MV, - "Germany (Mecklenburg-Vorpommern)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ ( NaiveDate::from_ymd_res(2028, 3, 8)?, "Internationaler Frauentag", @@ -877,32 +339,15 @@ pub fn build( (NaiveDate::from_ymd_res(2028, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_MV, - "Germany (Mecklenburg-Vorpommern)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ ( NaiveDate::from_ymd_res(2029, 3, 8)?, "Internationaler Frauentag", @@ -910,32 +355,15 @@ pub fn build( (NaiveDate::from_ymd_res(2029, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_MV, - "Germany (Mecklenburg-Vorpommern)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ ( NaiveDate::from_ymd_res(2030, 3, 8)?, "Internationaler Frauentag", @@ -943,8 +371,8 @@ pub fn build( (NaiveDate::from_ymd_res(2030, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_MV, - "Germany (Mecklenburg-Vorpommern)", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/de_ni.rs b/src/data/de_ni.rs index 12b96cc..2abcca6 100644 --- a/src/data/de_ni.rs +++ b/src/data/de_ni.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Germany (Lower Saxony (Niedersachsen))"; +const COUNTY_CODE: Country = Country::DE_NI; + /// Generate holiday map for Germany (Lower Saxony (Niedersachsen)). #[allow( unused_mut, @@ -9,893 +12,319 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); - build_year( + let mut national_holidays = de::build(years)?; + + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_NI, - "Germany (Lower Saxony (Niedersachsen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_NI, - "Germany (Lower Saxony (Niedersachsen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_NI, - "Germany (Lower Saxony (Niedersachsen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_NI, - "Germany (Lower Saxony (Niedersachsen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_NI, - "Germany (Lower Saxony (Niedersachsen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_NI, - "Germany (Lower Saxony (Niedersachsen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_NI, - "Germany (Lower Saxony (Niedersachsen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_NI, - "Germany (Lower Saxony (Niedersachsen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_NI, - "Germany (Lower Saxony (Niedersachsen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_NI, - "Germany (Lower Saxony (Niedersachsen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_NI, - "Germany (Lower Saxony (Niedersachsen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_NI, - "Germany (Lower Saxony (Niedersachsen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_NI, - "Germany (Lower Saxony (Niedersachsen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_NI, - "Germany (Lower Saxony (Niedersachsen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_NI, - "Germany (Lower Saxony (Niedersachsen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_NI, - "Germany (Lower Saxony (Niedersachsen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_NI, - "Germany (Lower Saxony (Niedersachsen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_NI, - "Germany (Lower Saxony (Niedersachsen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2018, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2018, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_NI, - "Germany (Lower Saxony (Niedersachsen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2019, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2019, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_NI, - "Germany (Lower Saxony (Niedersachsen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2020, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2020, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_NI, - "Germany (Lower Saxony (Niedersachsen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2021, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2021, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_NI, - "Germany (Lower Saxony (Niedersachsen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2022, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2022, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_NI, - "Germany (Lower Saxony (Niedersachsen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2023, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2023, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_NI, - "Germany (Lower Saxony (Niedersachsen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2024, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2024, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_NI, - "Germany (Lower Saxony (Niedersachsen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2025, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2025, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_NI, - "Germany (Lower Saxony (Niedersachsen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2026, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2026, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_NI, - "Germany (Lower Saxony (Niedersachsen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2027, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2027, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_NI, - "Germany (Lower Saxony (Niedersachsen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2028, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2028, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_NI, - "Germany (Lower Saxony (Niedersachsen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2029, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2029, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_NI, - "Germany (Lower Saxony (Niedersachsen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2030, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2030, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_NI, - "Germany (Lower Saxony (Niedersachsen))", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/de_nw.rs b/src/data/de_nw.rs index a1e441a..5768128 100644 --- a/src/data/de_nw.rs +++ b/src/data/de_nw.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Germany (North Rhine-Westphalia (Nordrhein-Westfalen))"; +const COUNTY_CODE: Country = Country::DE_NW; + /// Generate holiday map for Germany (North Rhine-Westphalia (Nordrhein-Westfalen)). #[allow( unused_mut, @@ -9,942 +12,412 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); - build_year( + let mut national_holidays = de::build(years)?; + + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2000, 6, 22)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2000, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_NW, - "Germany (North Rhine-Westphalia (Nordrhein-Westfalen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2001, 6, 14)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2001, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_NW, - "Germany (North Rhine-Westphalia (Nordrhein-Westfalen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2002, 5, 30)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2002, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_NW, - "Germany (North Rhine-Westphalia (Nordrhein-Westfalen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2003, 6, 19)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2003, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_NW, - "Germany (North Rhine-Westphalia (Nordrhein-Westfalen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2004, 6, 10)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2004, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_NW, - "Germany (North Rhine-Westphalia (Nordrhein-Westfalen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2005, 5, 26)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2005, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_NW, - "Germany (North Rhine-Westphalia (Nordrhein-Westfalen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2006, 6, 15)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2006, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_NW, - "Germany (North Rhine-Westphalia (Nordrhein-Westfalen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2007, 6, 7)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2007, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_NW, - "Germany (North Rhine-Westphalia (Nordrhein-Westfalen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2008, 5, 22)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2008, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_NW, - "Germany (North Rhine-Westphalia (Nordrhein-Westfalen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2009, 6, 11)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2009, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_NW, - "Germany (North Rhine-Westphalia (Nordrhein-Westfalen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2010, 6, 3)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2010, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_NW, - "Germany (North Rhine-Westphalia (Nordrhein-Westfalen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2011, 6, 23)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2011, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_NW, - "Germany (North Rhine-Westphalia (Nordrhein-Westfalen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2012, 6, 7)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2012, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_NW, - "Germany (North Rhine-Westphalia (Nordrhein-Westfalen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2013, 5, 30)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2013, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_NW, - "Germany (North Rhine-Westphalia (Nordrhein-Westfalen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2014, 6, 19)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2014, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_NW, - "Germany (North Rhine-Westphalia (Nordrhein-Westfalen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2015, 6, 4)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2015, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_NW, - "Germany (North Rhine-Westphalia (Nordrhein-Westfalen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2016, 5, 26)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2016, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_NW, - "Germany (North Rhine-Westphalia (Nordrhein-Westfalen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2017, 6, 15)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2017, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_NW, - "Germany (North Rhine-Westphalia (Nordrhein-Westfalen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2018, 5, 31)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2018, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_NW, - "Germany (North Rhine-Westphalia (Nordrhein-Westfalen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2019, 6, 20)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2019, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_NW, - "Germany (North Rhine-Westphalia (Nordrhein-Westfalen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2020, 6, 11)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2020, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_NW, - "Germany (North Rhine-Westphalia (Nordrhein-Westfalen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2021, 6, 3)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2021, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_NW, - "Germany (North Rhine-Westphalia (Nordrhein-Westfalen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2022, 6, 16)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2022, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_NW, - "Germany (North Rhine-Westphalia (Nordrhein-Westfalen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2023, 6, 8)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2023, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_NW, - "Germany (North Rhine-Westphalia (Nordrhein-Westfalen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2024, 5, 30)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2024, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_NW, - "Germany (North Rhine-Westphalia (Nordrhein-Westfalen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2025, 6, 19)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2025, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_NW, - "Germany (North Rhine-Westphalia (Nordrhein-Westfalen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2026, 6, 4)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2026, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_NW, - "Germany (North Rhine-Westphalia (Nordrhein-Westfalen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2027, 5, 27)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2027, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_NW, - "Germany (North Rhine-Westphalia (Nordrhein-Westfalen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2028, 6, 15)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2028, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_NW, - "Germany (North Rhine-Westphalia (Nordrhein-Westfalen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2029, 5, 31)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2029, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_NW, - "Germany (North Rhine-Westphalia (Nordrhein-Westfalen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2030, 6, 20)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2030, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_NW, - "Germany (North Rhine-Westphalia (Nordrhein-Westfalen))", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/de_rp.rs b/src/data/de_rp.rs index 85f4954..3470c90 100644 --- a/src/data/de_rp.rs +++ b/src/data/de_rp.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Germany (Rhineland-Palatinate (Rheinland-Pfalz))"; +const COUNTY_CODE: Country = Country::DE_RP; + /// Generate holiday map for Germany (Rhineland-Palatinate (Rheinland-Pfalz)). #[allow( unused_mut, @@ -9,942 +12,412 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); - build_year( + let mut national_holidays = de::build(years)?; + + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2000, 6, 22)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2000, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_RP, - "Germany (Rhineland-Palatinate (Rheinland-Pfalz))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2001, 6, 14)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2001, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_RP, - "Germany (Rhineland-Palatinate (Rheinland-Pfalz))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2002, 5, 30)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2002, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_RP, - "Germany (Rhineland-Palatinate (Rheinland-Pfalz))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2003, 6, 19)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2003, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_RP, - "Germany (Rhineland-Palatinate (Rheinland-Pfalz))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2004, 6, 10)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2004, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_RP, - "Germany (Rhineland-Palatinate (Rheinland-Pfalz))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2005, 5, 26)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2005, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_RP, - "Germany (Rhineland-Palatinate (Rheinland-Pfalz))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2006, 6, 15)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2006, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_RP, - "Germany (Rhineland-Palatinate (Rheinland-Pfalz))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2007, 6, 7)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2007, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_RP, - "Germany (Rhineland-Palatinate (Rheinland-Pfalz))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2008, 5, 22)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2008, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_RP, - "Germany (Rhineland-Palatinate (Rheinland-Pfalz))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2009, 6, 11)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2009, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_RP, - "Germany (Rhineland-Palatinate (Rheinland-Pfalz))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2010, 6, 3)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2010, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_RP, - "Germany (Rhineland-Palatinate (Rheinland-Pfalz))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2011, 6, 23)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2011, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_RP, - "Germany (Rhineland-Palatinate (Rheinland-Pfalz))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2012, 6, 7)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2012, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_RP, - "Germany (Rhineland-Palatinate (Rheinland-Pfalz))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2013, 5, 30)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2013, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_RP, - "Germany (Rhineland-Palatinate (Rheinland-Pfalz))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2014, 6, 19)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2014, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_RP, - "Germany (Rhineland-Palatinate (Rheinland-Pfalz))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2015, 6, 4)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2015, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_RP, - "Germany (Rhineland-Palatinate (Rheinland-Pfalz))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2016, 5, 26)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2016, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_RP, - "Germany (Rhineland-Palatinate (Rheinland-Pfalz))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2017, 6, 15)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2017, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_RP, - "Germany (Rhineland-Palatinate (Rheinland-Pfalz))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2018, 5, 31)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2018, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_RP, - "Germany (Rhineland-Palatinate (Rheinland-Pfalz))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2019, 6, 20)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2019, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_RP, - "Germany (Rhineland-Palatinate (Rheinland-Pfalz))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2020, 6, 11)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2020, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_RP, - "Germany (Rhineland-Palatinate (Rheinland-Pfalz))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2021, 6, 3)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2021, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_RP, - "Germany (Rhineland-Palatinate (Rheinland-Pfalz))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2022, 6, 16)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2022, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_RP, - "Germany (Rhineland-Palatinate (Rheinland-Pfalz))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2023, 6, 8)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2023, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_RP, - "Germany (Rhineland-Palatinate (Rheinland-Pfalz))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2024, 5, 30)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2024, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_RP, - "Germany (Rhineland-Palatinate (Rheinland-Pfalz))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2025, 6, 19)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2025, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_RP, - "Germany (Rhineland-Palatinate (Rheinland-Pfalz))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2026, 6, 4)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2026, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_RP, - "Germany (Rhineland-Palatinate (Rheinland-Pfalz))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2027, 5, 27)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2027, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_RP, - "Germany (Rhineland-Palatinate (Rheinland-Pfalz))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2028, 6, 15)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2028, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_RP, - "Germany (Rhineland-Palatinate (Rheinland-Pfalz))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2029, 5, 31)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2029, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_RP, - "Germany (Rhineland-Palatinate (Rheinland-Pfalz))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2030, 6, 20)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2030, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_RP, - "Germany (Rhineland-Palatinate (Rheinland-Pfalz))", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/de_sh.rs b/src/data/de_sh.rs index 8cd6632..6b93e0d 100644 --- a/src/data/de_sh.rs +++ b/src/data/de_sh.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Germany (Schleswig-Holstein)"; +const COUNTY_CODE: Country = Country::DE_SH; + /// Generate holiday map for Germany (Schleswig-Holstein). #[allow( unused_mut, @@ -9,893 +12,319 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); - build_year( + let mut national_holidays = de::build(years)?; + + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_SH, - "Germany (Schleswig-Holstein)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_SH, - "Germany (Schleswig-Holstein)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_SH, - "Germany (Schleswig-Holstein)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_SH, - "Germany (Schleswig-Holstein)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_SH, - "Germany (Schleswig-Holstein)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_SH, - "Germany (Schleswig-Holstein)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_SH, - "Germany (Schleswig-Holstein)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_SH, - "Germany (Schleswig-Holstein)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_SH, - "Germany (Schleswig-Holstein)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_SH, - "Germany (Schleswig-Holstein)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_SH, - "Germany (Schleswig-Holstein)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_SH, - "Germany (Schleswig-Holstein)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_SH, - "Germany (Schleswig-Holstein)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_SH, - "Germany (Schleswig-Holstein)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_SH, - "Germany (Schleswig-Holstein)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_SH, - "Germany (Schleswig-Holstein)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_SH, - "Germany (Schleswig-Holstein)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_SH, - "Germany (Schleswig-Holstein)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2018, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2018, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_SH, - "Germany (Schleswig-Holstein)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2019, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2019, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_SH, - "Germany (Schleswig-Holstein)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2020, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2020, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_SH, - "Germany (Schleswig-Holstein)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2021, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2021, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_SH, - "Germany (Schleswig-Holstein)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2022, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2022, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_SH, - "Germany (Schleswig-Holstein)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2023, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2023, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_SH, - "Germany (Schleswig-Holstein)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2024, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2024, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_SH, - "Germany (Schleswig-Holstein)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2025, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2025, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_SH, - "Germany (Schleswig-Holstein)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2026, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2026, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_SH, - "Germany (Schleswig-Holstein)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2027, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2027, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_SH, - "Germany (Schleswig-Holstein)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2028, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2028, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_SH, - "Germany (Schleswig-Holstein)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2029, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2029, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_SH, - "Germany (Schleswig-Holstein)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2030, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2030, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_SH, - "Germany (Schleswig-Holstein)", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/de_sl.rs b/src/data/de_sl.rs index 7516ef4..304684d 100644 --- a/src/data/de_sl.rs +++ b/src/data/de_sl.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Germany (Saarland)"; +const COUNTY_CODE: Country = Country::DE_SL; + /// Generate holiday map for Germany (Saarland). #[allow( unused_mut, @@ -9,973 +12,443 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); - build_year( + let mut national_holidays = de::build(years)?; + + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2000, 6, 22)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2000, 8, 15)?, "Mariä Himmelfahrt"), (NaiveDate::from_ymd_res(2000, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_SL, - "Germany (Saarland)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2001, 6, 14)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2001, 8, 15)?, "Mariä Himmelfahrt"), (NaiveDate::from_ymd_res(2001, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_SL, - "Germany (Saarland)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2002, 5, 30)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2002, 8, 15)?, "Mariä Himmelfahrt"), (NaiveDate::from_ymd_res(2002, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_SL, - "Germany (Saarland)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2003, 6, 19)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2003, 8, 15)?, "Mariä Himmelfahrt"), (NaiveDate::from_ymd_res(2003, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_SL, - "Germany (Saarland)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2004, 6, 10)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2004, 8, 15)?, "Mariä Himmelfahrt"), (NaiveDate::from_ymd_res(2004, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_SL, - "Germany (Saarland)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2005, 5, 26)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2005, 8, 15)?, "Mariä Himmelfahrt"), (NaiveDate::from_ymd_res(2005, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_SL, - "Germany (Saarland)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2006, 6, 15)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2006, 8, 15)?, "Mariä Himmelfahrt"), (NaiveDate::from_ymd_res(2006, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_SL, - "Germany (Saarland)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2007, 6, 7)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2007, 8, 15)?, "Mariä Himmelfahrt"), (NaiveDate::from_ymd_res(2007, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_SL, - "Germany (Saarland)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2008, 5, 22)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2008, 8, 15)?, "Mariä Himmelfahrt"), (NaiveDate::from_ymd_res(2008, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_SL, - "Germany (Saarland)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2009, 6, 11)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2009, 8, 15)?, "Mariä Himmelfahrt"), (NaiveDate::from_ymd_res(2009, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_SL, - "Germany (Saarland)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2010, 6, 3)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2010, 8, 15)?, "Mariä Himmelfahrt"), (NaiveDate::from_ymd_res(2010, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_SL, - "Germany (Saarland)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2011, 6, 23)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2011, 8, 15)?, "Mariä Himmelfahrt"), (NaiveDate::from_ymd_res(2011, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_SL, - "Germany (Saarland)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2012, 6, 7)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2012, 8, 15)?, "Mariä Himmelfahrt"), (NaiveDate::from_ymd_res(2012, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_SL, - "Germany (Saarland)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2013, 5, 30)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2013, 8, 15)?, "Mariä Himmelfahrt"), (NaiveDate::from_ymd_res(2013, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_SL, - "Germany (Saarland)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2014, 6, 19)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2014, 8, 15)?, "Mariä Himmelfahrt"), (NaiveDate::from_ymd_res(2014, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_SL, - "Germany (Saarland)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2015, 6, 4)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2015, 8, 15)?, "Mariä Himmelfahrt"), (NaiveDate::from_ymd_res(2015, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_SL, - "Germany (Saarland)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2016, 5, 26)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2016, 8, 15)?, "Mariä Himmelfahrt"), (NaiveDate::from_ymd_res(2016, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_SL, - "Germany (Saarland)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2017, 6, 15)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2017, 8, 15)?, "Mariä Himmelfahrt"), (NaiveDate::from_ymd_res(2017, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_SL, - "Germany (Saarland)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2018, 5, 31)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2018, 8, 15)?, "Mariä Himmelfahrt"), (NaiveDate::from_ymd_res(2018, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_SL, - "Germany (Saarland)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2019, 6, 20)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2019, 8, 15)?, "Mariä Himmelfahrt"), (NaiveDate::from_ymd_res(2019, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_SL, - "Germany (Saarland)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2020, 6, 11)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2020, 8, 15)?, "Mariä Himmelfahrt"), (NaiveDate::from_ymd_res(2020, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_SL, - "Germany (Saarland)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2021, 6, 3)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2021, 8, 15)?, "Mariä Himmelfahrt"), (NaiveDate::from_ymd_res(2021, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_SL, - "Germany (Saarland)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2022, 6, 16)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2022, 8, 15)?, "Mariä Himmelfahrt"), (NaiveDate::from_ymd_res(2022, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_SL, - "Germany (Saarland)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2023, 6, 8)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2023, 8, 15)?, "Mariä Himmelfahrt"), (NaiveDate::from_ymd_res(2023, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_SL, - "Germany (Saarland)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2024, 5, 30)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2024, 8, 15)?, "Mariä Himmelfahrt"), (NaiveDate::from_ymd_res(2024, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_SL, - "Germany (Saarland)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2025, 6, 19)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2025, 8, 15)?, "Mariä Himmelfahrt"), (NaiveDate::from_ymd_res(2025, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_SL, - "Germany (Saarland)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2026, 6, 4)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2026, 8, 15)?, "Mariä Himmelfahrt"), (NaiveDate::from_ymd_res(2026, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_SL, - "Germany (Saarland)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2027, 5, 27)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2027, 8, 15)?, "Mariä Himmelfahrt"), (NaiveDate::from_ymd_res(2027, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_SL, - "Germany (Saarland)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2028, 6, 15)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2028, 8, 15)?, "Mariä Himmelfahrt"), (NaiveDate::from_ymd_res(2028, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_SL, - "Germany (Saarland)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2029, 5, 31)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2029, 8, 15)?, "Mariä Himmelfahrt"), (NaiveDate::from_ymd_res(2029, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_SL, - "Germany (Saarland)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2030, 6, 20)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2030, 8, 15)?, "Mariä Himmelfahrt"), (NaiveDate::from_ymd_res(2030, 11, 1)?, "Allerheiligen"), ], &mut map, - Country::DE_SL, - "Germany (Saarland)", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/de_sn.rs b/src/data/de_sn.rs index 71efdcb..f54b0a9 100644 --- a/src/data/de_sn.rs +++ b/src/data/de_sn.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Germany (Saxony (Sachsen))"; +const COUNTY_CODE: Country = Country::DE_SN; + /// Generate holiday map for Germany (Saxony (Sachsen)). #[allow( unused_mut, @@ -9,941 +12,409 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); - build_year( + let mut national_holidays = de::build(years)?; + + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2000, 10, 31)?, "Reformationstag"), (NaiveDate::from_ymd_res(2000, 11, 22)?, "Buß- und Bettag"), ], &mut map, - Country::DE_SN, - "Germany (Saxony (Sachsen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2001, 10, 31)?, "Reformationstag"), (NaiveDate::from_ymd_res(2001, 11, 21)?, "Buß- und Bettag"), ], &mut map, - Country::DE_SN, - "Germany (Saxony (Sachsen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2002, 10, 31)?, "Reformationstag"), (NaiveDate::from_ymd_res(2002, 11, 20)?, "Buß- und Bettag"), ], &mut map, - Country::DE_SN, - "Germany (Saxony (Sachsen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2003, 10, 31)?, "Reformationstag"), (NaiveDate::from_ymd_res(2003, 11, 19)?, "Buß- und Bettag"), ], &mut map, - Country::DE_SN, - "Germany (Saxony (Sachsen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2004, 10, 31)?, "Reformationstag"), (NaiveDate::from_ymd_res(2004, 11, 17)?, "Buß- und Bettag"), ], &mut map, - Country::DE_SN, - "Germany (Saxony (Sachsen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2005, 10, 31)?, "Reformationstag"), (NaiveDate::from_ymd_res(2005, 11, 16)?, "Buß- und Bettag"), ], &mut map, - Country::DE_SN, - "Germany (Saxony (Sachsen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2006, 10, 31)?, "Reformationstag"), (NaiveDate::from_ymd_res(2006, 11, 22)?, "Buß- und Bettag"), ], &mut map, - Country::DE_SN, - "Germany (Saxony (Sachsen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2007, 10, 31)?, "Reformationstag"), (NaiveDate::from_ymd_res(2007, 11, 21)?, "Buß- und Bettag"), ], &mut map, - Country::DE_SN, - "Germany (Saxony (Sachsen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2008, 10, 31)?, "Reformationstag"), (NaiveDate::from_ymd_res(2008, 11, 19)?, "Buß- und Bettag"), ], &mut map, - Country::DE_SN, - "Germany (Saxony (Sachsen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2009, 10, 31)?, "Reformationstag"), (NaiveDate::from_ymd_res(2009, 11, 18)?, "Buß- und Bettag"), ], &mut map, - Country::DE_SN, - "Germany (Saxony (Sachsen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2010, 10, 31)?, "Reformationstag"), (NaiveDate::from_ymd_res(2010, 11, 17)?, "Buß- und Bettag"), ], &mut map, - Country::DE_SN, - "Germany (Saxony (Sachsen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2011, 10, 31)?, "Reformationstag"), (NaiveDate::from_ymd_res(2011, 11, 16)?, "Buß- und Bettag"), ], &mut map, - Country::DE_SN, - "Germany (Saxony (Sachsen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2012, 10, 31)?, "Reformationstag"), (NaiveDate::from_ymd_res(2012, 11, 21)?, "Buß- und Bettag"), ], &mut map, - Country::DE_SN, - "Germany (Saxony (Sachsen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2013, 10, 31)?, "Reformationstag"), (NaiveDate::from_ymd_res(2013, 11, 20)?, "Buß- und Bettag"), ], &mut map, - Country::DE_SN, - "Germany (Saxony (Sachsen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2014, 10, 31)?, "Reformationstag"), (NaiveDate::from_ymd_res(2014, 11, 19)?, "Buß- und Bettag"), ], &mut map, - Country::DE_SN, - "Germany (Saxony (Sachsen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2015, 10, 31)?, "Reformationstag"), (NaiveDate::from_ymd_res(2015, 11, 18)?, "Buß- und Bettag"), ], &mut map, - Country::DE_SN, - "Germany (Saxony (Sachsen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2016, 10, 31)?, "Reformationstag"), (NaiveDate::from_ymd_res(2016, 11, 16)?, "Buß- und Bettag"), ], &mut map, - Country::DE_SN, - "Germany (Saxony (Sachsen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2017, 11, 22)?, "Buß- und Bettag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2017, 11, 22)?, "Buß- und Bettag")], &mut map, - Country::DE_SN, - "Germany (Saxony (Sachsen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2018, 10, 31)?, "Reformationstag"), (NaiveDate::from_ymd_res(2018, 11, 21)?, "Buß- und Bettag"), ], &mut map, - Country::DE_SN, - "Germany (Saxony (Sachsen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2019, 10, 31)?, "Reformationstag"), (NaiveDate::from_ymd_res(2019, 11, 20)?, "Buß- und Bettag"), ], &mut map, - Country::DE_SN, - "Germany (Saxony (Sachsen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2020, 10, 31)?, "Reformationstag"), (NaiveDate::from_ymd_res(2020, 11, 18)?, "Buß- und Bettag"), ], &mut map, - Country::DE_SN, - "Germany (Saxony (Sachsen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2021, 10, 31)?, "Reformationstag"), (NaiveDate::from_ymd_res(2021, 11, 17)?, "Buß- und Bettag"), ], &mut map, - Country::DE_SN, - "Germany (Saxony (Sachsen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2022, 10, 31)?, "Reformationstag"), (NaiveDate::from_ymd_res(2022, 11, 16)?, "Buß- und Bettag"), ], &mut map, - Country::DE_SN, - "Germany (Saxony (Sachsen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2023, 10, 31)?, "Reformationstag"), (NaiveDate::from_ymd_res(2023, 11, 22)?, "Buß- und Bettag"), ], &mut map, - Country::DE_SN, - "Germany (Saxony (Sachsen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2024, 10, 31)?, "Reformationstag"), (NaiveDate::from_ymd_res(2024, 11, 20)?, "Buß- und Bettag"), ], &mut map, - Country::DE_SN, - "Germany (Saxony (Sachsen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2025, 10, 31)?, "Reformationstag"), (NaiveDate::from_ymd_res(2025, 11, 19)?, "Buß- und Bettag"), ], &mut map, - Country::DE_SN, - "Germany (Saxony (Sachsen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2026, 10, 31)?, "Reformationstag"), (NaiveDate::from_ymd_res(2026, 11, 18)?, "Buß- und Bettag"), ], &mut map, - Country::DE_SN, - "Germany (Saxony (Sachsen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2027, 10, 31)?, "Reformationstag"), (NaiveDate::from_ymd_res(2027, 11, 17)?, "Buß- und Bettag"), ], &mut map, - Country::DE_SN, - "Germany (Saxony (Sachsen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2028, 10, 31)?, "Reformationstag"), (NaiveDate::from_ymd_res(2028, 11, 22)?, "Buß- und Bettag"), ], &mut map, - Country::DE_SN, - "Germany (Saxony (Sachsen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2029, 10, 31)?, "Reformationstag"), (NaiveDate::from_ymd_res(2029, 11, 21)?, "Buß- und Bettag"), ], &mut map, - Country::DE_SN, - "Germany (Saxony (Sachsen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2030, 10, 31)?, "Reformationstag"), (NaiveDate::from_ymd_res(2030, 11, 20)?, "Buß- und Bettag"), ], &mut map, - Country::DE_SN, - "Germany (Saxony (Sachsen))", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/de_st.rs b/src/data/de_st.rs index 5409bb9..111b028 100644 --- a/src/data/de_st.rs +++ b/src/data/de_st.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Germany (Saxony-Anhalt (Sachsen-Anhalt))"; +const COUNTY_CODE: Country = Country::DE_ST; + /// Generate holiday map for Germany (Saxony-Anhalt (Sachsen-Anhalt)). #[allow( unused_mut, @@ -9,941 +12,409 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); - build_year( + let mut national_holidays = de::build(years)?; + + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2000, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2000, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_ST, - "Germany (Saxony-Anhalt (Sachsen-Anhalt))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2001, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2001, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_ST, - "Germany (Saxony-Anhalt (Sachsen-Anhalt))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2002, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2002, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_ST, - "Germany (Saxony-Anhalt (Sachsen-Anhalt))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2003, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2003, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_ST, - "Germany (Saxony-Anhalt (Sachsen-Anhalt))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2004, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2004, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_ST, - "Germany (Saxony-Anhalt (Sachsen-Anhalt))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2005, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2005, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_ST, - "Germany (Saxony-Anhalt (Sachsen-Anhalt))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2006, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2006, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_ST, - "Germany (Saxony-Anhalt (Sachsen-Anhalt))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2007, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2007, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_ST, - "Germany (Saxony-Anhalt (Sachsen-Anhalt))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2008, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2008, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_ST, - "Germany (Saxony-Anhalt (Sachsen-Anhalt))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2009, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2009, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_ST, - "Germany (Saxony-Anhalt (Sachsen-Anhalt))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2010, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2010, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_ST, - "Germany (Saxony-Anhalt (Sachsen-Anhalt))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2011, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2011, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_ST, - "Germany (Saxony-Anhalt (Sachsen-Anhalt))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2012, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2012, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_ST, - "Germany (Saxony-Anhalt (Sachsen-Anhalt))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2013, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2013, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_ST, - "Germany (Saxony-Anhalt (Sachsen-Anhalt))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2014, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2014, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_ST, - "Germany (Saxony-Anhalt (Sachsen-Anhalt))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2015, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2015, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_ST, - "Germany (Saxony-Anhalt (Sachsen-Anhalt))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2016, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2016, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_ST, - "Germany (Saxony-Anhalt (Sachsen-Anhalt))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2017, 1, 6)?, "Heilige Drei Könige"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2017, 1, 6)?, "Heilige Drei Könige")], &mut map, - Country::DE_ST, - "Germany (Saxony-Anhalt (Sachsen-Anhalt))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2018, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2018, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_ST, - "Germany (Saxony-Anhalt (Sachsen-Anhalt))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2019, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2019, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_ST, - "Germany (Saxony-Anhalt (Sachsen-Anhalt))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2020, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2020, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_ST, - "Germany (Saxony-Anhalt (Sachsen-Anhalt))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2021, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2021, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_ST, - "Germany (Saxony-Anhalt (Sachsen-Anhalt))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2022, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2022, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_ST, - "Germany (Saxony-Anhalt (Sachsen-Anhalt))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2023, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2023, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_ST, - "Germany (Saxony-Anhalt (Sachsen-Anhalt))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2024, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2024, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_ST, - "Germany (Saxony-Anhalt (Sachsen-Anhalt))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2025, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2025, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_ST, - "Germany (Saxony-Anhalt (Sachsen-Anhalt))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2026, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2026, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_ST, - "Germany (Saxony-Anhalt (Sachsen-Anhalt))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2027, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2027, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_ST, - "Germany (Saxony-Anhalt (Sachsen-Anhalt))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2028, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2028, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_ST, - "Germany (Saxony-Anhalt (Sachsen-Anhalt))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2029, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2029, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_ST, - "Germany (Saxony-Anhalt (Sachsen-Anhalt))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2030, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2030, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_ST, - "Germany (Saxony-Anhalt (Sachsen-Anhalt))", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/de_th.rs b/src/data/de_th.rs index add6b67..b7b1548 100644 --- a/src/data/de_th.rs +++ b/src/data/de_th.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Germany (Thuringia (Thüringen))"; +const COUNTY_CODE: Country = Country::DE_TH; + /// Generate holiday map for Germany (Thuringia (Thüringen)). #[allow( unused_mut, @@ -9,922 +12,355 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); - build_year( + let mut national_holidays = de::build(years)?; + + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2000, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2000, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_TH, - "Germany (Thuringia (Thüringen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2001, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2001, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_TH, - "Germany (Thuringia (Thüringen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2002, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2002, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_TH, - "Germany (Thuringia (Thüringen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2003, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2003, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_TH, - "Germany (Thuringia (Thüringen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2004, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2004, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_TH, - "Germany (Thuringia (Thüringen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2005, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2005, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_TH, - "Germany (Thuringia (Thüringen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2006, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2006, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_TH, - "Germany (Thuringia (Thüringen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2007, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2007, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_TH, - "Germany (Thuringia (Thüringen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2008, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2008, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_TH, - "Germany (Thuringia (Thüringen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2009, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2009, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_TH, - "Germany (Thuringia (Thüringen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2010, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2010, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_TH, - "Germany (Thuringia (Thüringen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2011, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2011, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_TH, - "Germany (Thuringia (Thüringen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2012, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2012, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_TH, - "Germany (Thuringia (Thüringen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2013, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2013, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_TH, - "Germany (Thuringia (Thüringen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2014, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2014, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_TH, - "Germany (Thuringia (Thüringen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2015, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2015, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_TH, - "Germany (Thuringia (Thüringen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2016, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2016, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_TH, - "Germany (Thuringia (Thüringen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::DE_TH, - "Germany (Thuringia (Thüringen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - (NaiveDate::from_ymd_res(2018, 10, 31)?, "Reformationstag"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2018, 10, 31)?, "Reformationstag")], &mut map, - Country::DE_TH, - "Germany (Thuringia (Thüringen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2019, 9, 20)?, "Weltkindertag"), (NaiveDate::from_ymd_res(2019, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_TH, - "Germany (Thuringia (Thüringen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2020, 9, 20)?, "Weltkindertag"), (NaiveDate::from_ymd_res(2020, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_TH, - "Germany (Thuringia (Thüringen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2021, 9, 20)?, "Weltkindertag"), (NaiveDate::from_ymd_res(2021, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_TH, - "Germany (Thuringia (Thüringen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2022, 9, 20)?, "Weltkindertag"), (NaiveDate::from_ymd_res(2022, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_TH, - "Germany (Thuringia (Thüringen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2023, 9, 20)?, "Weltkindertag"), (NaiveDate::from_ymd_res(2023, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_TH, - "Germany (Thuringia (Thüringen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2024, 9, 20)?, "Weltkindertag"), (NaiveDate::from_ymd_res(2024, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_TH, - "Germany (Thuringia (Thüringen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2025, 9, 20)?, "Weltkindertag"), (NaiveDate::from_ymd_res(2025, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_TH, - "Germany (Thuringia (Thüringen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2026, 9, 20)?, "Weltkindertag"), (NaiveDate::from_ymd_res(2026, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_TH, - "Germany (Thuringia (Thüringen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2027, 9, 20)?, "Weltkindertag"), (NaiveDate::from_ymd_res(2027, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_TH, - "Germany (Thuringia (Thüringen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2028, 9, 20)?, "Weltkindertag"), (NaiveDate::from_ymd_res(2028, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_TH, - "Germany (Thuringia (Thüringen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2029, 9, 20)?, "Weltkindertag"), (NaiveDate::from_ymd_res(2029, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_TH, - "Germany (Thuringia (Thüringen))", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2030, 9, 20)?, "Weltkindertag"), (NaiveDate::from_ymd_res(2030, 10, 31)?, "Reformationstag"), ], &mut map, - Country::DE_TH, - "Germany (Thuringia (Thüringen))", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/dj.rs b/src/data/dj.rs index 9469b63..4091bbc 100644 --- a/src/data/dj.rs +++ b/src/data/dj.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Djibouti"; +const COUNTY_CODE: Country = Country::DJ; + /// Generate holiday map for Djibouti. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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"), ( @@ -65,14 +66,14 @@ pub fn build( ), ], &mut map, - Country::DJ, - "Djibouti", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -112,14 +113,14 @@ pub fn build( ), ], &mut map, - Country::DJ, - "Djibouti", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -162,14 +163,14 @@ pub fn build( ), ], &mut map, - Country::DJ, - "Djibouti", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -212,14 +213,14 @@ pub fn build( ), ], &mut map, - Country::DJ, - "Djibouti", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2004, - vec![ + [ (NaiveDate::from_ymd_res(2004, 1, 1)?, "Nouvel an"), ( NaiveDate::from_ymd_res(2004, 5, 1)?, @@ -258,14 +259,14 @@ pub fn build( ), ], &mut map, - Country::DJ, - "Djibouti", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -308,14 +309,14 @@ pub fn build( ), ], &mut map, - Country::DJ, - "Djibouti", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -363,14 +364,14 @@ pub fn build( ), ], &mut map, - Country::DJ, - "Djibouti", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2007, - vec![ + [ ( NaiveDate::from_ymd_res(2007, 1, 1)?, "Eid al-Adha deuxième jour (estimé); Nouvel an", @@ -416,14 +417,14 @@ pub fn build( ), ], &mut map, - Country::DJ, - "Djibouti", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -470,14 +471,14 @@ pub fn build( ), ], &mut map, - Country::DJ, - "Djibouti", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -520,14 +521,14 @@ pub fn build( ), ], &mut map, - Country::DJ, - "Djibouti", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -570,14 +571,14 @@ pub fn build( ), ], &mut map, - Country::DJ, - "Djibouti", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -620,14 +621,14 @@ pub fn build( ), ], &mut map, - Country::DJ, - "Djibouti", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -670,14 +671,14 @@ pub fn build( ), ], &mut map, - Country::DJ, - "Djibouti", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -717,14 +718,14 @@ pub fn build( ), ], &mut map, - Country::DJ, - "Djibouti", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -767,14 +768,14 @@ pub fn build( ), ], &mut map, - Country::DJ, - "Djibouti", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -821,14 +822,14 @@ pub fn build( ), ], &mut map, - Country::DJ, - "Djibouti", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -868,14 +869,14 @@ pub fn build( ), ], &mut map, - Country::DJ, - "Djibouti", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -915,14 +916,14 @@ pub fn build( ), ], &mut map, - Country::DJ, - "Djibouti", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -965,14 +966,14 @@ pub fn build( ), ], &mut map, - Country::DJ, - "Djibouti", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -1012,14 +1013,14 @@ pub fn build( ), ], &mut map, - Country::DJ, - "Djibouti", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -1062,14 +1063,14 @@ pub fn build( ), ], &mut map, - Country::DJ, - "Djibouti", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -1112,14 +1113,14 @@ pub fn build( ), ], &mut map, - Country::DJ, - "Djibouti", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -1156,14 +1157,14 @@ pub fn build( ), ], &mut map, - Country::DJ, - "Djibouti", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -1201,14 +1202,14 @@ pub fn build( ), ], &mut map, - Country::DJ, - "Djibouti", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -1251,14 +1252,14 @@ pub fn build( ), ], &mut map, - Country::DJ, - "Djibouti", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -1298,14 +1299,14 @@ pub fn build( ), ], &mut map, - Country::DJ, - "Djibouti", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -1348,14 +1349,14 @@ pub fn build( ), ], &mut map, - Country::DJ, - "Djibouti", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -1398,14 +1399,14 @@ pub fn build( ), ], &mut map, - Country::DJ, - "Djibouti", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -1445,14 +1446,14 @@ pub fn build( ), ], &mut map, - Country::DJ, - "Djibouti", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -1495,14 +1496,14 @@ pub fn build( ), ], &mut map, - Country::DJ, - "Djibouti", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -1542,8 +1543,8 @@ pub fn build( ), ], &mut map, - Country::DJ, - "Djibouti", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/dk.rs b/src/data/dk.rs index ac88e7d..9886bb0 100644 --- a/src/data/dk.rs +++ b/src/data/dk.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Denmark"; +const COUNTY_CODE: Country = Country::DK; + /// Generate holiday map for Denmark. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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"), @@ -34,14 +35,14 @@ pub fn build( (NaiveDate::from_ymd_res(2000, 12, 26)?, "Anden juledag"), ], &mut map, - Country::DK, - "Denmark", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -58,14 +59,14 @@ pub fn build( (NaiveDate::from_ymd_res(2001, 12, 26)?, "Anden juledag"), ], &mut map, - Country::DK, - "Denmark", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -82,14 +83,14 @@ pub fn build( (NaiveDate::from_ymd_res(2002, 12, 26)?, "Anden juledag"), ], &mut map, - Country::DK, - "Denmark", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -106,14 +107,14 @@ pub fn build( (NaiveDate::from_ymd_res(2003, 12, 26)?, "Anden juledag"), ], &mut map, - Country::DK, - "Denmark", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -130,14 +131,14 @@ pub fn build( (NaiveDate::from_ymd_res(2004, 12, 26)?, "Anden juledag"), ], &mut map, - Country::DK, - "Denmark", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -154,14 +155,14 @@ pub fn build( (NaiveDate::from_ymd_res(2005, 12, 26)?, "Anden juledag"), ], &mut map, - Country::DK, - "Denmark", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -178,14 +179,14 @@ pub fn build( (NaiveDate::from_ymd_res(2006, 12, 26)?, "Anden juledag"), ], &mut map, - Country::DK, - "Denmark", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -202,14 +203,14 @@ pub fn build( (NaiveDate::from_ymd_res(2007, 12, 26)?, "Anden juledag"), ], &mut map, - Country::DK, - "Denmark", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -226,14 +227,14 @@ pub fn build( (NaiveDate::from_ymd_res(2008, 12, 26)?, "Anden juledag"), ], &mut map, - Country::DK, - "Denmark", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -250,14 +251,14 @@ pub fn build( (NaiveDate::from_ymd_res(2009, 12, 26)?, "Anden juledag"), ], &mut map, - Country::DK, - "Denmark", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -274,14 +275,14 @@ pub fn build( (NaiveDate::from_ymd_res(2010, 12, 26)?, "Anden juledag"), ], &mut map, - Country::DK, - "Denmark", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -298,14 +299,14 @@ pub fn build( (NaiveDate::from_ymd_res(2011, 12, 26)?, "Anden juledag"), ], &mut map, - Country::DK, - "Denmark", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -322,14 +323,14 @@ pub fn build( (NaiveDate::from_ymd_res(2012, 12, 26)?, "Anden juledag"), ], &mut map, - Country::DK, - "Denmark", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -346,14 +347,14 @@ pub fn build( (NaiveDate::from_ymd_res(2013, 12, 26)?, "Anden juledag"), ], &mut map, - Country::DK, - "Denmark", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -370,14 +371,14 @@ pub fn build( (NaiveDate::from_ymd_res(2014, 12, 26)?, "Anden juledag"), ], &mut map, - Country::DK, - "Denmark", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -394,14 +395,14 @@ pub fn build( (NaiveDate::from_ymd_res(2015, 12, 26)?, "Anden juledag"), ], &mut map, - Country::DK, - "Denmark", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -418,14 +419,14 @@ pub fn build( (NaiveDate::from_ymd_res(2016, 12, 26)?, "Anden juledag"), ], &mut map, - Country::DK, - "Denmark", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -442,14 +443,14 @@ pub fn build( (NaiveDate::from_ymd_res(2017, 12, 26)?, "Anden juledag"), ], &mut map, - Country::DK, - "Denmark", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -466,14 +467,14 @@ pub fn build( (NaiveDate::from_ymd_res(2018, 12, 26)?, "Anden juledag"), ], &mut map, - Country::DK, - "Denmark", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -490,14 +491,14 @@ pub fn build( (NaiveDate::from_ymd_res(2019, 12, 26)?, "Anden juledag"), ], &mut map, - Country::DK, - "Denmark", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -514,14 +515,14 @@ pub fn build( (NaiveDate::from_ymd_res(2020, 12, 26)?, "Anden juledag"), ], &mut map, - Country::DK, - "Denmark", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -538,14 +539,14 @@ pub fn build( (NaiveDate::from_ymd_res(2021, 12, 26)?, "Anden juledag"), ], &mut map, - Country::DK, - "Denmark", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -562,14 +563,14 @@ pub fn build( (NaiveDate::from_ymd_res(2022, 12, 26)?, "Anden juledag"), ], &mut map, - Country::DK, - "Denmark", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -586,14 +587,14 @@ pub fn build( (NaiveDate::from_ymd_res(2023, 12, 26)?, "Anden juledag"), ], &mut map, - Country::DK, - "Denmark", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -609,14 +610,14 @@ pub fn build( (NaiveDate::from_ymd_res(2024, 12, 26)?, "Anden juledag"), ], &mut map, - Country::DK, - "Denmark", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -632,14 +633,14 @@ pub fn build( (NaiveDate::from_ymd_res(2025, 12, 26)?, "Anden juledag"), ], &mut map, - Country::DK, - "Denmark", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -655,14 +656,14 @@ pub fn build( (NaiveDate::from_ymd_res(2026, 12, 26)?, "Anden juledag"), ], &mut map, - Country::DK, - "Denmark", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -678,14 +679,14 @@ pub fn build( (NaiveDate::from_ymd_res(2027, 12, 26)?, "Anden juledag"), ], &mut map, - Country::DK, - "Denmark", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -701,14 +702,14 @@ pub fn build( (NaiveDate::from_ymd_res(2028, 12, 26)?, "Anden juledag"), ], &mut map, - Country::DK, - "Denmark", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -724,14 +725,14 @@ pub fn build( (NaiveDate::from_ymd_res(2029, 12, 26)?, "Anden juledag"), ], &mut map, - Country::DK, - "Denmark", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -747,8 +748,8 @@ pub fn build( (NaiveDate::from_ymd_res(2030, 12, 26)?, "Anden juledag"), ], &mut map, - Country::DK, - "Denmark", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/do.rs b/src/data/do.rs index 4391219..ea174c3 100644 --- a/src/data/do.rs +++ b/src/data/do.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Dominican Republic"; +const COUNTY_CODE: Country = Country::DO; + /// Generate holiday map for Dominican Republic. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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)?, @@ -47,14 +48,14 @@ pub fn build( (NaiveDate::from_ymd_res(2000, 12, 25)?, "Día de Navidad"), ], &mut map, - Country::DO, - "Dominican Republic", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2001, - vec![ + [ (NaiveDate::from_ymd_res(2001, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2001, 1, 6)?, @@ -84,14 +85,14 @@ pub fn build( (NaiveDate::from_ymd_res(2001, 12, 25)?, "Día de Navidad"), ], &mut map, - Country::DO, - "Dominican Republic", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2002, - vec![ + [ (NaiveDate::from_ymd_res(2002, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2002, 1, 6)?, @@ -121,14 +122,14 @@ pub fn build( (NaiveDate::from_ymd_res(2002, 12, 25)?, "Día de Navidad"), ], &mut map, - Country::DO, - "Dominican Republic", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2003, - vec![ + [ (NaiveDate::from_ymd_res(2003, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2003, 1, 6)?, @@ -158,14 +159,14 @@ pub fn build( (NaiveDate::from_ymd_res(2003, 12, 25)?, "Día de Navidad"), ], &mut map, - Country::DO, - "Dominican Republic", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2004, - vec![ + [ (NaiveDate::from_ymd_res(2004, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2004, 1, 5)?, @@ -195,14 +196,14 @@ pub fn build( (NaiveDate::from_ymd_res(2004, 12, 25)?, "Día de Navidad"), ], &mut map, - Country::DO, - "Dominican Republic", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2005, - vec![ + [ (NaiveDate::from_ymd_res(2005, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2005, 1, 10)?, @@ -232,14 +233,14 @@ pub fn build( (NaiveDate::from_ymd_res(2005, 12, 25)?, "Día de Navidad"), ], &mut map, - Country::DO, - "Dominican Republic", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2006, - vec![ + [ (NaiveDate::from_ymd_res(2006, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2006, 1, 9)?, @@ -269,14 +270,14 @@ pub fn build( (NaiveDate::from_ymd_res(2006, 12, 25)?, "Día de Navidad"), ], &mut map, - Country::DO, - "Dominican Republic", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2007, - vec![ + [ (NaiveDate::from_ymd_res(2007, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2007, 1, 6)?, @@ -306,14 +307,14 @@ pub fn build( (NaiveDate::from_ymd_res(2007, 12, 25)?, "Día de Navidad"), ], &mut map, - Country::DO, - "Dominican Republic", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2008, - vec![ + [ (NaiveDate::from_ymd_res(2008, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2008, 1, 6)?, @@ -343,14 +344,14 @@ pub fn build( (NaiveDate::from_ymd_res(2008, 12, 25)?, "Día de Navidad"), ], &mut map, - Country::DO, - "Dominican Republic", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2009, - vec![ + [ (NaiveDate::from_ymd_res(2009, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2009, 1, 5)?, @@ -380,14 +381,14 @@ pub fn build( (NaiveDate::from_ymd_res(2009, 12, 25)?, "Día de Navidad"), ], &mut map, - Country::DO, - "Dominican Republic", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2010, - vec![ + [ (NaiveDate::from_ymd_res(2010, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2010, 1, 4)?, @@ -417,14 +418,14 @@ pub fn build( (NaiveDate::from_ymd_res(2010, 12, 25)?, "Día de Navidad"), ], &mut map, - Country::DO, - "Dominican Republic", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2011, - vec![ + [ (NaiveDate::from_ymd_res(2011, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2011, 1, 10)?, @@ -454,14 +455,14 @@ pub fn build( (NaiveDate::from_ymd_res(2011, 12, 25)?, "Día de Navidad"), ], &mut map, - Country::DO, - "Dominican Republic", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2012, - vec![ + [ (NaiveDate::from_ymd_res(2012, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2012, 1, 9)?, @@ -491,14 +492,14 @@ pub fn build( (NaiveDate::from_ymd_res(2012, 12, 25)?, "Día de Navidad"), ], &mut map, - Country::DO, - "Dominican Republic", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2013, - vec![ + [ (NaiveDate::from_ymd_res(2013, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2013, 1, 6)?, @@ -528,14 +529,14 @@ pub fn build( (NaiveDate::from_ymd_res(2013, 12, 25)?, "Día de Navidad"), ], &mut map, - Country::DO, - "Dominican Republic", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2014, - vec![ + [ (NaiveDate::from_ymd_res(2014, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2014, 1, 6)?, @@ -565,14 +566,14 @@ pub fn build( (NaiveDate::from_ymd_res(2014, 12, 25)?, "Día de Navidad"), ], &mut map, - Country::DO, - "Dominican Republic", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2015, - vec![ + [ (NaiveDate::from_ymd_res(2015, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2015, 1, 5)?, @@ -602,14 +603,14 @@ pub fn build( (NaiveDate::from_ymd_res(2015, 12, 25)?, "Día de Navidad"), ], &mut map, - Country::DO, - "Dominican Republic", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2016, - vec![ + [ (NaiveDate::from_ymd_res(2016, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2016, 1, 4)?, @@ -639,14 +640,14 @@ pub fn build( (NaiveDate::from_ymd_res(2016, 12, 25)?, "Día de Navidad"), ], &mut map, - Country::DO, - "Dominican Republic", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2017, - vec![ + [ (NaiveDate::from_ymd_res(2017, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2017, 1, 9)?, @@ -676,14 +677,14 @@ pub fn build( (NaiveDate::from_ymd_res(2017, 12, 25)?, "Día de Navidad"), ], &mut map, - Country::DO, - "Dominican Republic", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2018, - vec![ + [ (NaiveDate::from_ymd_res(2018, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2018, 1, 6)?, @@ -713,14 +714,14 @@ pub fn build( (NaiveDate::from_ymd_res(2018, 12, 25)?, "Día de Navidad"), ], &mut map, - Country::DO, - "Dominican Republic", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2019, - vec![ + [ (NaiveDate::from_ymd_res(2019, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2019, 1, 6)?, @@ -750,14 +751,14 @@ pub fn build( (NaiveDate::from_ymd_res(2019, 12, 25)?, "Día de Navidad"), ], &mut map, - Country::DO, - "Dominican Republic", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2020, - vec![ + [ (NaiveDate::from_ymd_res(2020, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2020, 1, 6)?, @@ -787,14 +788,14 @@ pub fn build( (NaiveDate::from_ymd_res(2020, 12, 25)?, "Día de Navidad"), ], &mut map, - Country::DO, - "Dominican Republic", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2021, - vec![ + [ (NaiveDate::from_ymd_res(2021, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2021, 1, 4)?, @@ -824,14 +825,14 @@ pub fn build( (NaiveDate::from_ymd_res(2021, 12, 25)?, "Día de Navidad"), ], &mut map, - Country::DO, - "Dominican Republic", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2022, - vec![ + [ (NaiveDate::from_ymd_res(2022, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2022, 1, 10)?, @@ -861,14 +862,14 @@ pub fn build( (NaiveDate::from_ymd_res(2022, 12, 25)?, "Día de Navidad"), ], &mut map, - Country::DO, - "Dominican Republic", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2023, - vec![ + [ (NaiveDate::from_ymd_res(2023, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2023, 1, 9)?, @@ -898,14 +899,14 @@ pub fn build( (NaiveDate::from_ymd_res(2023, 12, 25)?, "Día de Navidad"), ], &mut map, - Country::DO, - "Dominican Republic", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2024, - vec![ + [ (NaiveDate::from_ymd_res(2024, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2024, 1, 6)?, @@ -935,14 +936,14 @@ pub fn build( (NaiveDate::from_ymd_res(2024, 12, 25)?, "Día de Navidad"), ], &mut map, - Country::DO, - "Dominican Republic", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2025, - vec![ + [ (NaiveDate::from_ymd_res(2025, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2025, 1, 6)?, @@ -972,14 +973,14 @@ pub fn build( (NaiveDate::from_ymd_res(2025, 12, 25)?, "Día de Navidad"), ], &mut map, - Country::DO, - "Dominican Republic", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2026, - vec![ + [ (NaiveDate::from_ymd_res(2026, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2026, 1, 5)?, @@ -1009,14 +1010,14 @@ pub fn build( (NaiveDate::from_ymd_res(2026, 12, 25)?, "Día de Navidad"), ], &mut map, - Country::DO, - "Dominican Republic", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2027, - vec![ + [ (NaiveDate::from_ymd_res(2027, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2027, 1, 4)?, @@ -1046,14 +1047,14 @@ pub fn build( (NaiveDate::from_ymd_res(2027, 12, 25)?, "Día de Navidad"), ], &mut map, - Country::DO, - "Dominican Republic", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2028, - vec![ + [ (NaiveDate::from_ymd_res(2028, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2028, 1, 10)?, @@ -1083,14 +1084,14 @@ pub fn build( (NaiveDate::from_ymd_res(2028, 12, 25)?, "Día de Navidad"), ], &mut map, - Country::DO, - "Dominican Republic", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2029, - vec![ + [ (NaiveDate::from_ymd_res(2029, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2029, 1, 6)?, @@ -1120,14 +1121,14 @@ pub fn build( (NaiveDate::from_ymd_res(2029, 12, 25)?, "Día de Navidad"), ], &mut map, - Country::DO, - "Dominican Republic", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2030, - vec![ + [ (NaiveDate::from_ymd_res(2030, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2030, 1, 6)?, @@ -1157,8 +1158,8 @@ pub fn build( (NaiveDate::from_ymd_res(2030, 12, 25)?, "Día de Navidad"), ], &mut map, - Country::DO, - "Dominican Republic", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/ee.rs b/src/data/ee.rs index 238819b..cabb404 100644 --- a/src/data/ee.rs +++ b/src/data/ee.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Estonia"; +const COUNTY_CODE: Country = Country::EE; + /// Generate holiday map for Estonia. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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"), @@ -37,14 +38,14 @@ pub fn build( (NaiveDate::from_ymd_res(2000, 12, 26)?, "teine jõulupüha"), ], &mut map, - Country::EE, - "Estonia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -64,14 +65,14 @@ pub fn build( (NaiveDate::from_ymd_res(2001, 12, 26)?, "teine jõulupüha"), ], &mut map, - Country::EE, - "Estonia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -91,14 +92,14 @@ pub fn build( (NaiveDate::from_ymd_res(2002, 12, 26)?, "teine jõulupüha"), ], &mut map, - Country::EE, - "Estonia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -118,14 +119,14 @@ pub fn build( (NaiveDate::from_ymd_res(2003, 12, 26)?, "teine jõulupüha"), ], &mut map, - Country::EE, - "Estonia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -145,14 +146,14 @@ pub fn build( (NaiveDate::from_ymd_res(2004, 12, 26)?, "teine jõulupüha"), ], &mut map, - Country::EE, - "Estonia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -173,14 +174,14 @@ pub fn build( (NaiveDate::from_ymd_res(2005, 12, 26)?, "teine jõulupüha"), ], &mut map, - Country::EE, - "Estonia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -201,14 +202,14 @@ pub fn build( (NaiveDate::from_ymd_res(2006, 12, 26)?, "teine jõulupüha"), ], &mut map, - Country::EE, - "Estonia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -229,14 +230,14 @@ pub fn build( (NaiveDate::from_ymd_res(2007, 12, 26)?, "teine jõulupüha"), ], &mut map, - Country::EE, - "Estonia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -257,14 +258,14 @@ pub fn build( (NaiveDate::from_ymd_res(2008, 12, 26)?, "teine jõulupüha"), ], &mut map, - Country::EE, - "Estonia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -285,14 +286,14 @@ pub fn build( (NaiveDate::from_ymd_res(2009, 12, 26)?, "teine jõulupüha"), ], &mut map, - Country::EE, - "Estonia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -313,14 +314,14 @@ pub fn build( (NaiveDate::from_ymd_res(2010, 12, 26)?, "teine jõulupüha"), ], &mut map, - Country::EE, - "Estonia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -341,14 +342,14 @@ pub fn build( (NaiveDate::from_ymd_res(2011, 12, 26)?, "teine jõulupüha"), ], &mut map, - Country::EE, - "Estonia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -369,14 +370,14 @@ pub fn build( (NaiveDate::from_ymd_res(2012, 12, 26)?, "teine jõulupüha"), ], &mut map, - Country::EE, - "Estonia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -397,14 +398,14 @@ pub fn build( (NaiveDate::from_ymd_res(2013, 12, 26)?, "teine jõulupüha"), ], &mut map, - Country::EE, - "Estonia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -425,14 +426,14 @@ pub fn build( (NaiveDate::from_ymd_res(2014, 12, 26)?, "teine jõulupüha"), ], &mut map, - Country::EE, - "Estonia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -453,14 +454,14 @@ pub fn build( (NaiveDate::from_ymd_res(2015, 12, 26)?, "teine jõulupüha"), ], &mut map, - Country::EE, - "Estonia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -481,14 +482,14 @@ pub fn build( (NaiveDate::from_ymd_res(2016, 12, 26)?, "teine jõulupüha"), ], &mut map, - Country::EE, - "Estonia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -509,14 +510,14 @@ pub fn build( (NaiveDate::from_ymd_res(2017, 12, 26)?, "teine jõulupüha"), ], &mut map, - Country::EE, - "Estonia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -537,14 +538,14 @@ pub fn build( (NaiveDate::from_ymd_res(2018, 12, 26)?, "teine jõulupüha"), ], &mut map, - Country::EE, - "Estonia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -565,14 +566,14 @@ pub fn build( (NaiveDate::from_ymd_res(2019, 12, 26)?, "teine jõulupüha"), ], &mut map, - Country::EE, - "Estonia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -593,14 +594,14 @@ pub fn build( (NaiveDate::from_ymd_res(2020, 12, 26)?, "teine jõulupüha"), ], &mut map, - Country::EE, - "Estonia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -621,14 +622,14 @@ pub fn build( (NaiveDate::from_ymd_res(2021, 12, 26)?, "teine jõulupüha"), ], &mut map, - Country::EE, - "Estonia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -649,14 +650,14 @@ pub fn build( (NaiveDate::from_ymd_res(2022, 12, 26)?, "teine jõulupüha"), ], &mut map, - Country::EE, - "Estonia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -677,14 +678,14 @@ pub fn build( (NaiveDate::from_ymd_res(2023, 12, 26)?, "teine jõulupüha"), ], &mut map, - Country::EE, - "Estonia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -705,14 +706,14 @@ pub fn build( (NaiveDate::from_ymd_res(2024, 12, 26)?, "teine jõulupüha"), ], &mut map, - Country::EE, - "Estonia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -733,14 +734,14 @@ pub fn build( (NaiveDate::from_ymd_res(2025, 12, 26)?, "teine jõulupüha"), ], &mut map, - Country::EE, - "Estonia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -761,14 +762,14 @@ pub fn build( (NaiveDate::from_ymd_res(2026, 12, 26)?, "teine jõulupüha"), ], &mut map, - Country::EE, - "Estonia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -789,14 +790,14 @@ pub fn build( (NaiveDate::from_ymd_res(2027, 12, 26)?, "teine jõulupüha"), ], &mut map, - Country::EE, - "Estonia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -817,14 +818,14 @@ pub fn build( (NaiveDate::from_ymd_res(2028, 12, 26)?, "teine jõulupüha"), ], &mut map, - Country::EE, - "Estonia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -845,14 +846,14 @@ pub fn build( (NaiveDate::from_ymd_res(2029, 12, 26)?, "teine jõulupüha"), ], &mut map, - Country::EE, - "Estonia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -873,8 +874,8 @@ pub fn build( (NaiveDate::from_ymd_res(2030, 12, 26)?, "teine jõulupüha"), ], &mut map, - Country::EE, - "Estonia", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/eg.rs b/src/data/eg.rs index 0000676..9b24ceb 100644 --- a/src/data/eg.rs +++ b/src/data/eg.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Egypt"; +const COUNTY_CODE: Country = Country::EG; + /// Generate holiday map for Egypt. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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)?, @@ -69,14 +70,14 @@ pub fn build( ), ], &mut map, - Country::EG, - "Egypt", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2001, - vec![ + [ (NaiveDate::from_ymd_res(2001, 1, 1)?, "رأس السنة الميلادية"), ( NaiveDate::from_ymd_res(2001, 1, 7)?, @@ -117,14 +118,14 @@ pub fn build( ), ], &mut map, - Country::EG, - "Egypt", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2002, - vec![ + [ (NaiveDate::from_ymd_res(2002, 1, 1)?, "رأس السنة الميلادية"), ( NaiveDate::from_ymd_res(2002, 1, 7)?, @@ -165,14 +166,14 @@ pub fn build( ), ], &mut map, - Country::EG, - "Egypt", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2003, - vec![ + [ (NaiveDate::from_ymd_res(2003, 1, 1)?, "رأس السنة الميلادية"), ( NaiveDate::from_ymd_res(2003, 1, 7)?, @@ -213,14 +214,14 @@ pub fn build( ), ], &mut map, - Country::EG, - "Egypt", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2004, - vec![ + [ (NaiveDate::from_ymd_res(2004, 1, 1)?, "رأس السنة الميلادية"), ( NaiveDate::from_ymd_res(2004, 1, 7)?, @@ -260,14 +261,14 @@ pub fn build( ), ], &mut map, - Country::EG, - "Egypt", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2005, - vec![ + [ (NaiveDate::from_ymd_res(2005, 1, 1)?, "رأس السنة الميلادية"), ( NaiveDate::from_ymd_res(2005, 1, 7)?, @@ -310,14 +311,14 @@ pub fn build( ), ], &mut map, - Country::EG, - "Egypt", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2006, - vec![ + [ (NaiveDate::from_ymd_res(2006, 1, 1)?, "رأس السنة الميلادية"), ( NaiveDate::from_ymd_res(2006, 1, 7)?, @@ -360,14 +361,14 @@ pub fn build( ), ], &mut map, - Country::EG, - "Egypt", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2007, - vec![ + [ ( NaiveDate::from_ymd_res(2007, 1, 1)?, "(تقدير) عطلة عيد الأضحى; رأس السنة الميلادية", @@ -415,14 +416,14 @@ pub fn build( ), ], &mut map, - Country::EG, - "Egypt", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2008, - vec![ + [ (NaiveDate::from_ymd_res(2008, 1, 1)?, "رأس السنة الميلادية"), ( NaiveDate::from_ymd_res(2008, 1, 7)?, @@ -467,14 +468,14 @@ pub fn build( ), ], &mut map, - Country::EG, - "Egypt", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2009, - vec![ + [ (NaiveDate::from_ymd_res(2009, 1, 1)?, "رأس السنة الميلادية"), ( NaiveDate::from_ymd_res(2009, 1, 7)?, @@ -516,14 +517,14 @@ pub fn build( ), ], &mut map, - Country::EG, - "Egypt", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2010, - vec![ + [ (NaiveDate::from_ymd_res(2010, 1, 1)?, "رأس السنة الميلادية"), ( NaiveDate::from_ymd_res(2010, 1, 7)?, @@ -565,14 +566,14 @@ pub fn build( ), ], &mut map, - Country::EG, - "Egypt", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2011, - vec![ + [ (NaiveDate::from_ymd_res(2011, 1, 1)?, "رأس السنة الميلادية"), ( NaiveDate::from_ymd_res(2011, 1, 7)?, @@ -616,14 +617,14 @@ pub fn build( ), ], &mut map, - Country::EG, - "Egypt", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2012, - vec![ + [ (NaiveDate::from_ymd_res(2012, 1, 1)?, "رأس السنة الميلادية"), ( NaiveDate::from_ymd_res(2012, 1, 7)?, @@ -665,14 +666,14 @@ pub fn build( ), ], &mut map, - Country::EG, - "Egypt", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2013, - vec![ + [ (NaiveDate::from_ymd_res(2013, 1, 1)?, "رأس السنة الميلادية"), ( NaiveDate::from_ymd_res(2013, 1, 7)?, @@ -714,14 +715,14 @@ pub fn build( ), ], &mut map, - Country::EG, - "Egypt", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2014, - vec![ + [ (NaiveDate::from_ymd_res(2014, 1, 1)?, "رأس السنة الميلادية"), ( NaiveDate::from_ymd_res(2014, 1, 7)?, @@ -763,14 +764,14 @@ pub fn build( ), ], &mut map, - Country::EG, - "Egypt", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2015, - vec![ + [ (NaiveDate::from_ymd_res(2015, 1, 1)?, "رأس السنة الميلادية"), ( NaiveDate::from_ymd_res(2015, 1, 7)?, @@ -817,14 +818,14 @@ pub fn build( ), ], &mut map, - Country::EG, - "Egypt", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2016, - vec![ + [ (NaiveDate::from_ymd_res(2016, 1, 1)?, "رأس السنة الميلادية"), ( NaiveDate::from_ymd_res(2016, 1, 7)?, @@ -869,14 +870,14 @@ pub fn build( ), ], &mut map, - Country::EG, - "Egypt", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2017, - vec![ + [ (NaiveDate::from_ymd_res(2017, 1, 1)?, "رأس السنة الميلادية"), ( NaiveDate::from_ymd_res(2017, 1, 7)?, @@ -919,14 +920,14 @@ pub fn build( ), ], &mut map, - Country::EG, - "Egypt", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2018, - vec![ + [ (NaiveDate::from_ymd_res(2018, 1, 1)?, "رأس السنة الميلادية"), ( NaiveDate::from_ymd_res(2018, 1, 7)?, @@ -969,14 +970,14 @@ pub fn build( ), ], &mut map, - Country::EG, - "Egypt", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2019, - vec![ + [ (NaiveDate::from_ymd_res(2019, 1, 1)?, "رأس السنة الميلادية"), ( NaiveDate::from_ymd_res(2019, 1, 7)?, @@ -1019,14 +1020,14 @@ pub fn build( ), ], &mut map, - Country::EG, - "Egypt", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2020, - vec![ + [ (NaiveDate::from_ymd_res(2020, 1, 1)?, "رأس السنة الميلادية"), ( NaiveDate::from_ymd_res(2020, 1, 7)?, @@ -1069,14 +1070,14 @@ pub fn build( ), ], &mut map, - Country::EG, - "Egypt", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2021, - vec![ + [ (NaiveDate::from_ymd_res(2021, 1, 1)?, "رأس السنة الميلادية"), ( NaiveDate::from_ymd_res(2021, 1, 7)?, @@ -1119,14 +1120,14 @@ pub fn build( ), ], &mut map, - Country::EG, - "Egypt", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2022, - vec![ + [ (NaiveDate::from_ymd_res(2022, 1, 1)?, "رأس السنة الميلادية"), ( NaiveDate::from_ymd_res(2022, 1, 7)?, @@ -1171,14 +1172,14 @@ pub fn build( ), ], &mut map, - Country::EG, - "Egypt", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2023, - vec![ + [ (NaiveDate::from_ymd_res(2023, 1, 1)?, "رأس السنة الميلادية"), ( NaiveDate::from_ymd_res(2023, 1, 7)?, @@ -1220,14 +1221,14 @@ pub fn build( ), ], &mut map, - Country::EG, - "Egypt", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2024, - vec![ + [ (NaiveDate::from_ymd_res(2024, 1, 1)?, "رأس السنة الميلادية"), ( NaiveDate::from_ymd_res(2024, 1, 7)?, @@ -1270,14 +1271,14 @@ pub fn build( ), ], &mut map, - Country::EG, - "Egypt", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2025, - vec![ + [ (NaiveDate::from_ymd_res(2025, 1, 1)?, "رأس السنة الميلادية"), ( NaiveDate::from_ymd_res(2025, 1, 7)?, @@ -1320,14 +1321,14 @@ pub fn build( ), ], &mut map, - Country::EG, - "Egypt", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2026, - vec![ + [ (NaiveDate::from_ymd_res(2026, 1, 1)?, "رأس السنة الميلادية"), ( NaiveDate::from_ymd_res(2026, 1, 7)?, @@ -1370,14 +1371,14 @@ pub fn build( ), ], &mut map, - Country::EG, - "Egypt", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2027, - vec![ + [ (NaiveDate::from_ymd_res(2027, 1, 1)?, "رأس السنة الميلادية"), ( NaiveDate::from_ymd_res(2027, 1, 7)?, @@ -1420,14 +1421,14 @@ pub fn build( ), ], &mut map, - Country::EG, - "Egypt", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2028, - vec![ + [ (NaiveDate::from_ymd_res(2028, 1, 1)?, "رأس السنة الميلادية"), ( NaiveDate::from_ymd_res(2028, 1, 7)?, @@ -1470,14 +1471,14 @@ pub fn build( ), ], &mut map, - Country::EG, - "Egypt", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2029, - vec![ + [ (NaiveDate::from_ymd_res(2029, 1, 1)?, "رأس السنة الميلادية"), ( NaiveDate::from_ymd_res(2029, 1, 7)?, @@ -1519,14 +1520,14 @@ pub fn build( ), ], &mut map, - Country::EG, - "Egypt", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2030, - vec![ + [ (NaiveDate::from_ymd_res(2030, 1, 1)?, "رأس السنة الميلادية"), ( NaiveDate::from_ymd_res(2030, 1, 7)?, @@ -1569,8 +1570,8 @@ pub fn build( ), ], &mut map, - Country::EG, - "Egypt", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/es.rs b/src/data/es.rs index 0d00919..8358d8e 100644 --- a/src/data/es.rs +++ b/src/data/es.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Spain"; +const COUNTY_CODE: Country = Country::ES; + /// Generate holiday map for Spain. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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"), @@ -45,14 +46,14 @@ pub fn build( ), ], &mut map, - Country::ES, - "Spain", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -80,14 +81,14 @@ pub fn build( ), ], &mut map, - Country::ES, - "Spain", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -115,14 +116,14 @@ pub fn build( ), ], &mut map, - Country::ES, - "Spain", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -150,14 +151,14 @@ pub fn build( ), ], &mut map, - Country::ES, - "Spain", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -185,14 +186,14 @@ pub fn build( ), ], &mut map, - Country::ES, - "Spain", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -220,14 +221,14 @@ pub fn build( ), ], &mut map, - Country::ES, - "Spain", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -255,14 +256,14 @@ pub fn build( ), ], &mut map, - Country::ES, - "Spain", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -290,14 +291,14 @@ pub fn build( ), ], &mut map, - Country::ES, - "Spain", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -325,14 +326,14 @@ pub fn build( ), ], &mut map, - Country::ES, - "Spain", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -360,14 +361,14 @@ pub fn build( ), ], &mut map, - Country::ES, - "Spain", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -391,14 +392,14 @@ pub fn build( ), ], &mut map, - Country::ES, - "Spain", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -421,14 +422,14 @@ pub fn build( ), ], &mut map, - Country::ES, - "Spain", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -455,14 +456,14 @@ pub fn build( ), ], &mut map, - Country::ES, - "Spain", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -485,14 +486,14 @@ pub fn build( ), ], &mut map, - Country::ES, - "Spain", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -516,14 +517,14 @@ pub fn build( ), ], &mut map, - Country::ES, - "Spain", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -546,14 +547,14 @@ pub fn build( ), ], &mut map, - Country::ES, - "Spain", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -576,14 +577,14 @@ pub fn build( ), ], &mut map, - Country::ES, - "Spain", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -610,14 +611,14 @@ pub fn build( ), ], &mut map, - Country::ES, - "Spain", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -645,14 +646,14 @@ pub fn build( ), ], &mut map, - Country::ES, - "Spain", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -675,14 +676,14 @@ pub fn build( ), ], &mut map, - Country::ES, - "Spain", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -705,14 +706,14 @@ pub fn build( ), ], &mut map, - Country::ES, - "Spain", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -736,14 +737,14 @@ pub fn build( ), ], &mut map, - Country::ES, - "Spain", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -766,14 +767,14 @@ pub fn build( ), ], &mut map, - Country::ES, - "Spain", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -800,14 +801,14 @@ pub fn build( ), ], &mut map, - Country::ES, - "Spain", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -831,14 +832,14 @@ pub fn build( ), ], &mut map, - Country::ES, - "Spain", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -866,14 +867,14 @@ pub fn build( ), ], &mut map, - Country::ES, - "Spain", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -901,14 +902,14 @@ pub fn build( ), ], &mut map, - Country::ES, - "Spain", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -936,14 +937,14 @@ pub fn build( ), ], &mut map, - Country::ES, - "Spain", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -971,14 +972,14 @@ pub fn build( ), ], &mut map, - Country::ES, - "Spain", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1006,14 +1007,14 @@ pub fn build( ), ], &mut map, - Country::ES, - "Spain", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1041,8 +1042,8 @@ pub fn build( ), ], &mut map, - Country::ES, - "Spain", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/et.rs b/src/data/et.rs index ab2f9df..199bb82 100644 --- a/src/data/et.rs +++ b/src/data/et.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Ethiopia"; +const COUNTY_CODE: Country = Country::ET; + /// Generate holiday map for Ethiopia. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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)?, "አድዋ"), @@ -34,14 +35,14 @@ pub fn build( (NaiveDate::from_ymd_res(2000, 6, 14)?, "መውሊድ (ግምት)"), ], &mut map, - Country::ET, - "Ethiopia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "አድዋ"), @@ -57,14 +58,14 @@ pub fn build( (NaiveDate::from_ymd_res(2001, 6, 4)?, "መውሊድ (ግምት)"), ], &mut map, - Country::ET, - "Ethiopia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "አድዋ"), @@ -79,14 +80,14 @@ pub fn build( (NaiveDate::from_ymd_res(2002, 5, 24)?, "መውሊድ (ግምት)"), ], &mut map, - Country::ET, - "Ethiopia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "አድዋ"), @@ -102,14 +103,14 @@ pub fn build( (NaiveDate::from_ymd_res(2003, 5, 13)?, "መውሊድ (ግምት)"), ], &mut map, - Country::ET, - "Ethiopia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "አድዋ"), @@ -127,14 +128,14 @@ pub fn build( (NaiveDate::from_ymd_res(2004, 2, 1)?, "አረፋ (ግምት)"), ], &mut map, - Country::ET, - "Ethiopia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "አድዋ"), @@ -149,14 +150,14 @@ pub fn build( (NaiveDate::from_ymd_res(2005, 4, 21)?, "መውሊድ (ግምት)"), ], &mut map, - Country::ET, - "Ethiopia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "አድዋ"), @@ -173,14 +174,14 @@ pub fn build( (NaiveDate::from_ymd_res(2006, 4, 10)?, "መውሊድ (ግምት)"), ], &mut map, - Country::ET, - "Ethiopia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "አድዋ"), @@ -196,14 +197,14 @@ pub fn build( (NaiveDate::from_ymd_res(2007, 3, 31)?, "መውሊድ (ግምት)"), ], &mut map, - Country::ET, - "Ethiopia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "አድዋ"), @@ -219,14 +220,14 @@ pub fn build( (NaiveDate::from_ymd_res(2008, 3, 20)?, "መውሊድ (ግምት)"), ], &mut map, - Country::ET, - "Ethiopia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "አድዋ"), @@ -242,14 +243,14 @@ pub fn build( (NaiveDate::from_ymd_res(2009, 3, 9)?, "መውሊድ (ግምት)"), ], &mut map, - Country::ET, - "Ethiopia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "አድዋ"), @@ -265,14 +266,14 @@ pub fn build( (NaiveDate::from_ymd_res(2010, 2, 26)?, "መውሊድ (ግምት)"), ], &mut map, - Country::ET, - "Ethiopia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "አድዋ"), @@ -288,14 +289,14 @@ pub fn build( (NaiveDate::from_ymd_res(2011, 2, 15)?, "መውሊድ (ግምት)"), ], &mut map, - Country::ET, - "Ethiopia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "አድዋ"), @@ -311,14 +312,14 @@ pub fn build( (NaiveDate::from_ymd_res(2012, 2, 4)?, "መውሊድ (ግምት)"), ], &mut map, - Country::ET, - "Ethiopia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "አድዋ"), @@ -333,14 +334,14 @@ pub fn build( (NaiveDate::from_ymd_res(2013, 1, 24)?, "መውሊድ (ግምት)"), ], &mut map, - Country::ET, - "Ethiopia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "አድዋ"), @@ -356,14 +357,14 @@ pub fn build( (NaiveDate::from_ymd_res(2014, 1, 13)?, "መውሊድ (ግምት)"), ], &mut map, - Country::ET, - "Ethiopia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "አድዋ"), @@ -380,14 +381,14 @@ pub fn build( (NaiveDate::from_ymd_res(2015, 12, 23)?, "መውሊድ (ግምት)"), ], &mut map, - Country::ET, - "Ethiopia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "አድዋ"), @@ -401,14 +402,14 @@ pub fn build( (NaiveDate::from_ymd_res(2016, 12, 11)?, "መውሊድ (ግምት)"), ], &mut map, - Country::ET, - "Ethiopia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "አድዋ"), @@ -424,14 +425,14 @@ pub fn build( (NaiveDate::from_ymd_res(2017, 11, 30)?, "መውሊድ (ግምት)"), ], &mut map, - Country::ET, - "Ethiopia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "አድዋ"), @@ -447,14 +448,14 @@ pub fn build( (NaiveDate::from_ymd_res(2018, 11, 21)?, "መውሊድ"), ], &mut map, - Country::ET, - "Ethiopia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "አድዋ"), @@ -470,14 +471,14 @@ pub fn build( (NaiveDate::from_ymd_res(2019, 11, 10)?, "መውሊድ"), ], &mut map, - Country::ET, - "Ethiopia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "አድዋ"), @@ -493,14 +494,14 @@ pub fn build( (NaiveDate::from_ymd_res(2020, 10, 29)?, "መውሊድ"), ], &mut map, - Country::ET, - "Ethiopia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "አድዋ"), @@ -516,14 +517,14 @@ pub fn build( (NaiveDate::from_ymd_res(2021, 10, 18)?, "መውሊድ"), ], &mut map, - Country::ET, - "Ethiopia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "አድዋ"), @@ -539,14 +540,14 @@ pub fn build( (NaiveDate::from_ymd_res(2022, 10, 8)?, "መውሊድ"), ], &mut map, - Country::ET, - "Ethiopia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "አድዋ"), @@ -562,14 +563,14 @@ pub fn build( (NaiveDate::from_ymd_res(2023, 9, 27)?, "መውሊድ"), ], &mut map, - Country::ET, - "Ethiopia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "አድዋ"), @@ -584,14 +585,14 @@ pub fn build( (NaiveDate::from_ymd_res(2024, 9, 15)?, "መውሊድ (ግምት)"), ], &mut map, - Country::ET, - "Ethiopia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "አድዋ"), @@ -607,14 +608,14 @@ pub fn build( (NaiveDate::from_ymd_res(2025, 9, 4)?, "መውሊድ (ግምት)"), ], &mut map, - Country::ET, - "Ethiopia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "አድዋ"), @@ -630,14 +631,14 @@ pub fn build( (NaiveDate::from_ymd_res(2026, 8, 25)?, "መውሊድ (ግምት)"), ], &mut map, - Country::ET, - "Ethiopia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "አድዋ"), @@ -653,14 +654,14 @@ pub fn build( (NaiveDate::from_ymd_res(2027, 8, 14)?, "መውሊድ (ግምት)"), ], &mut map, - Country::ET, - "Ethiopia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "አድዋ"), @@ -675,14 +676,14 @@ pub fn build( (NaiveDate::from_ymd_res(2028, 8, 3)?, "መውሊድ (ግምት)"), ], &mut map, - Country::ET, - "Ethiopia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "አድዋ"), @@ -698,14 +699,14 @@ pub fn build( (NaiveDate::from_ymd_res(2029, 7, 24)?, "መውሊድ (ግምት)"), ], &mut map, - Country::ET, - "Ethiopia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "አድዋ"), @@ -721,8 +722,8 @@ pub fn build( (NaiveDate::from_ymd_res(2030, 7, 13)?, "መውሊድ (ግምት)"), ], &mut map, - Country::ET, - "Ethiopia", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/fi.rs b/src/data/fi.rs index 92b1683..42148e7 100644 --- a/src/data/fi.rs +++ b/src/data/fi.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Finland"; +const COUNTY_CODE: Country = Country::FI; + /// Generate holiday map for Finland. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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"), @@ -35,14 +36,14 @@ pub fn build( (NaiveDate::from_ymd_res(2000, 12, 26)?, "Tapaninpäivä"), ], &mut map, - Country::FI, - "Finland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -60,14 +61,14 @@ pub fn build( (NaiveDate::from_ymd_res(2001, 12, 26)?, "Tapaninpäivä"), ], &mut map, - Country::FI, - "Finland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -85,14 +86,14 @@ pub fn build( (NaiveDate::from_ymd_res(2002, 12, 26)?, "Tapaninpäivä"), ], &mut map, - Country::FI, - "Finland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -110,14 +111,14 @@ pub fn build( (NaiveDate::from_ymd_res(2003, 12, 26)?, "Tapaninpäivä"), ], &mut map, - Country::FI, - "Finland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -135,14 +136,14 @@ pub fn build( (NaiveDate::from_ymd_res(2004, 12, 26)?, "Tapaninpäivä"), ], &mut map, - Country::FI, - "Finland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -160,14 +161,14 @@ pub fn build( (NaiveDate::from_ymd_res(2005, 12, 26)?, "Tapaninpäivä"), ], &mut map, - Country::FI, - "Finland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -185,14 +186,14 @@ pub fn build( (NaiveDate::from_ymd_res(2006, 12, 26)?, "Tapaninpäivä"), ], &mut map, - Country::FI, - "Finland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -210,14 +211,14 @@ pub fn build( (NaiveDate::from_ymd_res(2007, 12, 26)?, "Tapaninpäivä"), ], &mut map, - Country::FI, - "Finland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -234,14 +235,14 @@ pub fn build( (NaiveDate::from_ymd_res(2008, 12, 26)?, "Tapaninpäivä"), ], &mut map, - Country::FI, - "Finland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -259,14 +260,14 @@ pub fn build( (NaiveDate::from_ymd_res(2009, 12, 26)?, "Tapaninpäivä"), ], &mut map, - Country::FI, - "Finland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -284,14 +285,14 @@ pub fn build( (NaiveDate::from_ymd_res(2010, 12, 26)?, "Tapaninpäivä"), ], &mut map, - Country::FI, - "Finland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -309,14 +310,14 @@ pub fn build( (NaiveDate::from_ymd_res(2011, 12, 26)?, "Tapaninpäivä"), ], &mut map, - Country::FI, - "Finland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -334,14 +335,14 @@ pub fn build( (NaiveDate::from_ymd_res(2012, 12, 26)?, "Tapaninpäivä"), ], &mut map, - Country::FI, - "Finland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -359,14 +360,14 @@ pub fn build( (NaiveDate::from_ymd_res(2013, 12, 26)?, "Tapaninpäivä"), ], &mut map, - Country::FI, - "Finland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -384,14 +385,14 @@ pub fn build( (NaiveDate::from_ymd_res(2014, 12, 26)?, "Tapaninpäivä"), ], &mut map, - Country::FI, - "Finland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -409,14 +410,14 @@ pub fn build( (NaiveDate::from_ymd_res(2015, 12, 26)?, "Tapaninpäivä"), ], &mut map, - Country::FI, - "Finland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -434,14 +435,14 @@ pub fn build( (NaiveDate::from_ymd_res(2016, 12, 26)?, "Tapaninpäivä"), ], &mut map, - Country::FI, - "Finland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -459,14 +460,14 @@ pub fn build( (NaiveDate::from_ymd_res(2017, 12, 26)?, "Tapaninpäivä"), ], &mut map, - Country::FI, - "Finland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -484,14 +485,14 @@ pub fn build( (NaiveDate::from_ymd_res(2018, 12, 26)?, "Tapaninpäivä"), ], &mut map, - Country::FI, - "Finland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -509,14 +510,14 @@ pub fn build( (NaiveDate::from_ymd_res(2019, 12, 26)?, "Tapaninpäivä"), ], &mut map, - Country::FI, - "Finland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -534,14 +535,14 @@ pub fn build( (NaiveDate::from_ymd_res(2020, 12, 26)?, "Tapaninpäivä"), ], &mut map, - Country::FI, - "Finland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -559,14 +560,14 @@ pub fn build( (NaiveDate::from_ymd_res(2021, 12, 26)?, "Tapaninpäivä"), ], &mut map, - Country::FI, - "Finland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -584,14 +585,14 @@ pub fn build( (NaiveDate::from_ymd_res(2022, 12, 26)?, "Tapaninpäivä"), ], &mut map, - Country::FI, - "Finland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -609,14 +610,14 @@ pub fn build( (NaiveDate::from_ymd_res(2023, 12, 26)?, "Tapaninpäivä"), ], &mut map, - Country::FI, - "Finland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -634,14 +635,14 @@ pub fn build( (NaiveDate::from_ymd_res(2024, 12, 26)?, "Tapaninpäivä"), ], &mut map, - Country::FI, - "Finland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -659,14 +660,14 @@ pub fn build( (NaiveDate::from_ymd_res(2025, 12, 26)?, "Tapaninpäivä"), ], &mut map, - Country::FI, - "Finland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -684,14 +685,14 @@ pub fn build( (NaiveDate::from_ymd_res(2026, 12, 26)?, "Tapaninpäivä"), ], &mut map, - Country::FI, - "Finland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -709,14 +710,14 @@ pub fn build( (NaiveDate::from_ymd_res(2027, 12, 26)?, "Tapaninpäivä"), ], &mut map, - Country::FI, - "Finland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -734,14 +735,14 @@ pub fn build( (NaiveDate::from_ymd_res(2028, 12, 26)?, "Tapaninpäivä"), ], &mut map, - Country::FI, - "Finland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -759,14 +760,14 @@ pub fn build( (NaiveDate::from_ymd_res(2029, 12, 26)?, "Tapaninpäivä"), ], &mut map, - Country::FI, - "Finland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -784,8 +785,8 @@ pub fn build( (NaiveDate::from_ymd_res(2030, 12, 26)?, "Tapaninpäivä"), ], &mut map, - Country::FI, - "Finland", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/fr.rs b/src/data/fr.rs index 121c736..6b35bd7 100644 --- a/src/data/fr.rs +++ b/src/data/fr.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "France"; +const COUNTY_CODE: Country = Country::FR; + /// Generate holiday map for France. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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"), @@ -31,14 +32,14 @@ pub fn build( (NaiveDate::from_ymd_res(2000, 12, 25)?, "Noël"), ], &mut map, - Country::FR, - "France", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -52,14 +53,14 @@ pub fn build( (NaiveDate::from_ymd_res(2001, 12, 25)?, "Noël"), ], &mut map, - Country::FR, - "France", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -73,14 +74,14 @@ pub fn build( (NaiveDate::from_ymd_res(2002, 12, 25)?, "Noël"), ], &mut map, - Country::FR, - "France", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -94,14 +95,14 @@ pub fn build( (NaiveDate::from_ymd_res(2003, 12, 25)?, "Noël"), ], &mut map, - Country::FR, - "France", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -115,14 +116,14 @@ pub fn build( (NaiveDate::from_ymd_res(2004, 12, 25)?, "Noël"), ], &mut map, - Country::FR, - "France", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -135,14 +136,14 @@ pub fn build( (NaiveDate::from_ymd_res(2005, 12, 25)?, "Noël"), ], &mut map, - Country::FR, - "France", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -155,14 +156,14 @@ pub fn build( (NaiveDate::from_ymd_res(2006, 12, 25)?, "Noël"), ], &mut map, - Country::FR, - "France", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -175,14 +176,14 @@ pub fn build( (NaiveDate::from_ymd_res(2007, 12, 25)?, "Noël"), ], &mut map, - Country::FR, - "France", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2008, - vec![ + [ (NaiveDate::from_ymd_res(2008, 1, 1)?, "Jour de l'an"), ( NaiveDate::from_ymd_res(2008, 5, 1)?, @@ -198,14 +199,14 @@ pub fn build( (NaiveDate::from_ymd_res(2008, 12, 25)?, "Noël"), ], &mut map, - Country::FR, - "France", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -219,14 +220,14 @@ pub fn build( (NaiveDate::from_ymd_res(2009, 12, 25)?, "Noël"), ], &mut map, - Country::FR, - "France", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -240,14 +241,14 @@ pub fn build( (NaiveDate::from_ymd_res(2010, 12, 25)?, "Noël"), ], &mut map, - Country::FR, - "France", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -261,14 +262,14 @@ pub fn build( (NaiveDate::from_ymd_res(2011, 12, 25)?, "Noël"), ], &mut map, - Country::FR, - "France", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -282,14 +283,14 @@ pub fn build( (NaiveDate::from_ymd_res(2012, 12, 25)?, "Noël"), ], &mut map, - Country::FR, - "France", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -303,14 +304,14 @@ pub fn build( (NaiveDate::from_ymd_res(2013, 12, 25)?, "Noël"), ], &mut map, - Country::FR, - "France", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -324,14 +325,14 @@ pub fn build( (NaiveDate::from_ymd_res(2014, 12, 25)?, "Noël"), ], &mut map, - Country::FR, - "France", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -345,14 +346,14 @@ pub fn build( (NaiveDate::from_ymd_res(2015, 12, 25)?, "Noël"), ], &mut map, - Country::FR, - "France", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -366,14 +367,14 @@ pub fn build( (NaiveDate::from_ymd_res(2016, 12, 25)?, "Noël"), ], &mut map, - Country::FR, - "France", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -387,14 +388,14 @@ pub fn build( (NaiveDate::from_ymd_res(2017, 12, 25)?, "Noël"), ], &mut map, - Country::FR, - "France", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -408,14 +409,14 @@ pub fn build( (NaiveDate::from_ymd_res(2018, 12, 25)?, "Noël"), ], &mut map, - Country::FR, - "France", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -429,14 +430,14 @@ pub fn build( (NaiveDate::from_ymd_res(2019, 12, 25)?, "Noël"), ], &mut map, - Country::FR, - "France", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -450,14 +451,14 @@ pub fn build( (NaiveDate::from_ymd_res(2020, 12, 25)?, "Noël"), ], &mut map, - Country::FR, - "France", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -471,14 +472,14 @@ pub fn build( (NaiveDate::from_ymd_res(2021, 12, 25)?, "Noël"), ], &mut map, - Country::FR, - "France", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -492,14 +493,14 @@ pub fn build( (NaiveDate::from_ymd_res(2022, 12, 25)?, "Noël"), ], &mut map, - Country::FR, - "France", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -513,14 +514,14 @@ pub fn build( (NaiveDate::from_ymd_res(2023, 12, 25)?, "Noël"), ], &mut map, - Country::FR, - "France", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -534,14 +535,14 @@ pub fn build( (NaiveDate::from_ymd_res(2024, 12, 25)?, "Noël"), ], &mut map, - Country::FR, - "France", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -555,14 +556,14 @@ pub fn build( (NaiveDate::from_ymd_res(2025, 12, 25)?, "Noël"), ], &mut map, - Country::FR, - "France", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -576,14 +577,14 @@ pub fn build( (NaiveDate::from_ymd_res(2026, 12, 25)?, "Noël"), ], &mut map, - Country::FR, - "France", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -597,14 +598,14 @@ pub fn build( (NaiveDate::from_ymd_res(2027, 12, 25)?, "Noël"), ], &mut map, - Country::FR, - "France", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -618,14 +619,14 @@ pub fn build( (NaiveDate::from_ymd_res(2028, 12, 25)?, "Noël"), ], &mut map, - Country::FR, - "France", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -639,14 +640,14 @@ pub fn build( (NaiveDate::from_ymd_res(2029, 12, 25)?, "Noël"), ], &mut map, - Country::FR, - "France", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -660,8 +661,8 @@ pub fn build( (NaiveDate::from_ymd_res(2030, 12, 25)?, "Noël"), ], &mut map, - Country::FR, - "France", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/gb.rs b/src/data/gb.rs index 9c290a3..a6207b3 100644 --- a/src/data/gb.rs +++ b/src/data/gb.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "United Kingdom"; +const COUNTY_CODE: Country = Country::GB; + /// Generate holiday map for United Kingdom. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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"), @@ -30,14 +31,14 @@ pub fn build( (NaiveDate::from_ymd_res(2000, 12, 26)?, "Boxing Day"), ], &mut map, - Country::GB, - "United Kingdom", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -46,14 +47,14 @@ pub fn build( (NaiveDate::from_ymd_res(2001, 12, 26)?, "Boxing Day"), ], &mut map, - Country::GB, - "United Kingdom", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -66,14 +67,14 @@ pub fn build( (NaiveDate::from_ymd_res(2002, 12, 26)?, "Boxing Day"), ], &mut map, - Country::GB, - "United Kingdom", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -82,14 +83,14 @@ pub fn build( (NaiveDate::from_ymd_res(2003, 12, 26)?, "Boxing Day"), ], &mut map, - Country::GB, - "United Kingdom", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -106,14 +107,14 @@ pub fn build( ), ], &mut map, - Country::GB, - "United Kingdom", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -130,14 +131,14 @@ pub fn build( (NaiveDate::from_ymd_res(2005, 12, 26)?, "Boxing Day"), ], &mut map, - Country::GB, - "United Kingdom", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -150,14 +151,14 @@ pub fn build( (NaiveDate::from_ymd_res(2006, 12, 26)?, "Boxing Day"), ], &mut map, - Country::GB, - "United Kingdom", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -166,14 +167,14 @@ pub fn build( (NaiveDate::from_ymd_res(2007, 12, 26)?, "Boxing Day"), ], &mut map, - Country::GB, - "United Kingdom", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -182,14 +183,14 @@ pub fn build( (NaiveDate::from_ymd_res(2008, 12, 26)?, "Boxing Day"), ], &mut map, - Country::GB, - "United Kingdom", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -202,14 +203,14 @@ pub fn build( ), ], &mut map, - Country::GB, - "United Kingdom", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -226,14 +227,14 @@ pub fn build( ), ], &mut map, - Country::GB, - "United Kingdom", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -254,14 +255,14 @@ pub fn build( (NaiveDate::from_ymd_res(2011, 12, 26)?, "Boxing Day"), ], &mut map, - Country::GB, - "United Kingdom", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -278,14 +279,14 @@ pub fn build( (NaiveDate::from_ymd_res(2012, 12, 26)?, "Boxing Day"), ], &mut map, - Country::GB, - "United Kingdom", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -294,14 +295,14 @@ pub fn build( (NaiveDate::from_ymd_res(2013, 12, 26)?, "Boxing Day"), ], &mut map, - Country::GB, - "United Kingdom", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -310,14 +311,14 @@ pub fn build( (NaiveDate::from_ymd_res(2014, 12, 26)?, "Boxing Day"), ], &mut map, - Country::GB, - "United Kingdom", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -330,14 +331,14 @@ pub fn build( ), ], &mut map, - Country::GB, - "United Kingdom", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -350,14 +351,14 @@ pub fn build( (NaiveDate::from_ymd_res(2016, 12, 26)?, "Boxing Day"), ], &mut map, - Country::GB, - "United Kingdom", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -370,14 +371,14 @@ pub fn build( (NaiveDate::from_ymd_res(2017, 12, 26)?, "Boxing Day"), ], &mut map, - Country::GB, - "United Kingdom", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -386,14 +387,14 @@ pub fn build( (NaiveDate::from_ymd_res(2018, 12, 26)?, "Boxing Day"), ], &mut map, - Country::GB, - "United Kingdom", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -402,14 +403,14 @@ pub fn build( (NaiveDate::from_ymd_res(2019, 12, 26)?, "Boxing Day"), ], &mut map, - Country::GB, - "United Kingdom", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -422,14 +423,14 @@ pub fn build( ), ], &mut map, - Country::GB, - "United Kingdom", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -446,14 +447,14 @@ pub fn build( ), ], &mut map, - Country::GB, - "United Kingdom", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -478,14 +479,14 @@ pub fn build( (NaiveDate::from_ymd_res(2022, 12, 26)?, "Boxing Day"), ], &mut map, - Country::GB, - "United Kingdom", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -502,14 +503,14 @@ pub fn build( (NaiveDate::from_ymd_res(2023, 12, 26)?, "Boxing Day"), ], &mut map, - Country::GB, - "United Kingdom", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -518,14 +519,14 @@ pub fn build( (NaiveDate::from_ymd_res(2024, 12, 26)?, "Boxing Day"), ], &mut map, - Country::GB, - "United Kingdom", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -534,14 +535,14 @@ pub fn build( (NaiveDate::from_ymd_res(2025, 12, 26)?, "Boxing Day"), ], &mut map, - Country::GB, - "United Kingdom", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -554,14 +555,14 @@ pub fn build( ), ], &mut map, - Country::GB, - "United Kingdom", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -578,14 +579,14 @@ pub fn build( ), ], &mut map, - Country::GB, - "United Kingdom", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -598,14 +599,14 @@ pub fn build( (NaiveDate::from_ymd_res(2028, 12, 26)?, "Boxing Day"), ], &mut map, - Country::GB, - "United Kingdom", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -614,14 +615,14 @@ pub fn build( (NaiveDate::from_ymd_res(2029, 12, 26)?, "Boxing Day"), ], &mut map, - Country::GB, - "United Kingdom", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -630,8 +631,8 @@ pub fn build( (NaiveDate::from_ymd_res(2030, 12, 26)?, "Boxing Day"), ], &mut map, - Country::GB, - "United Kingdom", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/ge.rs b/src/data/ge.rs index 20cac8e..b8523cb 100644 --- a/src/data/ge.rs +++ b/src/data/ge.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Georgia"; +const COUNTY_CODE: Country = Country::GE; + /// Generate holiday map for Georgia. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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)?, "ქრისტეშობა"), @@ -49,14 +50,14 @@ pub fn build( (NaiveDate::from_ymd_res(2000, 11, 23)?, "გიორგობა"), ], &mut map, - Country::GE, - "Georgia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "ქრისტეშობა"), @@ -88,14 +89,14 @@ pub fn build( (NaiveDate::from_ymd_res(2001, 11, 23)?, "გიორგობა"), ], &mut map, - Country::GE, - "Georgia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "ქრისტეშობა"), @@ -127,14 +128,14 @@ pub fn build( (NaiveDate::from_ymd_res(2002, 11, 23)?, "გიორგობა"), ], &mut map, - Country::GE, - "Georgia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "ქრისტეშობა"), @@ -166,14 +167,14 @@ pub fn build( (NaiveDate::from_ymd_res(2003, 11, 23)?, "გიორგობა"), ], &mut map, - Country::GE, - "Georgia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "ქრისტეშობა"), @@ -204,14 +205,14 @@ pub fn build( (NaiveDate::from_ymd_res(2004, 11, 23)?, "გიორგობა"), ], &mut map, - Country::GE, - "Georgia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "ქრისტეშობა"), @@ -243,14 +244,14 @@ pub fn build( (NaiveDate::from_ymd_res(2005, 11, 23)?, "გიორგობა"), ], &mut map, - Country::GE, - "Georgia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "ქრისტეშობა"), @@ -282,14 +283,14 @@ pub fn build( (NaiveDate::from_ymd_res(2006, 11, 23)?, "გიორგობა"), ], &mut map, - Country::GE, - "Georgia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "ქრისტეშობა"), @@ -320,14 +321,14 @@ pub fn build( (NaiveDate::from_ymd_res(2007, 11, 23)?, "გიორგობა"), ], &mut map, - Country::GE, - "Georgia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "ქრისტეშობა"), @@ -359,14 +360,14 @@ pub fn build( (NaiveDate::from_ymd_res(2008, 11, 23)?, "გიორგობა"), ], &mut map, - Country::GE, - "Georgia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "ქრისტეშობა"), @@ -398,14 +399,14 @@ pub fn build( (NaiveDate::from_ymd_res(2009, 11, 23)?, "გიორგობა"), ], &mut map, - Country::GE, - "Georgia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "ქრისტეშობა"), @@ -437,14 +438,14 @@ pub fn build( (NaiveDate::from_ymd_res(2010, 11, 23)?, "გიორგობა"), ], &mut map, - Country::GE, - "Georgia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "ქრისტეშობა"), @@ -476,14 +477,14 @@ pub fn build( (NaiveDate::from_ymd_res(2011, 11, 23)?, "გიორგობა"), ], &mut map, - Country::GE, - "Georgia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "ქრისტეშობა"), @@ -515,14 +516,14 @@ pub fn build( (NaiveDate::from_ymd_res(2012, 11, 23)?, "გიორგობა"), ], &mut map, - Country::GE, - "Georgia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "ქრისტეშობა"), @@ -554,14 +555,14 @@ pub fn build( (NaiveDate::from_ymd_res(2013, 11, 23)?, "გიორგობა"), ], &mut map, - Country::GE, - "Georgia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "ქრისტეშობა"), @@ -593,14 +594,14 @@ pub fn build( (NaiveDate::from_ymd_res(2014, 11, 23)?, "გიორგობა"), ], &mut map, - Country::GE, - "Georgia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "ქრისტეშობა"), @@ -632,14 +633,14 @@ pub fn build( (NaiveDate::from_ymd_res(2015, 11, 23)?, "გიორგობა"), ], &mut map, - Country::GE, - "Georgia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "ქრისტეშობა"), @@ -671,14 +672,14 @@ pub fn build( (NaiveDate::from_ymd_res(2016, 11, 23)?, "გიორგობა"), ], &mut map, - Country::GE, - "Georgia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "ქრისტეშობა"), @@ -710,14 +711,14 @@ pub fn build( (NaiveDate::from_ymd_res(2017, 11, 23)?, "გიორგობა"), ], &mut map, - Country::GE, - "Georgia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "ქრისტეშობა"), @@ -748,14 +749,14 @@ pub fn build( (NaiveDate::from_ymd_res(2018, 11, 23)?, "გიორგობა"), ], &mut map, - Country::GE, - "Georgia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "ქრისტეშობა"), @@ -787,14 +788,14 @@ pub fn build( (NaiveDate::from_ymd_res(2019, 11, 23)?, "გიორგობა"), ], &mut map, - Country::GE, - "Georgia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "ქრისტეშობა"), @@ -826,14 +827,14 @@ pub fn build( (NaiveDate::from_ymd_res(2020, 11, 23)?, "გიორგობა"), ], &mut map, - Country::GE, - "Georgia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "ქრისტეშობა"), @@ -865,14 +866,14 @@ pub fn build( (NaiveDate::from_ymd_res(2021, 11, 23)?, "გიორგობა"), ], &mut map, - Country::GE, - "Georgia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "ქრისტეშობა"), @@ -904,14 +905,14 @@ pub fn build( (NaiveDate::from_ymd_res(2022, 11, 23)?, "გიორგობა"), ], &mut map, - Country::GE, - "Georgia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "ქრისტეშობა"), @@ -943,14 +944,14 @@ pub fn build( (NaiveDate::from_ymd_res(2023, 11, 23)?, "გიორგობა"), ], &mut map, - Country::GE, - "Georgia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "ქრისტეშობა"), @@ -982,14 +983,14 @@ pub fn build( (NaiveDate::from_ymd_res(2024, 11, 23)?, "გიორგობა"), ], &mut map, - Country::GE, - "Georgia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "ქრისტეშობა"), @@ -1021,14 +1022,14 @@ pub fn build( (NaiveDate::from_ymd_res(2025, 11, 23)?, "გიორგობა"), ], &mut map, - Country::GE, - "Georgia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "ქრისტეშობა"), @@ -1060,14 +1061,14 @@ pub fn build( (NaiveDate::from_ymd_res(2026, 11, 23)?, "გიორგობა"), ], &mut map, - Country::GE, - "Georgia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "ქრისტეშობა"), @@ -1099,14 +1100,14 @@ pub fn build( (NaiveDate::from_ymd_res(2027, 11, 23)?, "გიორგობა"), ], &mut map, - Country::GE, - "Georgia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "ქრისტეშობა"), @@ -1138,14 +1139,14 @@ pub fn build( (NaiveDate::from_ymd_res(2028, 11, 23)?, "გიორგობა"), ], &mut map, - Country::GE, - "Georgia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "ქრისტეშობა"), @@ -1176,14 +1177,14 @@ pub fn build( (NaiveDate::from_ymd_res(2029, 11, 23)?, "გიორგობა"), ], &mut map, - Country::GE, - "Georgia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "ქრისტეშობა"), @@ -1215,8 +1216,8 @@ pub fn build( (NaiveDate::from_ymd_res(2030, 11, 23)?, "გიორგობა"), ], &mut map, - Country::GE, - "Georgia", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/gr.rs b/src/data/gr.rs index 14b14ee..9f0491e 100644 --- a/src/data/gr.rs +++ b/src/data/gr.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Greece"; +const COUNTY_CODE: Country = Country::GR; + /// Generate holiday map for Greece. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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)?, "Καθαρά Δευτέρα"), @@ -46,14 +47,14 @@ pub fn build( ), ], &mut map, - Country::GR, - "Greece", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Καθαρά Δευτέρα"), @@ -80,14 +81,14 @@ pub fn build( ), ], &mut map, - Country::GR, - "Greece", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Καθαρά Δευτέρα"), @@ -114,14 +115,14 @@ pub fn build( ), ], &mut map, - Country::GR, - "Greece", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Καθαρά Δευτέρα"), @@ -148,14 +149,14 @@ pub fn build( ), ], &mut map, - Country::GR, - "Greece", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Καθαρά Δευτέρα"), @@ -182,14 +183,14 @@ pub fn build( ), ], &mut map, - Country::GR, - "Greece", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Καθαρά Δευτέρα"), @@ -216,14 +217,14 @@ pub fn build( ), ], &mut map, - Country::GR, - "Greece", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Καθαρά Δευτέρα"), @@ -250,14 +251,14 @@ pub fn build( ), ], &mut map, - Country::GR, - "Greece", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Καθαρά Δευτέρα"), @@ -284,14 +285,14 @@ pub fn build( ), ], &mut map, - Country::GR, - "Greece", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Καθαρά Δευτέρα"), @@ -318,14 +319,14 @@ pub fn build( ), ], &mut map, - Country::GR, - "Greece", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Καθαρά Δευτέρα"), @@ -352,14 +353,14 @@ pub fn build( ), ], &mut map, - Country::GR, - "Greece", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Καθαρά Δευτέρα"), @@ -386,14 +387,14 @@ pub fn build( ), ], &mut map, - Country::GR, - "Greece", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Καθαρά Δευτέρα"), @@ -420,14 +421,14 @@ pub fn build( ), ], &mut map, - Country::GR, - "Greece", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Καθαρά Δευτέρα"), @@ -454,14 +455,14 @@ pub fn build( ), ], &mut map, - Country::GR, - "Greece", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Καθαρά Δευτέρα"), @@ -488,14 +489,14 @@ pub fn build( ), ], &mut map, - Country::GR, - "Greece", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Καθαρά Δευτέρα"), @@ -522,14 +523,14 @@ pub fn build( ), ], &mut map, - Country::GR, - "Greece", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Καθαρά Δευτέρα"), @@ -556,14 +557,14 @@ pub fn build( ), ], &mut map, - Country::GR, - "Greece", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Καθαρά Δευτέρα"), @@ -590,14 +591,14 @@ pub fn build( ), ], &mut map, - Country::GR, - "Greece", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Καθαρά Δευτέρα"), @@ -624,14 +625,14 @@ pub fn build( ), ], &mut map, - Country::GR, - "Greece", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Καθαρά Δευτέρα"), @@ -658,14 +659,14 @@ pub fn build( ), ], &mut map, - Country::GR, - "Greece", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Καθαρά Δευτέρα"), @@ -692,14 +693,14 @@ pub fn build( ), ], &mut map, - Country::GR, - "Greece", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Καθαρά Δευτέρα"), @@ -726,14 +727,14 @@ pub fn build( ), ], &mut map, - Country::GR, - "Greece", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Καθαρά Δευτέρα"), @@ -764,14 +765,14 @@ pub fn build( ), ], &mut map, - Country::GR, - "Greece", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Καθαρά Δευτέρα"), @@ -802,14 +803,14 @@ pub fn build( ), ], &mut map, - Country::GR, - "Greece", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Καθαρά Δευτέρα"), @@ -836,14 +837,14 @@ pub fn build( ), ], &mut map, - Country::GR, - "Greece", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Καθαρά Δευτέρα"), @@ -870,14 +871,14 @@ pub fn build( ), ], &mut map, - Country::GR, - "Greece", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Καθαρά Δευτέρα"), @@ -904,14 +905,14 @@ pub fn build( ), ], &mut map, - Country::GR, - "Greece", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Καθαρά Δευτέρα"), @@ -938,14 +939,14 @@ pub fn build( ), ], &mut map, - Country::GR, - "Greece", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Καθαρά Δευτέρα"), @@ -976,14 +977,14 @@ pub fn build( ), ], &mut map, - Country::GR, - "Greece", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Καθαρά Δευτέρα"), @@ -1010,14 +1011,14 @@ pub fn build( ), ], &mut map, - Country::GR, - "Greece", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Καθαρά Δευτέρα"), @@ -1044,14 +1045,14 @@ pub fn build( ), ], &mut map, - Country::GR, - "Greece", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Καθαρά Δευτέρα"), @@ -1078,8 +1079,8 @@ pub fn build( ), ], &mut map, - Country::GR, - "Greece", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/helper.rs b/src/data/helper.rs index e1327d7..c964318 100644 --- a/src/data/helper.rs +++ b/src/data/helper.rs @@ -31,3 +31,32 @@ pub fn build_year( map.insert(year, m); } + +#[allow(clippy::needless_pass_by_value)] +pub fn build_subdivision_year( + years: Option<&std::ops::Range>, + year: Year, + national_holidays: &mut HolidayPerCountryMap, + subdivision_holidays: impl IntoIterator, + map: &mut HolidayPerCountryMap, + country: Country, + county_name: &(impl ToString + ?Sized), +) { + if !should_build_year(years, year) { + return; + } + + let m = national_holidays + .remove(&year) + .unwrap_or_default() + .into_iter() + .chain(subdivision_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 index 825321a..7ba8b85 100644 --- a/src/data/hk.rs +++ b/src/data/hk.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Hong Kong"; +const COUNTY_CODE: Country = Country::HK; + /// Generate holiday map for Hong Kong. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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", @@ -54,14 +55,14 @@ pub fn build( (NaiveDate::from_ymd_res(2000, 12, 25)?, "Christmas Day"), ], &mut map, - Country::HK, - "Hong Kong", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2001, - vec![ + [ ( NaiveDate::from_ymd_res(2001, 1, 1)?, "The first day of January", @@ -101,14 +102,14 @@ pub fn build( (NaiveDate::from_ymd_res(2001, 12, 25)?, "Christmas Day"), ], &mut map, - Country::HK, - "Hong Kong", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2002, - vec![ + [ ( NaiveDate::from_ymd_res(2002, 1, 1)?, "The first day of January", @@ -144,14 +145,14 @@ pub fn build( (NaiveDate::from_ymd_res(2002, 12, 25)?, "Christmas Day"), ], &mut map, - Country::HK, - "Hong Kong", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2003, - vec![ + [ ( NaiveDate::from_ymd_res(2003, 1, 1)?, "The first day of January", @@ -184,14 +185,14 @@ pub fn build( (NaiveDate::from_ymd_res(2003, 12, 25)?, "Christmas Day"), ], &mut map, - Country::HK, - "Hong Kong", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2004, - vec![ + [ ( NaiveDate::from_ymd_res(2004, 1, 1)?, "The first day of January", @@ -231,14 +232,14 @@ pub fn build( (NaiveDate::from_ymd_res(2004, 12, 25)?, "Christmas Day"), ], &mut map, - Country::HK, - "Hong Kong", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2005, - vec![ + [ ( NaiveDate::from_ymd_res(2005, 1, 1)?, "The first day of January", @@ -279,14 +280,14 @@ pub fn build( ), ], &mut map, - Country::HK, - "Hong Kong", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2006, - vec![ + [ ( NaiveDate::from_ymd_res(2006, 1, 1)?, "The first day of January", @@ -330,14 +331,14 @@ pub fn build( (NaiveDate::from_ymd_res(2006, 12, 25)?, "Christmas Day"), ], &mut map, - Country::HK, - "Hong Kong", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2007, - vec![ + [ ( NaiveDate::from_ymd_res(2007, 1, 1)?, "The first day of January", @@ -377,14 +378,14 @@ pub fn build( (NaiveDate::from_ymd_res(2007, 12, 25)?, "Christmas Day"), ], &mut map, - Country::HK, - "Hong Kong", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2008, - vec![ + [ ( NaiveDate::from_ymd_res(2008, 1, 1)?, "The first day of January", @@ -421,14 +422,14 @@ pub fn build( (NaiveDate::from_ymd_res(2008, 12, 25)?, "Christmas Day"), ], &mut map, - Country::HK, - "Hong Kong", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2009, - vec![ + [ ( NaiveDate::from_ymd_res(2009, 1, 1)?, "The first day of January", @@ -464,14 +465,14 @@ pub fn build( (NaiveDate::from_ymd_res(2009, 12, 25)?, "Christmas Day"), ], &mut map, - Country::HK, - "Hong Kong", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2010, - vec![ + [ ( NaiveDate::from_ymd_res(2010, 1, 1)?, "The first day of January", @@ -507,14 +508,14 @@ pub fn build( (NaiveDate::from_ymd_res(2010, 12, 25)?, "Christmas Day"), ], &mut map, - Country::HK, - "Hong Kong", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2011, - vec![ + [ ( NaiveDate::from_ymd_res(2011, 1, 1)?, "The first day of January", @@ -555,14 +556,14 @@ pub fn build( ), ], &mut map, - Country::HK, - "Hong Kong", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2012, - vec![ + [ ( NaiveDate::from_ymd_res(2012, 1, 1)?, "The first day of January", @@ -609,14 +610,14 @@ pub fn build( (NaiveDate::from_ymd_res(2012, 12, 25)?, "Christmas Day"), ], &mut map, - Country::HK, - "Hong Kong", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2013, - vec![ + [ ( NaiveDate::from_ymd_res(2013, 1, 1)?, "The first day of January", @@ -656,14 +657,14 @@ pub fn build( (NaiveDate::from_ymd_res(2013, 12, 25)?, "Christmas Day"), ], &mut map, - Country::HK, - "Hong Kong", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2014, - vec![ + [ ( NaiveDate::from_ymd_res(2014, 1, 1)?, "The first day of January", @@ -699,39 +700,38 @@ pub fn build( (NaiveDate::from_ymd_res(2014, 12, 25)?, "Christmas Day"), ], &mut map, - Country::HK, - "Hong Kong", + COUNTY_CODE, + COUNTY_NAME, ); 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"), + [ + (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", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2016, - vec![ + [ ( NaiveDate::from_ymd_res(2016, 1, 1)?, "The first day of January", @@ -776,14 +776,14 @@ pub fn build( ), ], &mut map, - Country::HK, - "Hong Kong", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2017, - vec![ + [ ( NaiveDate::from_ymd_res(2017, 1, 1)?, "The first day of January", @@ -827,14 +827,14 @@ pub fn build( (NaiveDate::from_ymd_res(2017, 12, 25)?, "Christmas Day"), ], &mut map, - Country::HK, - "Hong Kong", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2018, - vec![ + [ ( NaiveDate::from_ymd_res(2018, 1, 1)?, "The first day of January", @@ -874,14 +874,14 @@ pub fn build( (NaiveDate::from_ymd_res(2018, 12, 25)?, "Christmas Day"), ], &mut map, - Country::HK, - "Hong Kong", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2019, - vec![ + [ ( NaiveDate::from_ymd_res(2019, 1, 1)?, "The first day of January", @@ -914,14 +914,14 @@ pub fn build( (NaiveDate::from_ymd_res(2019, 12, 25)?, "Christmas Day"), ], &mut map, - Country::HK, - "Hong Kong", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2020, - vec![ + [ ( NaiveDate::from_ymd_res(2020, 1, 1)?, "The first day of January", @@ -961,14 +961,14 @@ pub fn build( (NaiveDate::from_ymd_res(2020, 12, 25)?, "Christmas Day"), ], &mut map, - Country::HK, - "Hong Kong", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2021, - vec![ + [ ( NaiveDate::from_ymd_res(2021, 1, 1)?, "The first day of January", @@ -1008,14 +1008,14 @@ pub fn build( (NaiveDate::from_ymd_res(2021, 12, 25)?, "Christmas Day"), ], &mut map, - Country::HK, - "Hong Kong", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2022, - vec![ + [ ( NaiveDate::from_ymd_res(2022, 1, 1)?, "The first day of January", @@ -1064,14 +1064,14 @@ pub fn build( ), ], &mut map, - Country::HK, - "Hong Kong", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2023, - vec![ + [ ( NaiveDate::from_ymd_res(2023, 1, 1)?, "The first day of January", @@ -1119,14 +1119,14 @@ pub fn build( (NaiveDate::from_ymd_res(2023, 12, 25)?, "Christmas Day"), ], &mut map, - Country::HK, - "Hong Kong", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2024, - vec![ + [ ( NaiveDate::from_ymd_res(2024, 1, 1)?, "The first day of January", @@ -1170,14 +1170,14 @@ pub fn build( (NaiveDate::from_ymd_res(2024, 12, 25)?, "Christmas Day"), ], &mut map, - Country::HK, - "Hong Kong", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2025, - vec![ + [ ( NaiveDate::from_ymd_res(2025, 1, 1)?, "The first day of January", @@ -1225,14 +1225,14 @@ pub fn build( (NaiveDate::from_ymd_res(2025, 12, 25)?, "Christmas Day"), ], &mut map, - Country::HK, - "Hong Kong", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2026, - vec![ + [ ( NaiveDate::from_ymd_res(2026, 1, 1)?, "The first day of January", @@ -1289,14 +1289,14 @@ pub fn build( (NaiveDate::from_ymd_res(2026, 12, 25)?, "Christmas Day"), ], &mut map, - Country::HK, - "Hong Kong", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2027, - vec![ + [ ( NaiveDate::from_ymd_res(2027, 1, 1)?, "The first day of January", @@ -1342,14 +1342,14 @@ pub fn build( (NaiveDate::from_ymd_res(2027, 12, 25)?, "Christmas Day"), ], &mut map, - Country::HK, - "Hong Kong", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2028, - vec![ + [ ( NaiveDate::from_ymd_res(2028, 1, 1)?, "The first day of January", @@ -1403,14 +1403,14 @@ pub fn build( (NaiveDate::from_ymd_res(2028, 12, 25)?, "Christmas Day"), ], &mut map, - Country::HK, - "Hong Kong", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2029, - vec![ + [ ( NaiveDate::from_ymd_res(2029, 1, 1)?, "The first day of January", @@ -1464,14 +1464,14 @@ pub fn build( (NaiveDate::from_ymd_res(2029, 12, 25)?, "Christmas Day"), ], &mut map, - Country::HK, - "Hong Kong", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2030, - vec![ + [ ( NaiveDate::from_ymd_res(2030, 1, 1)?, "The first day of January", @@ -1521,8 +1521,8 @@ pub fn build( (NaiveDate::from_ymd_res(2030, 12, 25)?, "Christmas Day"), ], &mut map, - Country::HK, - "Hong Kong", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/hn.rs b/src/data/hn.rs index 64382a6..f8098a1 100644 --- a/src/data/hn.rs +++ b/src/data/hn.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Honduras"; +const COUNTY_CODE: Country = Country::HN; + /// Generate holiday map for Honduras. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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"), @@ -37,14 +38,14 @@ pub fn build( (NaiveDate::from_ymd_res(2000, 12, 25)?, "Navidad"), ], &mut map, - Country::HN, - "Honduras", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -66,14 +67,14 @@ pub fn build( (NaiveDate::from_ymd_res(2001, 12, 25)?, "Navidad"), ], &mut map, - Country::HN, - "Honduras", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -93,14 +94,14 @@ pub fn build( (NaiveDate::from_ymd_res(2002, 12, 25)?, "Navidad"), ], &mut map, - Country::HN, - "Honduras", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -120,14 +121,14 @@ pub fn build( (NaiveDate::from_ymd_res(2003, 12, 25)?, "Navidad"), ], &mut map, - Country::HN, - "Honduras", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -147,14 +148,14 @@ pub fn build( (NaiveDate::from_ymd_res(2004, 12, 25)?, "Navidad"), ], &mut map, - Country::HN, - "Honduras", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -174,14 +175,14 @@ pub fn build( (NaiveDate::from_ymd_res(2005, 12, 25)?, "Navidad"), ], &mut map, - Country::HN, - "Honduras", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2006, - vec![ + [ (NaiveDate::from_ymd_res(2006, 1, 1)?, "Año Nuevo"), (NaiveDate::from_ymd_res(2006, 4, 13)?, "Jueves Santo"), ( @@ -203,14 +204,14 @@ pub fn build( (NaiveDate::from_ymd_res(2006, 12, 25)?, "Navidad"), ], &mut map, - Country::HN, - "Honduras", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -230,14 +231,14 @@ pub fn build( (NaiveDate::from_ymd_res(2007, 12, 25)?, "Navidad"), ], &mut map, - Country::HN, - "Honduras", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -257,14 +258,14 @@ pub fn build( (NaiveDate::from_ymd_res(2008, 12, 25)?, "Navidad"), ], &mut map, - Country::HN, - "Honduras", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -284,14 +285,14 @@ pub fn build( (NaiveDate::from_ymd_res(2009, 12, 25)?, "Navidad"), ], &mut map, - Country::HN, - "Honduras", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -311,14 +312,14 @@ pub fn build( (NaiveDate::from_ymd_res(2010, 12, 25)?, "Navidad"), ], &mut map, - Country::HN, - "Honduras", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -338,14 +339,14 @@ pub fn build( (NaiveDate::from_ymd_res(2011, 12, 25)?, "Navidad"), ], &mut map, - Country::HN, - "Honduras", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -365,14 +366,14 @@ pub fn build( (NaiveDate::from_ymd_res(2012, 12, 25)?, "Navidad"), ], &mut map, - Country::HN, - "Honduras", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -392,14 +393,14 @@ pub fn build( (NaiveDate::from_ymd_res(2013, 12, 25)?, "Navidad"), ], &mut map, - Country::HN, - "Honduras", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -419,14 +420,14 @@ pub fn build( (NaiveDate::from_ymd_res(2014, 12, 25)?, "Navidad"), ], &mut map, - Country::HN, - "Honduras", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -443,14 +444,14 @@ pub fn build( (NaiveDate::from_ymd_res(2015, 12, 25)?, "Navidad"), ], &mut map, - Country::HN, - "Honduras", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -467,14 +468,14 @@ pub fn build( (NaiveDate::from_ymd_res(2016, 12, 25)?, "Navidad"), ], &mut map, - Country::HN, - "Honduras", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2017, - vec![ + [ (NaiveDate::from_ymd_res(2017, 1, 1)?, "Año Nuevo"), (NaiveDate::from_ymd_res(2017, 4, 13)?, "Jueves Santo"), ( @@ -493,14 +494,14 @@ pub fn build( (NaiveDate::from_ymd_res(2017, 12, 25)?, "Navidad"), ], &mut map, - Country::HN, - "Honduras", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -517,14 +518,14 @@ pub fn build( (NaiveDate::from_ymd_res(2018, 12, 25)?, "Navidad"), ], &mut map, - Country::HN, - "Honduras", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -541,14 +542,14 @@ pub fn build( (NaiveDate::from_ymd_res(2019, 12, 25)?, "Navidad"), ], &mut map, - Country::HN, - "Honduras", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -565,14 +566,14 @@ pub fn build( (NaiveDate::from_ymd_res(2020, 12, 25)?, "Navidad"), ], &mut map, - Country::HN, - "Honduras", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -589,14 +590,14 @@ pub fn build( (NaiveDate::from_ymd_res(2021, 12, 25)?, "Navidad"), ], &mut map, - Country::HN, - "Honduras", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2022, - vec![ + [ (NaiveDate::from_ymd_res(2022, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2022, 4, 14)?, @@ -615,14 +616,14 @@ pub fn build( (NaiveDate::from_ymd_res(2022, 12, 25)?, "Navidad"), ], &mut map, - Country::HN, - "Honduras", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -639,14 +640,14 @@ pub fn build( (NaiveDate::from_ymd_res(2023, 12, 25)?, "Navidad"), ], &mut map, - Country::HN, - "Honduras", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -663,14 +664,14 @@ pub fn build( (NaiveDate::from_ymd_res(2024, 12, 25)?, "Navidad"), ], &mut map, - Country::HN, - "Honduras", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -687,14 +688,14 @@ pub fn build( (NaiveDate::from_ymd_res(2025, 12, 25)?, "Navidad"), ], &mut map, - Country::HN, - "Honduras", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -711,14 +712,14 @@ pub fn build( (NaiveDate::from_ymd_res(2026, 12, 25)?, "Navidad"), ], &mut map, - Country::HN, - "Honduras", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -735,14 +736,14 @@ pub fn build( (NaiveDate::from_ymd_res(2027, 12, 25)?, "Navidad"), ], &mut map, - Country::HN, - "Honduras", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2028, - vec![ + [ (NaiveDate::from_ymd_res(2028, 1, 1)?, "Año Nuevo"), (NaiveDate::from_ymd_res(2028, 4, 13)?, "Jueves Santo"), ( @@ -761,14 +762,14 @@ pub fn build( (NaiveDate::from_ymd_res(2028, 12, 25)?, "Navidad"), ], &mut map, - Country::HN, - "Honduras", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -785,14 +786,14 @@ pub fn build( (NaiveDate::from_ymd_res(2029, 12, 25)?, "Navidad"), ], &mut map, - Country::HN, - "Honduras", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -809,8 +810,8 @@ pub fn build( (NaiveDate::from_ymd_res(2030, 12, 25)?, "Navidad"), ], &mut map, - Country::HN, - "Honduras", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/hr.rs b/src/data/hr.rs index 97cf0e0..46a24f9 100644 --- a/src/data/hr.rs +++ b/src/data/hr.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Croatia"; +const COUNTY_CODE: Country = Country::HR; + /// Generate holiday map for Croatia. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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)?, @@ -40,14 +41,14 @@ pub fn build( (NaiveDate::from_ymd_res(2000, 12, 26)?, "Sveti Stjepan"), ], &mut map, - Country::HR, - "Croatia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2001, - vec![ + [ (NaiveDate::from_ymd_res(2001, 1, 1)?, "Nova godina"), ( NaiveDate::from_ymd_res(2001, 1, 6)?, @@ -70,14 +71,14 @@ pub fn build( (NaiveDate::from_ymd_res(2001, 12, 26)?, "Sveti Stjepan"), ], &mut map, - Country::HR, - "Croatia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -98,14 +99,14 @@ pub fn build( (NaiveDate::from_ymd_res(2002, 12, 26)?, "Sveti Stjepan"), ], &mut map, - Country::HR, - "Croatia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2003, - vec![ + [ (NaiveDate::from_ymd_res(2003, 1, 1)?, "Nova godina"), ( NaiveDate::from_ymd_res(2003, 1, 6)?, @@ -130,14 +131,14 @@ pub fn build( (NaiveDate::from_ymd_res(2003, 12, 26)?, "Sveti Stjepan"), ], &mut map, - Country::HR, - "Croatia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2004, - vec![ + [ (NaiveDate::from_ymd_res(2004, 1, 1)?, "Nova godina"), ( NaiveDate::from_ymd_res(2004, 1, 6)?, @@ -162,14 +163,14 @@ pub fn build( (NaiveDate::from_ymd_res(2004, 12, 26)?, "Sveti Stjepan"), ], &mut map, - Country::HR, - "Croatia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2005, - vec![ + [ (NaiveDate::from_ymd_res(2005, 1, 1)?, "Nova godina"), ( NaiveDate::from_ymd_res(2005, 1, 6)?, @@ -194,14 +195,14 @@ pub fn build( (NaiveDate::from_ymd_res(2005, 12, 26)?, "Sveti Stjepan"), ], &mut map, - Country::HR, - "Croatia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2006, - vec![ + [ (NaiveDate::from_ymd_res(2006, 1, 1)?, "Nova godina"), ( NaiveDate::from_ymd_res(2006, 1, 6)?, @@ -226,14 +227,14 @@ pub fn build( (NaiveDate::from_ymd_res(2006, 12, 26)?, "Sveti Stjepan"), ], &mut map, - Country::HR, - "Croatia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2007, - vec![ + [ (NaiveDate::from_ymd_res(2007, 1, 1)?, "Nova godina"), ( NaiveDate::from_ymd_res(2007, 1, 6)?, @@ -258,14 +259,14 @@ pub fn build( (NaiveDate::from_ymd_res(2007, 12, 26)?, "Sveti Stjepan"), ], &mut map, - Country::HR, - "Croatia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2008, - vec![ + [ (NaiveDate::from_ymd_res(2008, 1, 1)?, "Nova godina"), ( NaiveDate::from_ymd_res(2008, 1, 6)?, @@ -290,14 +291,14 @@ pub fn build( (NaiveDate::from_ymd_res(2008, 12, 26)?, "Sveti Stjepan"), ], &mut map, - Country::HR, - "Croatia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2009, - vec![ + [ (NaiveDate::from_ymd_res(2009, 1, 1)?, "Nova godina"), ( NaiveDate::from_ymd_res(2009, 1, 6)?, @@ -323,14 +324,14 @@ pub fn build( (NaiveDate::from_ymd_res(2009, 12, 26)?, "Sveti Stjepan"), ], &mut map, - Country::HR, - "Croatia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2010, - vec![ + [ (NaiveDate::from_ymd_res(2010, 1, 1)?, "Nova godina"), ( NaiveDate::from_ymd_res(2010, 1, 6)?, @@ -356,14 +357,14 @@ pub fn build( (NaiveDate::from_ymd_res(2010, 12, 26)?, "Sveti Stjepan"), ], &mut map, - Country::HR, - "Croatia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2011, - vec![ + [ (NaiveDate::from_ymd_res(2011, 1, 1)?, "Nova godina"), ( NaiveDate::from_ymd_res(2011, 1, 6)?, @@ -389,14 +390,14 @@ pub fn build( (NaiveDate::from_ymd_res(2011, 12, 26)?, "Sveti Stjepan"), ], &mut map, - Country::HR, - "Croatia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2012, - vec![ + [ (NaiveDate::from_ymd_res(2012, 1, 1)?, "Nova godina"), ( NaiveDate::from_ymd_res(2012, 1, 6)?, @@ -422,14 +423,14 @@ pub fn build( (NaiveDate::from_ymd_res(2012, 12, 26)?, "Sveti Stjepan"), ], &mut map, - Country::HR, - "Croatia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2013, - vec![ + [ (NaiveDate::from_ymd_res(2013, 1, 1)?, "Nova godina"), ( NaiveDate::from_ymd_res(2013, 1, 6)?, @@ -455,14 +456,14 @@ pub fn build( (NaiveDate::from_ymd_res(2013, 12, 26)?, "Sveti Stjepan"), ], &mut map, - Country::HR, - "Croatia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2014, - vec![ + [ (NaiveDate::from_ymd_res(2014, 1, 1)?, "Nova godina"), ( NaiveDate::from_ymd_res(2014, 1, 6)?, @@ -488,14 +489,14 @@ pub fn build( (NaiveDate::from_ymd_res(2014, 12, 26)?, "Sveti Stjepan"), ], &mut map, - Country::HR, - "Croatia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2015, - vec![ + [ (NaiveDate::from_ymd_res(2015, 1, 1)?, "Nova godina"), ( NaiveDate::from_ymd_res(2015, 1, 6)?, @@ -521,14 +522,14 @@ pub fn build( (NaiveDate::from_ymd_res(2015, 12, 26)?, "Sveti Stjepan"), ], &mut map, - Country::HR, - "Croatia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2016, - vec![ + [ (NaiveDate::from_ymd_res(2016, 1, 1)?, "Nova godina"), ( NaiveDate::from_ymd_res(2016, 1, 6)?, @@ -554,14 +555,14 @@ pub fn build( (NaiveDate::from_ymd_res(2016, 12, 26)?, "Sveti Stjepan"), ], &mut map, - Country::HR, - "Croatia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2017, - vec![ + [ (NaiveDate::from_ymd_res(2017, 1, 1)?, "Nova godina"), ( NaiveDate::from_ymd_res(2017, 1, 6)?, @@ -587,14 +588,14 @@ pub fn build( (NaiveDate::from_ymd_res(2017, 12, 26)?, "Sveti Stjepan"), ], &mut map, - Country::HR, - "Croatia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2018, - vec![ + [ (NaiveDate::from_ymd_res(2018, 1, 1)?, "Nova godina"), ( NaiveDate::from_ymd_res(2018, 1, 6)?, @@ -620,14 +621,14 @@ pub fn build( (NaiveDate::from_ymd_res(2018, 12, 26)?, "Sveti Stjepan"), ], &mut map, - Country::HR, - "Croatia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2019, - vec![ + [ (NaiveDate::from_ymd_res(2019, 1, 1)?, "Nova godina"), ( NaiveDate::from_ymd_res(2019, 1, 6)?, @@ -653,282 +654,271 @@ pub fn build( (NaiveDate::from_ymd_res(2019, 12, 26)?, "Sveti Stjepan"), ], &mut map, - Country::HR, - "Croatia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), + [ + (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", + COUNTY_CODE, + COUNTY_NAME, ); 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"), + [ + (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", + COUNTY_CODE, + COUNTY_NAME, ); 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"), + [ + (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", + COUNTY_CODE, + COUNTY_NAME, ); 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"), + [ + (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", + COUNTY_CODE, + COUNTY_NAME, ); 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"), + [ + (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", + COUNTY_CODE, + COUNTY_NAME, ); 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"), + [ + (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", + COUNTY_CODE, + COUNTY_NAME, ); 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"), + [ + (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", + COUNTY_CODE, + COUNTY_NAME, ); 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"), + [ + (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", + COUNTY_CODE, + COUNTY_NAME, ); 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"), + [ + (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", + COUNTY_CODE, + COUNTY_NAME, ); 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"), + [ + (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", + COUNTY_CODE, + COUNTY_NAME, ); 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"), + [ + (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", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/hu.rs b/src/data/hu.rs index d81f26e..fdf84c0 100644 --- a/src/data/hu.rs +++ b/src/data/hu.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Hungary"; +const COUNTY_CODE: Country = Country::HU; + /// Generate holiday map for Hungary. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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"), @@ -35,14 +36,14 @@ pub fn build( (NaiveDate::from_ymd_res(2000, 12, 26)?, "Karácsony másnapja"), ], &mut map, - Country::HU, - "Hungary", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -60,14 +61,14 @@ pub fn build( (NaiveDate::from_ymd_res(2001, 12, 26)?, "Karácsony másnapja"), ], &mut map, - Country::HU, - "Hungary", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -85,14 +86,14 @@ pub fn build( (NaiveDate::from_ymd_res(2002, 12, 26)?, "Karácsony másnapja"), ], &mut map, - Country::HU, - "Hungary", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -110,14 +111,14 @@ pub fn build( (NaiveDate::from_ymd_res(2003, 12, 26)?, "Karácsony másnapja"), ], &mut map, - Country::HU, - "Hungary", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -135,14 +136,14 @@ pub fn build( (NaiveDate::from_ymd_res(2004, 12, 26)?, "Karácsony másnapja"), ], &mut map, - Country::HU, - "Hungary", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -160,14 +161,14 @@ pub fn build( (NaiveDate::from_ymd_res(2005, 12, 26)?, "Karácsony másnapja"), ], &mut map, - Country::HU, - "Hungary", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -185,14 +186,14 @@ pub fn build( (NaiveDate::from_ymd_res(2006, 12, 26)?, "Karácsony másnapja"), ], &mut map, - Country::HU, - "Hungary", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -210,14 +211,14 @@ pub fn build( (NaiveDate::from_ymd_res(2007, 12, 26)?, "Karácsony másnapja"), ], &mut map, - Country::HU, - "Hungary", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -235,14 +236,14 @@ pub fn build( (NaiveDate::from_ymd_res(2008, 12, 26)?, "Karácsony másnapja"), ], &mut map, - Country::HU, - "Hungary", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -260,14 +261,14 @@ pub fn build( (NaiveDate::from_ymd_res(2009, 12, 26)?, "Karácsony másnapja"), ], &mut map, - Country::HU, - "Hungary", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -289,14 +290,14 @@ pub fn build( ), ], &mut map, - Country::HU, - "Hungary", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -322,14 +323,14 @@ pub fn build( ), ], &mut map, - Country::HU, - "Hungary", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -371,14 +372,14 @@ pub fn build( ), ], &mut map, - Country::HU, - "Hungary", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -408,14 +409,14 @@ pub fn build( ), ], &mut map, - Country::HU, - "Hungary", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -445,14 +446,14 @@ pub fn build( ), ], &mut map, - Country::HU, - "Hungary", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -482,14 +483,14 @@ pub fn build( ), ], &mut map, - Country::HU, - "Hungary", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -515,14 +516,14 @@ pub fn build( ), ], &mut map, - Country::HU, - "Hungary", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -541,14 +542,14 @@ pub fn build( (NaiveDate::from_ymd_res(2017, 12, 26)?, "Karácsony másnapja"), ], &mut map, - Country::HU, - "Hungary", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -591,14 +592,14 @@ pub fn build( ), ], &mut map, - Country::HU, - "Hungary", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -629,14 +630,14 @@ pub fn build( ), ], &mut map, - Country::HU, - "Hungary", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -663,14 +664,14 @@ pub fn build( ), ], &mut map, - Country::HU, - "Hungary", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -693,14 +694,14 @@ pub fn build( ), ], &mut map, - Country::HU, - "Hungary", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -727,14 +728,14 @@ pub fn build( ), ], &mut map, - Country::HU, - "Hungary", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -753,14 +754,14 @@ pub fn build( (NaiveDate::from_ymd_res(2023, 12, 26)?, "Karácsony másnapja"), ], &mut map, - Country::HU, - "Hungary", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -791,14 +792,14 @@ pub fn build( ), ], &mut map, - Country::HU, - "Hungary", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -817,14 +818,14 @@ pub fn build( (NaiveDate::from_ymd_res(2025, 12, 26)?, "Karácsony másnapja"), ], &mut map, - Country::HU, - "Hungary", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -843,14 +844,14 @@ pub fn build( (NaiveDate::from_ymd_res(2026, 12, 26)?, "Karácsony másnapja"), ], &mut map, - Country::HU, - "Hungary", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -869,14 +870,14 @@ pub fn build( (NaiveDate::from_ymd_res(2027, 12, 26)?, "Karácsony másnapja"), ], &mut map, - Country::HU, - "Hungary", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -895,14 +896,14 @@ pub fn build( (NaiveDate::from_ymd_res(2028, 12, 26)?, "Karácsony másnapja"), ], &mut map, - Country::HU, - "Hungary", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -921,14 +922,14 @@ pub fn build( (NaiveDate::from_ymd_res(2029, 12, 26)?, "Karácsony másnapja"), ], &mut map, - Country::HU, - "Hungary", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -947,8 +948,8 @@ pub fn build( (NaiveDate::from_ymd_res(2030, 12, 26)?, "Karácsony másnapja"), ], &mut map, - Country::HU, - "Hungary", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/id.rs b/src/data/id.rs index 7ee6964..6b1cdf9 100644 --- a/src/data/id.rs +++ b/src/data/id.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Indonesia"; +const COUNTY_CODE: Country = Country::ID; + /// Generate holiday map for Indonesia. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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"), ( @@ -67,14 +68,14 @@ pub fn build( ), ], &mut map, - Country::ID, - "Indonesia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -110,14 +111,14 @@ pub fn build( ), ], &mut map, - Country::ID, - "Indonesia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -150,14 +151,14 @@ pub fn build( ), ], &mut map, - Country::ID, - "Indonesia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -194,14 +195,14 @@ pub fn build( ), ], &mut map, - Country::ID, - "Indonesia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -238,14 +239,14 @@ pub fn build( ), ], &mut map, - Country::ID, - "Indonesia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -279,14 +280,14 @@ pub fn build( ), ], &mut map, - Country::ID, - "Indonesia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -324,14 +325,14 @@ pub fn build( ), ], &mut map, - Country::ID, - "Indonesia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -365,14 +366,14 @@ pub fn build( ), ], &mut map, - Country::ID, - "Indonesia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -404,14 +405,14 @@ pub fn build( ), ], &mut map, - Country::ID, - "Indonesia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -440,14 +441,14 @@ pub fn build( ), ], &mut map, - Country::ID, - "Indonesia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -479,14 +480,14 @@ pub fn build( ), ], &mut map, - Country::ID, - "Indonesia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -518,14 +519,14 @@ pub fn build( ), ], &mut map, - Country::ID, - "Indonesia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -554,14 +555,14 @@ pub fn build( ), ], &mut map, - Country::ID, - "Indonesia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -593,14 +594,14 @@ pub fn build( ), ], &mut map, - Country::ID, - "Indonesia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -636,14 +637,14 @@ pub fn build( ), ], &mut map, - Country::ID, - "Indonesia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -680,14 +681,14 @@ pub fn build( ), ], &mut map, - Country::ID, - "Indonesia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -724,14 +725,14 @@ pub fn build( ), ], &mut map, - Country::ID, - "Indonesia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -768,14 +769,14 @@ pub fn build( ), ], &mut map, - Country::ID, - "Indonesia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -813,14 +814,14 @@ pub fn build( (NaiveDate::from_ymd_res(2018, 6, 27)?, "Hari Pemilihan"), ], &mut map, - Country::ID, - "Indonesia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -858,14 +859,14 @@ pub fn build( (NaiveDate::from_ymd_res(2019, 4, 17)?, "Hari Pemilihan"), ], &mut map, - Country::ID, - "Indonesia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -903,14 +904,14 @@ pub fn build( (NaiveDate::from_ymd_res(2020, 12, 9)?, "Hari Pemilihan"), ], &mut map, - Country::ID, - "Indonesia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -946,14 +947,14 @@ pub fn build( ), ], &mut map, - Country::ID, - "Indonesia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -990,14 +991,14 @@ pub fn build( ), ], &mut map, - Country::ID, - "Indonesia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1034,14 +1035,14 @@ pub fn build( ), ], &mut map, - Country::ID, - "Indonesia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2024, - vec![ + [ (NaiveDate::from_ymd_res(2024, 1, 1)?, "Tahun Baru Masehi"), ( NaiveDate::from_ymd_res(2024, 2, 10)?, @@ -1090,14 +1091,14 @@ pub fn build( ), ], &mut map, - Country::ID, - "Indonesia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2025, - vec![ + [ (NaiveDate::from_ymd_res(2025, 1, 1)?, "Tahun Baru Masehi"), ( NaiveDate::from_ymd_res(2025, 1, 29)?, @@ -1149,14 +1150,14 @@ pub fn build( ), ], &mut map, - Country::ID, - "Indonesia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2026, - vec![ + [ (NaiveDate::from_ymd_res(2026, 1, 1)?, "Tahun Baru Masehi"), ( NaiveDate::from_ymd_res(2026, 2, 17)?, @@ -1208,14 +1209,14 @@ pub fn build( ), ], &mut map, - Country::ID, - "Indonesia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2027, - vec![ + [ (NaiveDate::from_ymd_res(2027, 1, 1)?, "Tahun Baru Masehi"), ( NaiveDate::from_ymd_res(2027, 2, 6)?, @@ -1269,14 +1270,14 @@ pub fn build( ), ], &mut map, - Country::ID, - "Indonesia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2028, - vec![ + [ (NaiveDate::from_ymd_res(2028, 1, 1)?, "Tahun Baru Masehi"), ( NaiveDate::from_ymd_res(2028, 1, 26)?, @@ -1323,14 +1324,14 @@ pub fn build( ), ], &mut map, - Country::ID, - "Indonesia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2029, - vec![ + [ (NaiveDate::from_ymd_res(2029, 1, 1)?, "Tahun Baru Masehi"), ( NaiveDate::from_ymd_res(2029, 2, 13)?, @@ -1381,14 +1382,14 @@ pub fn build( ), ], &mut map, - Country::ID, - "Indonesia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2030, - vec![ + [ (NaiveDate::from_ymd_res(2030, 1, 1)?, "Tahun Baru Masehi"), ( NaiveDate::from_ymd_res(2030, 2, 3)?, @@ -1439,8 +1440,8 @@ pub fn build( ), ], &mut map, - Country::ID, - "Indonesia", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/ie.rs b/src/data/ie.rs index 758aa5c..18e39b3 100644 --- a/src/data/ie.rs +++ b/src/data/ie.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Ireland"; +const COUNTY_CODE: Country = Country::IE; + /// Generate holiday map for Ireland. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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"), @@ -32,14 +33,14 @@ pub fn build( (NaiveDate::from_ymd_res(2000, 12, 26)?, "St. Stephen's Day"), ], &mut map, - Country::IE, - "Ireland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -54,14 +55,14 @@ pub fn build( (NaiveDate::from_ymd_res(2001, 12, 26)?, "St. Stephen's Day"), ], &mut map, - Country::IE, - "Ireland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -76,14 +77,14 @@ pub fn build( (NaiveDate::from_ymd_res(2002, 12, 26)?, "St. Stephen's Day"), ], &mut map, - Country::IE, - "Ireland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -98,14 +99,14 @@ pub fn build( (NaiveDate::from_ymd_res(2003, 12, 26)?, "St. Stephen's Day"), ], &mut map, - Country::IE, - "Ireland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -120,14 +121,14 @@ pub fn build( (NaiveDate::from_ymd_res(2004, 12, 26)?, "St. Stephen's Day"), ], &mut map, - Country::IE, - "Ireland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -142,14 +143,14 @@ pub fn build( (NaiveDate::from_ymd_res(2005, 12, 26)?, "St. Stephen's Day"), ], &mut map, - Country::IE, - "Ireland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -164,14 +165,14 @@ pub fn build( (NaiveDate::from_ymd_res(2006, 12, 26)?, "St. Stephen's Day"), ], &mut map, - Country::IE, - "Ireland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -186,14 +187,14 @@ pub fn build( (NaiveDate::from_ymd_res(2007, 12, 26)?, "St. Stephen's Day"), ], &mut map, - Country::IE, - "Ireland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -208,14 +209,14 @@ pub fn build( (NaiveDate::from_ymd_res(2008, 12, 26)?, "St. Stephen's Day"), ], &mut map, - Country::IE, - "Ireland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -230,14 +231,14 @@ pub fn build( (NaiveDate::from_ymd_res(2009, 12, 26)?, "St. Stephen's Day"), ], &mut map, - Country::IE, - "Ireland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -252,14 +253,14 @@ pub fn build( (NaiveDate::from_ymd_res(2010, 12, 26)?, "St. Stephen's Day"), ], &mut map, - Country::IE, - "Ireland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -278,14 +279,14 @@ pub fn build( ), ], &mut map, - Country::IE, - "Ireland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -300,14 +301,14 @@ pub fn build( (NaiveDate::from_ymd_res(2012, 12, 26)?, "St. Stephen's Day"), ], &mut map, - Country::IE, - "Ireland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -322,14 +323,14 @@ pub fn build( (NaiveDate::from_ymd_res(2013, 12, 26)?, "St. Stephen's Day"), ], &mut map, - Country::IE, - "Ireland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -344,14 +345,14 @@ pub fn build( (NaiveDate::from_ymd_res(2014, 12, 26)?, "St. Stephen's Day"), ], &mut map, - Country::IE, - "Ireland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -366,14 +367,14 @@ pub fn build( (NaiveDate::from_ymd_res(2015, 12, 26)?, "St. Stephen's Day"), ], &mut map, - Country::IE, - "Ireland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -388,14 +389,14 @@ pub fn build( (NaiveDate::from_ymd_res(2016, 12, 26)?, "St. Stephen's Day"), ], &mut map, - Country::IE, - "Ireland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -410,14 +411,14 @@ pub fn build( (NaiveDate::from_ymd_res(2017, 12, 26)?, "St. Stephen's Day"), ], &mut map, - Country::IE, - "Ireland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -432,14 +433,14 @@ pub fn build( (NaiveDate::from_ymd_res(2018, 12, 26)?, "St. Stephen's Day"), ], &mut map, - Country::IE, - "Ireland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -454,14 +455,14 @@ pub fn build( (NaiveDate::from_ymd_res(2019, 12, 26)?, "St. Stephen's Day"), ], &mut map, - Country::IE, - "Ireland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -476,14 +477,14 @@ pub fn build( (NaiveDate::from_ymd_res(2020, 12, 26)?, "St. Stephen's Day"), ], &mut map, - Country::IE, - "Ireland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -498,14 +499,14 @@ pub fn build( (NaiveDate::from_ymd_res(2021, 12, 26)?, "St. Stephen's Day"), ], &mut map, - Country::IE, - "Ireland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -524,14 +525,14 @@ pub fn build( ), ], &mut map, - Country::IE, - "Ireland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -547,14 +548,14 @@ pub fn build( (NaiveDate::from_ymd_res(2023, 12, 26)?, "St. Stephen's Day"), ], &mut map, - Country::IE, - "Ireland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -570,14 +571,14 @@ pub fn build( (NaiveDate::from_ymd_res(2024, 12, 26)?, "St. Stephen's Day"), ], &mut map, - Country::IE, - "Ireland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -593,14 +594,14 @@ pub fn build( (NaiveDate::from_ymd_res(2025, 12, 26)?, "St. Stephen's Day"), ], &mut map, - Country::IE, - "Ireland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -616,14 +617,14 @@ pub fn build( (NaiveDate::from_ymd_res(2026, 12, 26)?, "St. Stephen's Day"), ], &mut map, - Country::IE, - "Ireland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -639,14 +640,14 @@ pub fn build( (NaiveDate::from_ymd_res(2027, 12, 26)?, "St. Stephen's Day"), ], &mut map, - Country::IE, - "Ireland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -662,14 +663,14 @@ pub fn build( (NaiveDate::from_ymd_res(2028, 12, 26)?, "St. Stephen's Day"), ], &mut map, - Country::IE, - "Ireland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -685,14 +686,14 @@ pub fn build( (NaiveDate::from_ymd_res(2029, 12, 26)?, "St. Stephen's Day"), ], &mut map, - Country::IE, - "Ireland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -708,8 +709,8 @@ pub fn build( (NaiveDate::from_ymd_res(2030, 12, 26)?, "St. Stephen's Day"), ], &mut map, - Country::IE, - "Ireland", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/il.rs b/src/data/il.rs index da97da5..0cbbd13 100644 --- a/src/data/il.rs +++ b/src/data/il.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Israel"; +const COUNTY_CODE: Country = Country::IL; + /// Generate holiday map for Israel. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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)?, "יום כיפור"), @@ -32,14 +33,14 @@ pub fn build( (NaiveDate::from_ymd_res(2000, 6, 9)?, "שבועות"), ], &mut map, - Country::IL, - "Israel", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "יום כיפור"), @@ -54,14 +55,14 @@ pub fn build( (NaiveDate::from_ymd_res(2001, 5, 28)?, "שבועות"), ], &mut map, - Country::IL, - "Israel", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "יום כיפור"), @@ -76,14 +77,14 @@ pub fn build( (NaiveDate::from_ymd_res(2002, 5, 17)?, "שבועות"), ], &mut map, - Country::IL, - "Israel", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "יום כיפור"), @@ -98,14 +99,14 @@ pub fn build( (NaiveDate::from_ymd_res(2003, 6, 6)?, "שבועות"), ], &mut map, - Country::IL, - "Israel", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "יום כיפור"), @@ -120,14 +121,14 @@ pub fn build( (NaiveDate::from_ymd_res(2004, 5, 26)?, "שבועות"), ], &mut map, - Country::IL, - "Israel", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "יום כיפור"), @@ -142,14 +143,14 @@ pub fn build( (NaiveDate::from_ymd_res(2005, 6, 13)?, "שבועות"), ], &mut map, - Country::IL, - "Israel", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "יום כיפור"), @@ -164,14 +165,14 @@ pub fn build( (NaiveDate::from_ymd_res(2006, 6, 2)?, "שבועות"), ], &mut map, - Country::IL, - "Israel", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "יום כיפור"), @@ -186,14 +187,14 @@ pub fn build( (NaiveDate::from_ymd_res(2007, 5, 23)?, "שבועות"), ], &mut map, - Country::IL, - "Israel", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "יום כיפור"), @@ -208,14 +209,14 @@ pub fn build( (NaiveDate::from_ymd_res(2008, 6, 9)?, "שבועות"), ], &mut map, - Country::IL, - "Israel", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "יום כיפור"), @@ -230,14 +231,14 @@ pub fn build( (NaiveDate::from_ymd_res(2009, 5, 29)?, "שבועות"), ], &mut map, - Country::IL, - "Israel", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "יום כיפור"), @@ -252,14 +253,14 @@ pub fn build( (NaiveDate::from_ymd_res(2010, 5, 19)?, "שבועות"), ], &mut map, - Country::IL, - "Israel", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "יום כיפור"), @@ -274,14 +275,14 @@ pub fn build( (NaiveDate::from_ymd_res(2011, 6, 8)?, "שבועות"), ], &mut map, - Country::IL, - "Israel", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "יום כיפור"), @@ -296,14 +297,14 @@ pub fn build( (NaiveDate::from_ymd_res(2012, 5, 27)?, "שבועות"), ], &mut map, - Country::IL, - "Israel", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "יום כיפור"), @@ -318,14 +319,14 @@ pub fn build( (NaiveDate::from_ymd_res(2013, 5, 15)?, "שבועות"), ], &mut map, - Country::IL, - "Israel", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "יום כיפור"), @@ -340,14 +341,14 @@ pub fn build( (NaiveDate::from_ymd_res(2014, 6, 4)?, "שבועות"), ], &mut map, - Country::IL, - "Israel", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "יום כיפור"), @@ -362,14 +363,14 @@ pub fn build( (NaiveDate::from_ymd_res(2015, 5, 24)?, "שבועות"), ], &mut map, - Country::IL, - "Israel", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "יום כיפור"), @@ -384,14 +385,14 @@ pub fn build( (NaiveDate::from_ymd_res(2016, 6, 12)?, "שבועות"), ], &mut map, - Country::IL, - "Israel", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "יום כיפור"), @@ -406,14 +407,14 @@ pub fn build( (NaiveDate::from_ymd_res(2017, 5, 31)?, "שבועות"), ], &mut map, - Country::IL, - "Israel", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "יום כיפור"), @@ -428,14 +429,14 @@ pub fn build( (NaiveDate::from_ymd_res(2018, 5, 20)?, "שבועות"), ], &mut map, - Country::IL, - "Israel", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "יום כיפור"), @@ -450,14 +451,14 @@ pub fn build( (NaiveDate::from_ymd_res(2019, 6, 9)?, "שבועות"), ], &mut map, - Country::IL, - "Israel", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "יום כיפור"), @@ -472,14 +473,14 @@ pub fn build( (NaiveDate::from_ymd_res(2020, 5, 29)?, "שבועות"), ], &mut map, - Country::IL, - "Israel", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "יום כיפור"), @@ -494,14 +495,14 @@ pub fn build( (NaiveDate::from_ymd_res(2021, 5, 17)?, "שבועות"), ], &mut map, - Country::IL, - "Israel", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "יום כיפור"), @@ -516,14 +517,14 @@ pub fn build( (NaiveDate::from_ymd_res(2022, 6, 5)?, "שבועות"), ], &mut map, - Country::IL, - "Israel", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "יום כיפור"), @@ -538,14 +539,14 @@ pub fn build( (NaiveDate::from_ymd_res(2023, 5, 26)?, "שבועות"), ], &mut map, - Country::IL, - "Israel", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "יום כיפור"), @@ -560,14 +561,14 @@ pub fn build( (NaiveDate::from_ymd_res(2024, 6, 12)?, "שבועות"), ], &mut map, - Country::IL, - "Israel", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "יום כיפור"), @@ -582,14 +583,14 @@ pub fn build( (NaiveDate::from_ymd_res(2025, 6, 2)?, "שבועות"), ], &mut map, - Country::IL, - "Israel", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "יום כיפור"), @@ -604,14 +605,14 @@ pub fn build( (NaiveDate::from_ymd_res(2026, 5, 22)?, "שבועות"), ], &mut map, - Country::IL, - "Israel", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "יום כיפור"), @@ -626,14 +627,14 @@ pub fn build( (NaiveDate::from_ymd_res(2027, 6, 11)?, "שבועות"), ], &mut map, - Country::IL, - "Israel", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "יום כיפור"), @@ -648,14 +649,14 @@ pub fn build( (NaiveDate::from_ymd_res(2028, 5, 31)?, "שבועות"), ], &mut map, - Country::IL, - "Israel", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "יום כיפור"), @@ -670,14 +671,14 @@ pub fn build( (NaiveDate::from_ymd_res(2029, 5, 20)?, "שבועות"), ], &mut map, - Country::IL, - "Israel", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "יום כיפור"), @@ -692,8 +693,8 @@ pub fn build( (NaiveDate::from_ymd_res(2030, 6, 7)?, "שבועות"), ], &mut map, - Country::IL, - "Israel", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/im.rs b/src/data/im.rs index 211d162..2e1613f 100644 --- a/src/data/im.rs +++ b/src/data/im.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Isle of Man"; +const COUNTY_CODE: Country = Country::IM; + /// Generate holiday map for Isle of Man. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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"), @@ -37,14 +38,14 @@ pub fn build( (NaiveDate::from_ymd_res(2000, 12, 26)?, "Boxing Day"), ], &mut map, - Country::IM, - "Isle of Man", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -60,14 +61,14 @@ pub fn build( (NaiveDate::from_ymd_res(2001, 12, 26)?, "Boxing Day"), ], &mut map, - Country::IM, - "Isle of Man", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -87,14 +88,14 @@ pub fn build( (NaiveDate::from_ymd_res(2002, 12, 26)?, "Boxing Day"), ], &mut map, - Country::IM, - "Isle of Man", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -110,14 +111,14 @@ pub fn build( (NaiveDate::from_ymd_res(2003, 12, 26)?, "Boxing Day"), ], &mut map, - Country::IM, - "Isle of Man", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -141,14 +142,14 @@ pub fn build( ), ], &mut map, - Country::IM, - "Isle of Man", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -172,14 +173,14 @@ pub fn build( (NaiveDate::from_ymd_res(2005, 12, 26)?, "Boxing Day"), ], &mut map, - Country::IM, - "Isle of Man", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -199,14 +200,14 @@ pub fn build( (NaiveDate::from_ymd_res(2006, 12, 26)?, "Boxing Day"), ], &mut map, - Country::IM, - "Isle of Man", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -222,14 +223,14 @@ pub fn build( (NaiveDate::from_ymd_res(2007, 12, 26)?, "Boxing Day"), ], &mut map, - Country::IM, - "Isle of Man", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -245,14 +246,14 @@ pub fn build( (NaiveDate::from_ymd_res(2008, 12, 26)?, "Boxing Day"), ], &mut map, - Country::IM, - "Isle of Man", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -272,14 +273,14 @@ pub fn build( ), ], &mut map, - Country::IM, - "Isle of Man", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -303,14 +304,14 @@ pub fn build( ), ], &mut map, - Country::IM, - "Isle of Man", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -338,14 +339,14 @@ pub fn build( (NaiveDate::from_ymd_res(2011, 12, 26)?, "Boxing Day"), ], &mut map, - Country::IM, - "Isle of Man", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -369,14 +370,14 @@ pub fn build( (NaiveDate::from_ymd_res(2012, 12, 26)?, "Boxing Day"), ], &mut map, - Country::IM, - "Isle of Man", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -392,14 +393,14 @@ pub fn build( (NaiveDate::from_ymd_res(2013, 12, 26)?, "Boxing Day"), ], &mut map, - Country::IM, - "Isle of Man", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -415,14 +416,14 @@ pub fn build( (NaiveDate::from_ymd_res(2014, 12, 26)?, "Boxing Day"), ], &mut map, - Country::IM, - "Isle of Man", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -442,14 +443,14 @@ pub fn build( ), ], &mut map, - Country::IM, - "Isle of Man", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -469,14 +470,14 @@ pub fn build( (NaiveDate::from_ymd_res(2016, 12, 26)?, "Boxing Day"), ], &mut map, - Country::IM, - "Isle of Man", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -496,14 +497,14 @@ pub fn build( (NaiveDate::from_ymd_res(2017, 12, 26)?, "Boxing Day"), ], &mut map, - Country::IM, - "Isle of Man", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -519,14 +520,14 @@ pub fn build( (NaiveDate::from_ymd_res(2018, 12, 26)?, "Boxing Day"), ], &mut map, - Country::IM, - "Isle of Man", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -542,14 +543,14 @@ pub fn build( (NaiveDate::from_ymd_res(2019, 12, 26)?, "Boxing Day"), ], &mut map, - Country::IM, - "Isle of Man", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -569,14 +570,14 @@ pub fn build( ), ], &mut map, - Country::IM, - "Isle of Man", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -600,14 +601,14 @@ pub fn build( ), ], &mut map, - Country::IM, - "Isle of Man", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -638,14 +639,14 @@ pub fn build( (NaiveDate::from_ymd_res(2022, 12, 26)?, "Boxing Day"), ], &mut map, - Country::IM, - "Isle of Man", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -669,14 +670,14 @@ pub fn build( (NaiveDate::from_ymd_res(2023, 12, 26)?, "Boxing Day"), ], &mut map, - Country::IM, - "Isle of Man", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -692,14 +693,14 @@ pub fn build( (NaiveDate::from_ymd_res(2024, 12, 26)?, "Boxing Day"), ], &mut map, - Country::IM, - "Isle of Man", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -715,14 +716,14 @@ pub fn build( (NaiveDate::from_ymd_res(2025, 12, 26)?, "Boxing Day"), ], &mut map, - Country::IM, - "Isle of Man", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -742,14 +743,14 @@ pub fn build( ), ], &mut map, - Country::IM, - "Isle of Man", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -773,14 +774,14 @@ pub fn build( ), ], &mut map, - Country::IM, - "Isle of Man", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -800,14 +801,14 @@ pub fn build( (NaiveDate::from_ymd_res(2028, 12, 26)?, "Boxing Day"), ], &mut map, - Country::IM, - "Isle of Man", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -823,14 +824,14 @@ pub fn build( (NaiveDate::from_ymd_res(2029, 12, 26)?, "Boxing Day"), ], &mut map, - Country::IM, - "Isle of Man", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -846,8 +847,8 @@ pub fn build( (NaiveDate::from_ymd_res(2030, 12, 26)?, "Boxing Day"), ], &mut map, - Country::IM, - "Isle of Man", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/in.rs b/src/data/in.rs index 9410e99..86c0d99 100644 --- a/src/data/in.rs +++ b/src/data/in.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "India"; +const COUNTY_CODE: Country = Country::IN; + /// Generate holiday map for India. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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", @@ -62,14 +63,14 @@ pub fn build( (NaiveDate::from_ymd_res(2000, 12, 25)?, "Christmas Day"), ], &mut map, - Country::IN, - "India", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2001, - vec![ + [ ( NaiveDate::from_ymd_res(2001, 1, 14)?, "Makar Sankranti / Pongal", @@ -108,14 +109,14 @@ pub fn build( (NaiveDate::from_ymd_res(2001, 12, 25)?, "Christmas Day"), ], &mut map, - Country::IN, - "India", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2002, - vec![ + [ ( NaiveDate::from_ymd_res(2002, 1, 14)?, "Makar Sankranti / Pongal", @@ -152,14 +153,14 @@ pub fn build( (NaiveDate::from_ymd_res(2002, 12, 25)?, "Christmas Day"), ], &mut map, - Country::IN, - "India", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2003, - vec![ + [ ( NaiveDate::from_ymd_res(2003, 1, 14)?, "Makar Sankranti / Pongal", @@ -198,14 +199,14 @@ pub fn build( (NaiveDate::from_ymd_res(2003, 12, 25)?, "Christmas Day"), ], &mut map, - Country::IN, - "India", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2004, - vec![ + [ ( NaiveDate::from_ymd_res(2004, 1, 14)?, "Makar Sankranti / Pongal", @@ -246,14 +247,14 @@ pub fn build( (NaiveDate::from_ymd_res(2004, 12, 25)?, "Christmas Day"), ], &mut map, - Country::IN, - "India", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2005, - vec![ + [ ( NaiveDate::from_ymd_res(2005, 1, 14)?, "Makar Sankranti / Pongal", @@ -292,14 +293,14 @@ pub fn build( (NaiveDate::from_ymd_res(2005, 12, 25)?, "Christmas Day"), ], &mut map, - Country::IN, - "India", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2006, - vec![ + [ ( NaiveDate::from_ymd_res(2006, 1, 14)?, "Makar Sankranti / Pongal", @@ -342,14 +343,14 @@ pub fn build( (NaiveDate::from_ymd_res(2006, 12, 25)?, "Christmas Day"), ], &mut map, - Country::IN, - "India", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2007, - vec![ + [ ( NaiveDate::from_ymd_res(2007, 1, 14)?, "Makar Sankranti / Pongal", @@ -392,14 +393,14 @@ pub fn build( (NaiveDate::from_ymd_res(2007, 12, 25)?, "Christmas Day"), ], &mut map, - Country::IN, - "India", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2008, - vec![ + [ ( NaiveDate::from_ymd_res(2008, 1, 14)?, "Makar Sankranti / Pongal", @@ -437,14 +438,14 @@ pub fn build( (NaiveDate::from_ymd_res(2008, 12, 25)?, "Christmas Day"), ], &mut map, - Country::IN, - "India", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2009, - vec![ + [ ( NaiveDate::from_ymd_res(2009, 1, 14)?, "Makar Sankranti / Pongal", @@ -487,14 +488,14 @@ pub fn build( (NaiveDate::from_ymd_res(2009, 12, 25)?, "Christmas Day"), ], &mut map, - Country::IN, - "India", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2010, - vec![ + [ ( NaiveDate::from_ymd_res(2010, 1, 14)?, "Makar Sankranti / Pongal", @@ -533,14 +534,14 @@ pub fn build( (NaiveDate::from_ymd_res(2010, 12, 25)?, "Christmas Day"), ], &mut map, - Country::IN, - "India", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2011, - vec![ + [ ( NaiveDate::from_ymd_res(2011, 1, 14)?, "Makar Sankranti / Pongal", @@ -579,14 +580,14 @@ pub fn build( (NaiveDate::from_ymd_res(2011, 12, 25)?, "Christmas Day"), ], &mut map, - Country::IN, - "India", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2012, - vec![ + [ ( NaiveDate::from_ymd_res(2012, 1, 14)?, "Makar Sankranti / Pongal", @@ -625,14 +626,14 @@ pub fn build( (NaiveDate::from_ymd_res(2012, 12, 25)?, "Christmas Day"), ], &mut map, - Country::IN, - "India", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2013, - vec![ + [ ( NaiveDate::from_ymd_res(2013, 1, 14)?, "Makar Sankranti / Pongal", @@ -671,14 +672,14 @@ pub fn build( (NaiveDate::from_ymd_res(2013, 12, 25)?, "Christmas Day"), ], &mut map, - Country::IN, - "India", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2014, - vec![ + [ ( NaiveDate::from_ymd_res(2014, 1, 14)?, "Makar Sankranti / Pongal", @@ -717,14 +718,14 @@ pub fn build( (NaiveDate::from_ymd_res(2014, 12, 25)?, "Christmas Day"), ], &mut map, - Country::IN, - "India", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2015, - vec![ + [ ( NaiveDate::from_ymd_res(2015, 1, 14)?, "Makar Sankranti / Pongal", @@ -764,14 +765,14 @@ pub fn build( (NaiveDate::from_ymd_res(2015, 12, 25)?, "Christmas Day"), ], &mut map, - Country::IN, - "India", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2016, - vec![ + [ ( NaiveDate::from_ymd_res(2016, 1, 14)?, "Makar Sankranti / Pongal", @@ -810,14 +811,14 @@ pub fn build( (NaiveDate::from_ymd_res(2016, 12, 25)?, "Christmas Day"), ], &mut map, - Country::IN, - "India", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2017, - vec![ + [ ( NaiveDate::from_ymd_res(2017, 1, 14)?, "Makar Sankranti / Pongal", @@ -856,14 +857,14 @@ pub fn build( (NaiveDate::from_ymd_res(2017, 12, 25)?, "Christmas Day"), ], &mut map, - Country::IN, - "India", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2018, - vec![ + [ ( NaiveDate::from_ymd_res(2018, 1, 14)?, "Makar Sankranti / Pongal", @@ -902,14 +903,14 @@ pub fn build( (NaiveDate::from_ymd_res(2018, 12, 25)?, "Christmas Day"), ], &mut map, - Country::IN, - "India", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2019, - vec![ + [ ( NaiveDate::from_ymd_res(2019, 1, 14)?, "Makar Sankranti / Pongal", @@ -948,14 +949,14 @@ pub fn build( (NaiveDate::from_ymd_res(2019, 12, 25)?, "Christmas Day"), ], &mut map, - Country::IN, - "India", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2020, - vec![ + [ ( NaiveDate::from_ymd_res(2020, 1, 14)?, "Makar Sankranti / Pongal", @@ -994,14 +995,14 @@ pub fn build( (NaiveDate::from_ymd_res(2020, 12, 25)?, "Christmas Day"), ], &mut map, - Country::IN, - "India", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2021, - vec![ + [ ( NaiveDate::from_ymd_res(2021, 1, 14)?, "Makar Sankranti / Pongal", @@ -1040,14 +1041,14 @@ pub fn build( (NaiveDate::from_ymd_res(2021, 12, 25)?, "Christmas Day"), ], &mut map, - Country::IN, - "India", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2022, - vec![ + [ ( NaiveDate::from_ymd_res(2022, 1, 14)?, "Makar Sankranti / Pongal", @@ -1086,14 +1087,14 @@ pub fn build( (NaiveDate::from_ymd_res(2022, 12, 25)?, "Christmas Day"), ], &mut map, - Country::IN, - "India", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2023, - vec![ + [ ( NaiveDate::from_ymd_res(2023, 1, 14)?, "Makar Sankranti / Pongal", @@ -1132,14 +1133,14 @@ pub fn build( (NaiveDate::from_ymd_res(2023, 12, 25)?, "Christmas Day"), ], &mut map, - Country::IN, - "India", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2024, - vec![ + [ ( NaiveDate::from_ymd_res(2024, 1, 14)?, "Makar Sankranti / Pongal", @@ -1178,14 +1179,14 @@ pub fn build( (NaiveDate::from_ymd_res(2024, 12, 25)?, "Christmas Day"), ], &mut map, - Country::IN, - "India", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2025, - vec![ + [ ( NaiveDate::from_ymd_res(2025, 1, 14)?, "Makar Sankranti / Pongal", @@ -1224,14 +1225,14 @@ pub fn build( (NaiveDate::from_ymd_res(2025, 12, 25)?, "Christmas Day"), ], &mut map, - Country::IN, - "India", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2026, - vec![ + [ ( NaiveDate::from_ymd_res(2026, 1, 14)?, "Makar Sankranti / Pongal", @@ -1270,14 +1271,14 @@ pub fn build( (NaiveDate::from_ymd_res(2026, 12, 25)?, "Christmas Day"), ], &mut map, - Country::IN, - "India", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2027, - vec![ + [ ( NaiveDate::from_ymd_res(2027, 1, 14)?, "Makar Sankranti / Pongal", @@ -1315,14 +1316,14 @@ pub fn build( (NaiveDate::from_ymd_res(2027, 12, 25)?, "Christmas Day"), ], &mut map, - Country::IN, - "India", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2028, - vec![ + [ ( NaiveDate::from_ymd_res(2028, 1, 14)?, "Makar Sankranti / Pongal", @@ -1361,14 +1362,14 @@ pub fn build( (NaiveDate::from_ymd_res(2028, 12, 25)?, "Christmas Day"), ], &mut map, - Country::IN, - "India", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2029, - vec![ + [ ( NaiveDate::from_ymd_res(2029, 1, 14)?, "Makar Sankranti / Pongal", @@ -1407,14 +1408,14 @@ pub fn build( (NaiveDate::from_ymd_res(2029, 12, 25)?, "Christmas Day"), ], &mut map, - Country::IN, - "India", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2030, - vec![ + [ ( NaiveDate::from_ymd_res(2030, 1, 14)?, "Makar Sankranti / Pongal", @@ -1452,8 +1453,8 @@ pub fn build( (NaiveDate::from_ymd_res(2030, 12, 25)?, "Christmas Day"), ], &mut map, - Country::IN, - "India", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/is.rs b/src/data/is.rs index e31401e..13074b1 100644 --- a/src/data/is.rs +++ b/src/data/is.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Iceland"; +const COUNTY_CODE: Country = Country::IS; + /// Generate holiday map for Iceland. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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)?, @@ -41,14 +42,14 @@ pub fn build( (NaiveDate::from_ymd_res(2000, 12, 31)?, "Gamlársdagur"), ], &mut map, - Country::IS, - "Iceland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -73,14 +74,14 @@ pub fn build( (NaiveDate::from_ymd_res(2001, 12, 31)?, "Gamlársdagur"), ], &mut map, - Country::IS, - "Iceland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -105,14 +106,14 @@ pub fn build( (NaiveDate::from_ymd_res(2002, 12, 31)?, "Gamlársdagur"), ], &mut map, - Country::IS, - "Iceland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -137,14 +138,14 @@ pub fn build( (NaiveDate::from_ymd_res(2003, 12, 31)?, "Gamlársdagur"), ], &mut map, - Country::IS, - "Iceland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -169,14 +170,14 @@ pub fn build( (NaiveDate::from_ymd_res(2004, 12, 31)?, "Gamlársdagur"), ], &mut map, - Country::IS, - "Iceland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -201,14 +202,14 @@ pub fn build( (NaiveDate::from_ymd_res(2005, 12, 31)?, "Gamlársdagur"), ], &mut map, - Country::IS, - "Iceland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -233,14 +234,14 @@ pub fn build( (NaiveDate::from_ymd_res(2006, 12, 31)?, "Gamlársdagur"), ], &mut map, - Country::IS, - "Iceland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -265,14 +266,14 @@ pub fn build( (NaiveDate::from_ymd_res(2007, 12, 31)?, "Gamlársdagur"), ], &mut map, - Country::IS, - "Iceland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -299,14 +300,14 @@ pub fn build( (NaiveDate::from_ymd_res(2008, 12, 31)?, "Gamlársdagur"), ], &mut map, - Country::IS, - "Iceland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -331,14 +332,14 @@ pub fn build( (NaiveDate::from_ymd_res(2009, 12, 31)?, "Gamlársdagur"), ], &mut map, - Country::IS, - "Iceland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -363,14 +364,14 @@ pub fn build( (NaiveDate::from_ymd_res(2010, 12, 31)?, "Gamlársdagur"), ], &mut map, - Country::IS, - "Iceland", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2011, - vec![ + [ (NaiveDate::from_ymd_res(2011, 1, 1)?, "Nýársdagur"), ( NaiveDate::from_ymd_res(2011, 4, 21)?, @@ -394,14 +395,14 @@ pub fn build( (NaiveDate::from_ymd_res(2011, 12, 31)?, "Gamlársdagur"), ], &mut map, - Country::IS, - "Iceland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -426,14 +427,14 @@ pub fn build( (NaiveDate::from_ymd_res(2012, 12, 31)?, "Gamlársdagur"), ], &mut map, - Country::IS, - "Iceland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -458,14 +459,14 @@ pub fn build( (NaiveDate::from_ymd_res(2013, 12, 31)?, "Gamlársdagur"), ], &mut map, - Country::IS, - "Iceland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -490,14 +491,14 @@ pub fn build( (NaiveDate::from_ymd_res(2014, 12, 31)?, "Gamlársdagur"), ], &mut map, - Country::IS, - "Iceland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -522,14 +523,14 @@ pub fn build( (NaiveDate::from_ymd_res(2015, 12, 31)?, "Gamlársdagur"), ], &mut map, - Country::IS, - "Iceland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -554,14 +555,14 @@ pub fn build( (NaiveDate::from_ymd_res(2016, 12, 31)?, "Gamlársdagur"), ], &mut map, - Country::IS, - "Iceland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -586,14 +587,14 @@ pub fn build( (NaiveDate::from_ymd_res(2017, 12, 31)?, "Gamlársdagur"), ], &mut map, - Country::IS, - "Iceland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -618,14 +619,14 @@ pub fn build( (NaiveDate::from_ymd_res(2018, 12, 31)?, "Gamlársdagur"), ], &mut map, - Country::IS, - "Iceland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -650,14 +651,14 @@ pub fn build( (NaiveDate::from_ymd_res(2019, 12, 31)?, "Gamlársdagur"), ], &mut map, - Country::IS, - "Iceland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -682,14 +683,14 @@ pub fn build( (NaiveDate::from_ymd_res(2020, 12, 31)?, "Gamlársdagur"), ], &mut map, - Country::IS, - "Iceland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -714,14 +715,14 @@ pub fn build( (NaiveDate::from_ymd_res(2021, 12, 31)?, "Gamlársdagur"), ], &mut map, - Country::IS, - "Iceland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -746,14 +747,14 @@ pub fn build( (NaiveDate::from_ymd_res(2022, 12, 31)?, "Gamlársdagur"), ], &mut map, - Country::IS, - "Iceland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -778,14 +779,14 @@ pub fn build( (NaiveDate::from_ymd_res(2023, 12, 31)?, "Gamlársdagur"), ], &mut map, - Country::IS, - "Iceland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -810,14 +811,14 @@ pub fn build( (NaiveDate::from_ymd_res(2024, 12, 31)?, "Gamlársdagur"), ], &mut map, - Country::IS, - "Iceland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -842,14 +843,14 @@ pub fn build( (NaiveDate::from_ymd_res(2025, 12, 31)?, "Gamlársdagur"), ], &mut map, - Country::IS, - "Iceland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -874,14 +875,14 @@ pub fn build( (NaiveDate::from_ymd_res(2026, 12, 31)?, "Gamlársdagur"), ], &mut map, - Country::IS, - "Iceland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -906,14 +907,14 @@ pub fn build( (NaiveDate::from_ymd_res(2027, 12, 31)?, "Gamlársdagur"), ], &mut map, - Country::IS, - "Iceland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -938,14 +939,14 @@ pub fn build( (NaiveDate::from_ymd_res(2028, 12, 31)?, "Gamlársdagur"), ], &mut map, - Country::IS, - "Iceland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -970,14 +971,14 @@ pub fn build( (NaiveDate::from_ymd_res(2029, 12, 31)?, "Gamlársdagur"), ], &mut map, - Country::IS, - "Iceland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1002,8 +1003,8 @@ pub fn build( (NaiveDate::from_ymd_res(2030, 12, 31)?, "Gamlársdagur"), ], &mut map, - Country::IS, - "Iceland", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/it.rs b/src/data/it.rs index 1151395..cfd11fe 100644 --- a/src/data/it.rs +++ b/src/data/it.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Italy"; +const COUNTY_CODE: Country = Country::IT; + /// Generate holiday map for Italy. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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"), ( @@ -47,14 +48,14 @@ pub fn build( (NaiveDate::from_ymd_res(2000, 12, 26)?, "Santo Stefano"), ], &mut map, - Country::IT, - "Italy", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2001, - vec![ + [ (NaiveDate::from_ymd_res(2001, 1, 1)?, "Capodanno"), (NaiveDate::from_ymd_res(2001, 1, 6)?, "Epifania del Signore"), ( @@ -84,14 +85,14 @@ pub fn build( (NaiveDate::from_ymd_res(2001, 12, 26)?, "Santo Stefano"), ], &mut map, - Country::IT, - "Italy", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2002, - vec![ + [ (NaiveDate::from_ymd_res(2002, 1, 1)?, "Capodanno"), (NaiveDate::from_ymd_res(2002, 1, 6)?, "Epifania del Signore"), ( @@ -121,14 +122,14 @@ pub fn build( (NaiveDate::from_ymd_res(2002, 12, 26)?, "Santo Stefano"), ], &mut map, - Country::IT, - "Italy", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2003, - vec![ + [ (NaiveDate::from_ymd_res(2003, 1, 1)?, "Capodanno"), (NaiveDate::from_ymd_res(2003, 1, 6)?, "Epifania del Signore"), ( @@ -158,14 +159,14 @@ pub fn build( (NaiveDate::from_ymd_res(2003, 12, 26)?, "Santo Stefano"), ], &mut map, - Country::IT, - "Italy", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2004, - vec![ + [ (NaiveDate::from_ymd_res(2004, 1, 1)?, "Capodanno"), (NaiveDate::from_ymd_res(2004, 1, 6)?, "Epifania del Signore"), ( @@ -195,14 +196,14 @@ pub fn build( (NaiveDate::from_ymd_res(2004, 12, 26)?, "Santo Stefano"), ], &mut map, - Country::IT, - "Italy", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2005, - vec![ + [ (NaiveDate::from_ymd_res(2005, 1, 1)?, "Capodanno"), (NaiveDate::from_ymd_res(2005, 1, 6)?, "Epifania del Signore"), ( @@ -232,14 +233,14 @@ pub fn build( (NaiveDate::from_ymd_res(2005, 12, 26)?, "Santo Stefano"), ], &mut map, - Country::IT, - "Italy", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2006, - vec![ + [ (NaiveDate::from_ymd_res(2006, 1, 1)?, "Capodanno"), (NaiveDate::from_ymd_res(2006, 1, 6)?, "Epifania del Signore"), ( @@ -269,14 +270,14 @@ pub fn build( (NaiveDate::from_ymd_res(2006, 12, 26)?, "Santo Stefano"), ], &mut map, - Country::IT, - "Italy", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2007, - vec![ + [ (NaiveDate::from_ymd_res(2007, 1, 1)?, "Capodanno"), (NaiveDate::from_ymd_res(2007, 1, 6)?, "Epifania del Signore"), ( @@ -306,14 +307,14 @@ pub fn build( (NaiveDate::from_ymd_res(2007, 12, 26)?, "Santo Stefano"), ], &mut map, - Country::IT, - "Italy", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2008, - vec![ + [ (NaiveDate::from_ymd_res(2008, 1, 1)?, "Capodanno"), (NaiveDate::from_ymd_res(2008, 1, 6)?, "Epifania del Signore"), ( @@ -343,14 +344,14 @@ pub fn build( (NaiveDate::from_ymd_res(2008, 12, 26)?, "Santo Stefano"), ], &mut map, - Country::IT, - "Italy", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2009, - vec![ + [ (NaiveDate::from_ymd_res(2009, 1, 1)?, "Capodanno"), (NaiveDate::from_ymd_res(2009, 1, 6)?, "Epifania del Signore"), ( @@ -380,14 +381,14 @@ pub fn build( (NaiveDate::from_ymd_res(2009, 12, 26)?, "Santo Stefano"), ], &mut map, - Country::IT, - "Italy", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2010, - vec![ + [ (NaiveDate::from_ymd_res(2010, 1, 1)?, "Capodanno"), (NaiveDate::from_ymd_res(2010, 1, 6)?, "Epifania del Signore"), ( @@ -417,14 +418,14 @@ pub fn build( (NaiveDate::from_ymd_res(2010, 12, 26)?, "Santo Stefano"), ], &mut map, - Country::IT, - "Italy", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2011, - vec![ + [ (NaiveDate::from_ymd_res(2011, 1, 1)?, "Capodanno"), (NaiveDate::from_ymd_res(2011, 1, 6)?, "Epifania del Signore"), ( @@ -457,14 +458,14 @@ pub fn build( ), ], &mut map, - Country::IT, - "Italy", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2012, - vec![ + [ (NaiveDate::from_ymd_res(2012, 1, 1)?, "Capodanno"), (NaiveDate::from_ymd_res(2012, 1, 6)?, "Epifania del Signore"), ( @@ -494,14 +495,14 @@ pub fn build( (NaiveDate::from_ymd_res(2012, 12, 26)?, "Santo Stefano"), ], &mut map, - Country::IT, - "Italy", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2013, - vec![ + [ (NaiveDate::from_ymd_res(2013, 1, 1)?, "Capodanno"), (NaiveDate::from_ymd_res(2013, 1, 6)?, "Epifania del Signore"), ( @@ -531,14 +532,14 @@ pub fn build( (NaiveDate::from_ymd_res(2013, 12, 26)?, "Santo Stefano"), ], &mut map, - Country::IT, - "Italy", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2014, - vec![ + [ (NaiveDate::from_ymd_res(2014, 1, 1)?, "Capodanno"), (NaiveDate::from_ymd_res(2014, 1, 6)?, "Epifania del Signore"), ( @@ -568,14 +569,14 @@ pub fn build( (NaiveDate::from_ymd_res(2014, 12, 26)?, "Santo Stefano"), ], &mut map, - Country::IT, - "Italy", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2015, - vec![ + [ (NaiveDate::from_ymd_res(2015, 1, 1)?, "Capodanno"), (NaiveDate::from_ymd_res(2015, 1, 6)?, "Epifania del Signore"), ( @@ -605,14 +606,14 @@ pub fn build( (NaiveDate::from_ymd_res(2015, 12, 26)?, "Santo Stefano"), ], &mut map, - Country::IT, - "Italy", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2016, - vec![ + [ (NaiveDate::from_ymd_res(2016, 1, 1)?, "Capodanno"), (NaiveDate::from_ymd_res(2016, 1, 6)?, "Epifania del Signore"), ( @@ -642,14 +643,14 @@ pub fn build( (NaiveDate::from_ymd_res(2016, 12, 26)?, "Santo Stefano"), ], &mut map, - Country::IT, - "Italy", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2017, - vec![ + [ (NaiveDate::from_ymd_res(2017, 1, 1)?, "Capodanno"), (NaiveDate::from_ymd_res(2017, 1, 6)?, "Epifania del Signore"), ( @@ -679,14 +680,14 @@ pub fn build( (NaiveDate::from_ymd_res(2017, 12, 26)?, "Santo Stefano"), ], &mut map, - Country::IT, - "Italy", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2018, - vec![ + [ (NaiveDate::from_ymd_res(2018, 1, 1)?, "Capodanno"), (NaiveDate::from_ymd_res(2018, 1, 6)?, "Epifania del Signore"), ( @@ -716,14 +717,14 @@ pub fn build( (NaiveDate::from_ymd_res(2018, 12, 26)?, "Santo Stefano"), ], &mut map, - Country::IT, - "Italy", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2019, - vec![ + [ (NaiveDate::from_ymd_res(2019, 1, 1)?, "Capodanno"), (NaiveDate::from_ymd_res(2019, 1, 6)?, "Epifania del Signore"), ( @@ -753,14 +754,14 @@ pub fn build( (NaiveDate::from_ymd_res(2019, 12, 26)?, "Santo Stefano"), ], &mut map, - Country::IT, - "Italy", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2020, - vec![ + [ (NaiveDate::from_ymd_res(2020, 1, 1)?, "Capodanno"), (NaiveDate::from_ymd_res(2020, 1, 6)?, "Epifania del Signore"), ( @@ -790,14 +791,14 @@ pub fn build( (NaiveDate::from_ymd_res(2020, 12, 26)?, "Santo Stefano"), ], &mut map, - Country::IT, - "Italy", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2021, - vec![ + [ (NaiveDate::from_ymd_res(2021, 1, 1)?, "Capodanno"), (NaiveDate::from_ymd_res(2021, 1, 6)?, "Epifania del Signore"), ( @@ -827,14 +828,14 @@ pub fn build( (NaiveDate::from_ymd_res(2021, 12, 26)?, "Santo Stefano"), ], &mut map, - Country::IT, - "Italy", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2022, - vec![ + [ (NaiveDate::from_ymd_res(2022, 1, 1)?, "Capodanno"), (NaiveDate::from_ymd_res(2022, 1, 6)?, "Epifania del Signore"), ( @@ -864,14 +865,14 @@ pub fn build( (NaiveDate::from_ymd_res(2022, 12, 26)?, "Santo Stefano"), ], &mut map, - Country::IT, - "Italy", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2023, - vec![ + [ (NaiveDate::from_ymd_res(2023, 1, 1)?, "Capodanno"), (NaiveDate::from_ymd_res(2023, 1, 6)?, "Epifania del Signore"), ( @@ -901,14 +902,14 @@ pub fn build( (NaiveDate::from_ymd_res(2023, 12, 26)?, "Santo Stefano"), ], &mut map, - Country::IT, - "Italy", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2024, - vec![ + [ (NaiveDate::from_ymd_res(2024, 1, 1)?, "Capodanno"), (NaiveDate::from_ymd_res(2024, 1, 6)?, "Epifania del Signore"), ( @@ -938,14 +939,14 @@ pub fn build( (NaiveDate::from_ymd_res(2024, 12, 26)?, "Santo Stefano"), ], &mut map, - Country::IT, - "Italy", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2025, - vec![ + [ (NaiveDate::from_ymd_res(2025, 1, 1)?, "Capodanno"), (NaiveDate::from_ymd_res(2025, 1, 6)?, "Epifania del Signore"), ( @@ -975,14 +976,14 @@ pub fn build( (NaiveDate::from_ymd_res(2025, 12, 26)?, "Santo Stefano"), ], &mut map, - Country::IT, - "Italy", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2026, - vec![ + [ (NaiveDate::from_ymd_res(2026, 1, 1)?, "Capodanno"), (NaiveDate::from_ymd_res(2026, 1, 6)?, "Epifania del Signore"), ( @@ -1012,14 +1013,14 @@ pub fn build( (NaiveDate::from_ymd_res(2026, 12, 26)?, "Santo Stefano"), ], &mut map, - Country::IT, - "Italy", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2027, - vec![ + [ (NaiveDate::from_ymd_res(2027, 1, 1)?, "Capodanno"), (NaiveDate::from_ymd_res(2027, 1, 6)?, "Epifania del Signore"), ( @@ -1049,14 +1050,14 @@ pub fn build( (NaiveDate::from_ymd_res(2027, 12, 26)?, "Santo Stefano"), ], &mut map, - Country::IT, - "Italy", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2028, - vec![ + [ (NaiveDate::from_ymd_res(2028, 1, 1)?, "Capodanno"), (NaiveDate::from_ymd_res(2028, 1, 6)?, "Epifania del Signore"), ( @@ -1086,14 +1087,14 @@ pub fn build( (NaiveDate::from_ymd_res(2028, 12, 26)?, "Santo Stefano"), ], &mut map, - Country::IT, - "Italy", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2029, - vec![ + [ (NaiveDate::from_ymd_res(2029, 1, 1)?, "Capodanno"), (NaiveDate::from_ymd_res(2029, 1, 6)?, "Epifania del Signore"), ( @@ -1123,14 +1124,14 @@ pub fn build( (NaiveDate::from_ymd_res(2029, 12, 26)?, "Santo Stefano"), ], &mut map, - Country::IT, - "Italy", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2030, - vec![ + [ (NaiveDate::from_ymd_res(2030, 1, 1)?, "Capodanno"), (NaiveDate::from_ymd_res(2030, 1, 6)?, "Epifania del Signore"), ( @@ -1160,8 +1161,8 @@ pub fn build( (NaiveDate::from_ymd_res(2030, 12, 26)?, "Santo Stefano"), ], &mut map, - Country::IT, - "Italy", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/jm.rs b/src/data/jm.rs index da6baf5..0755057 100644 --- a/src/data/jm.rs +++ b/src/data/jm.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Jamaica"; +const COUNTY_CODE: Country = Country::JM; + /// Generate holiday map for Jamaica. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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"), @@ -37,14 +38,14 @@ pub fn build( (NaiveDate::from_ymd_res(2000, 12, 26)?, "Boxing Day"), ], &mut map, - Country::JM, - "Jamaica", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -60,14 +61,14 @@ pub fn build( (NaiveDate::from_ymd_res(2001, 12, 26)?, "Boxing Day"), ], &mut map, - Country::JM, - "Jamaica", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -83,14 +84,14 @@ pub fn build( (NaiveDate::from_ymd_res(2002, 12, 26)?, "Boxing Day"), ], &mut map, - Country::JM, - "Jamaica", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -106,14 +107,14 @@ pub fn build( (NaiveDate::from_ymd_res(2003, 12, 26)?, "Boxing Day"), ], &mut map, - Country::JM, - "Jamaica", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -141,14 +142,14 @@ pub fn build( ), ], &mut map, - Country::JM, - "Jamaica", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -168,14 +169,14 @@ pub fn build( (NaiveDate::from_ymd_res(2005, 12, 26)?, "Boxing Day"), ], &mut map, - Country::JM, - "Jamaica", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2006, - vec![ + [ (NaiveDate::from_ymd_res(2006, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2006, 1, 2)?, @@ -199,14 +200,14 @@ pub fn build( (NaiveDate::from_ymd_res(2006, 12, 26)?, "Boxing Day"), ], &mut map, - Country::JM, - "Jamaica", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -222,14 +223,14 @@ pub fn build( (NaiveDate::from_ymd_res(2007, 12, 26)?, "Boxing Day"), ], &mut map, - Country::JM, - "Jamaica", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -245,14 +246,14 @@ pub fn build( (NaiveDate::from_ymd_res(2008, 12, 26)?, "Boxing Day"), ], &mut map, - Country::JM, - "Jamaica", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -272,14 +273,14 @@ pub fn build( (NaiveDate::from_ymd_res(2009, 12, 26)?, "Boxing Day"), ], &mut map, - Country::JM, - "Jamaica", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -307,14 +308,14 @@ pub fn build( ), ], &mut map, - Country::JM, - "Jamaica", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -334,14 +335,14 @@ pub fn build( (NaiveDate::from_ymd_res(2011, 12, 26)?, "Boxing Day"), ], &mut map, - Country::JM, - "Jamaica", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2012, - vec![ + [ (NaiveDate::from_ymd_res(2012, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2012, 1, 2)?, @@ -361,14 +362,14 @@ pub fn build( (NaiveDate::from_ymd_res(2012, 12, 26)?, "Boxing Day"), ], &mut map, - Country::JM, - "Jamaica", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -384,14 +385,14 @@ pub fn build( (NaiveDate::from_ymd_res(2013, 12, 26)?, "Boxing Day"), ], &mut map, - Country::JM, - "Jamaica", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -407,14 +408,14 @@ pub fn build( (NaiveDate::from_ymd_res(2014, 12, 26)?, "Boxing Day"), ], &mut map, - Country::JM, - "Jamaica", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -434,14 +435,14 @@ pub fn build( (NaiveDate::from_ymd_res(2015, 12, 26)?, "Boxing Day"), ], &mut map, - Country::JM, - "Jamaica", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -461,14 +462,14 @@ pub fn build( (NaiveDate::from_ymd_res(2016, 12, 26)?, "Boxing Day"), ], &mut map, - Country::JM, - "Jamaica", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2017, - vec![ + [ (NaiveDate::from_ymd_res(2017, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2017, 1, 2)?, @@ -492,14 +493,14 @@ pub fn build( (NaiveDate::from_ymd_res(2017, 12, 26)?, "Boxing Day"), ], &mut map, - Country::JM, - "Jamaica", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -515,14 +516,14 @@ pub fn build( (NaiveDate::from_ymd_res(2018, 12, 26)?, "Boxing Day"), ], &mut map, - Country::JM, - "Jamaica", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -538,14 +539,14 @@ pub fn build( (NaiveDate::from_ymd_res(2019, 12, 26)?, "Boxing Day"), ], &mut map, - Country::JM, - "Jamaica", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -565,14 +566,14 @@ pub fn build( (NaiveDate::from_ymd_res(2020, 12, 26)?, "Boxing Day"), ], &mut map, - Country::JM, - "Jamaica", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -600,14 +601,14 @@ pub fn build( ), ], &mut map, - Country::JM, - "Jamaica", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -627,14 +628,14 @@ pub fn build( (NaiveDate::from_ymd_res(2022, 12, 26)?, "Boxing Day"), ], &mut map, - Country::JM, - "Jamaica", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2023, - vec![ + [ (NaiveDate::from_ymd_res(2023, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2023, 1, 2)?, @@ -658,14 +659,14 @@ pub fn build( (NaiveDate::from_ymd_res(2023, 12, 26)?, "Boxing Day"), ], &mut map, - Country::JM, - "Jamaica", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -681,14 +682,14 @@ pub fn build( (NaiveDate::from_ymd_res(2024, 12, 26)?, "Boxing Day"), ], &mut map, - Country::JM, - "Jamaica", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -704,14 +705,14 @@ pub fn build( (NaiveDate::from_ymd_res(2025, 12, 26)?, "Boxing Day"), ], &mut map, - Country::JM, - "Jamaica", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -731,14 +732,14 @@ pub fn build( (NaiveDate::from_ymd_res(2026, 12, 26)?, "Boxing Day"), ], &mut map, - Country::JM, - "Jamaica", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -766,14 +767,14 @@ pub fn build( ), ], &mut map, - Country::JM, - "Jamaica", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -793,14 +794,14 @@ pub fn build( (NaiveDate::from_ymd_res(2028, 12, 26)?, "Boxing Day"), ], &mut map, - Country::JM, - "Jamaica", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -816,14 +817,14 @@ pub fn build( (NaiveDate::from_ymd_res(2029, 12, 26)?, "Boxing Day"), ], &mut map, - Country::JM, - "Jamaica", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -839,8 +840,8 @@ pub fn build( (NaiveDate::from_ymd_res(2030, 12, 26)?, "Boxing Day"), ], &mut map, - Country::JM, - "Jamaica", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/jp.rs b/src/data/jp.rs index a64a65d..134d409 100644 --- a/src/data/jp.rs +++ b/src/data/jp.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Japan"; +const COUNTY_CODE: Country = Country::JP; + /// Generate holiday map for Japan. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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)?, "建国記念の日"), @@ -35,14 +36,14 @@ pub fn build( (NaiveDate::from_ymd_res(2000, 5, 4)?, "国民の休日"), ], &mut map, - Country::JP, - "Japan", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "建国記念の日"), @@ -64,14 +65,14 @@ pub fn build( (NaiveDate::from_ymd_res(2001, 5, 4)?, "国民の休日"), ], &mut map, - Country::JP, - "Japan", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "建国記念の日"), @@ -92,14 +93,14 @@ pub fn build( (NaiveDate::from_ymd_res(2002, 5, 4)?, "国民の休日"), ], &mut map, - Country::JP, - "Japan", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "建国記念の日"), @@ -117,14 +118,14 @@ pub fn build( (NaiveDate::from_ymd_res(2003, 11, 24)?, "振替休日"), ], &mut map, - Country::JP, - "Japan", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "建国記念の日"), @@ -142,14 +143,14 @@ pub fn build( (NaiveDate::from_ymd_res(2004, 5, 4)?, "国民の休日"), ], &mut map, - Country::JP, - "Japan", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "建国記念の日"), @@ -168,14 +169,14 @@ pub fn build( (NaiveDate::from_ymd_res(2005, 5, 4)?, "国民の休日"), ], &mut map, - Country::JP, - "Japan", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "建国記念の日"), @@ -194,14 +195,14 @@ pub fn build( (NaiveDate::from_ymd_res(2006, 5, 4)?, "国民の休日"), ], &mut map, - Country::JP, - "Japan", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "建国記念の日"), @@ -223,14 +224,14 @@ pub fn build( (NaiveDate::from_ymd_res(2007, 12, 24)?, "振替休日"), ], &mut map, - Country::JP, - "Japan", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "建国記念の日"), @@ -250,14 +251,14 @@ pub fn build( (NaiveDate::from_ymd_res(2008, 11, 24)?, "振替休日"), ], &mut map, - Country::JP, - "Japan", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "建国記念の日"), @@ -277,14 +278,14 @@ pub fn build( (NaiveDate::from_ymd_res(2009, 9, 22)?, "国民の休日"), ], &mut map, - Country::JP, - "Japan", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "建国記念の日"), @@ -303,14 +304,14 @@ pub fn build( (NaiveDate::from_ymd_res(2010, 3, 22)?, "振替休日"), ], &mut map, - Country::JP, - "Japan", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "建国記念の日"), @@ -328,14 +329,14 @@ pub fn build( (NaiveDate::from_ymd_res(2011, 12, 23)?, "天皇誕生日"), ], &mut map, - Country::JP, - "Japan", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "建国記念の日"), @@ -356,14 +357,14 @@ pub fn build( (NaiveDate::from_ymd_res(2012, 12, 24)?, "振替休日"), ], &mut map, - Country::JP, - "Japan", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "建国記念の日"), @@ -383,14 +384,14 @@ pub fn build( (NaiveDate::from_ymd_res(2013, 11, 4)?, "振替休日"), ], &mut map, - Country::JP, - "Japan", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "建国記念の日"), @@ -410,14 +411,14 @@ pub fn build( (NaiveDate::from_ymd_res(2014, 11, 24)?, "振替休日"), ], &mut map, - Country::JP, - "Japan", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "建国記念の日"), @@ -437,14 +438,14 @@ pub fn build( (NaiveDate::from_ymd_res(2015, 9, 22)?, "国民の休日"), ], &mut map, - Country::JP, - "Japan", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "建国記念の日"), @@ -464,14 +465,14 @@ pub fn build( (NaiveDate::from_ymd_res(2016, 3, 21)?, "振替休日"), ], &mut map, - Country::JP, - "Japan", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "建国記念の日"), @@ -491,14 +492,14 @@ pub fn build( (NaiveDate::from_ymd_res(2017, 1, 2)?, "振替休日"), ], &mut map, - Country::JP, - "Japan", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "建国記念の日"), @@ -521,14 +522,14 @@ pub fn build( (NaiveDate::from_ymd_res(2018, 12, 24)?, "振替休日"), ], &mut map, - Country::JP, - "Japan", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "建国記念の日"), @@ -556,14 +557,14 @@ pub fn build( (NaiveDate::from_ymd_res(2019, 5, 2)?, "国民の休日"), ], &mut map, - Country::JP, - "Japan", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "建国記念の日"), @@ -584,14 +585,14 @@ pub fn build( (NaiveDate::from_ymd_res(2020, 5, 6)?, "振替休日"), ], &mut map, - Country::JP, - "Japan", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "建国記念の日"), @@ -611,14 +612,14 @@ pub fn build( (NaiveDate::from_ymd_res(2021, 8, 9)?, "振替休日"), ], &mut map, - Country::JP, - "Japan", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "建国記念の日"), @@ -637,14 +638,14 @@ pub fn build( (NaiveDate::from_ymd_res(2022, 11, 23)?, "勤労感謝の日"), ], &mut map, - Country::JP, - "Japan", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "建国記念の日"), @@ -664,14 +665,14 @@ pub fn build( (NaiveDate::from_ymd_res(2023, 1, 2)?, "振替休日"), ], &mut map, - Country::JP, - "Japan", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "建国記念の日"), @@ -695,14 +696,14 @@ pub fn build( (NaiveDate::from_ymd_res(2024, 11, 4)?, "振替休日"), ], &mut map, - Country::JP, - "Japan", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "建国記念の日"), @@ -724,14 +725,14 @@ pub fn build( (NaiveDate::from_ymd_res(2025, 11, 24)?, "振替休日"), ], &mut map, - Country::JP, - "Japan", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "建国記念の日"), @@ -752,14 +753,14 @@ pub fn build( (NaiveDate::from_ymd_res(2026, 9, 22)?, "国民の休日"), ], &mut map, - Country::JP, - "Japan", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "建国記念の日"), @@ -779,14 +780,14 @@ pub fn build( (NaiveDate::from_ymd_res(2027, 3, 22)?, "振替休日"), ], &mut map, - Country::JP, - "Japan", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "建国記念の日"), @@ -805,14 +806,14 @@ pub fn build( (NaiveDate::from_ymd_res(2028, 11, 23)?, "勤労感謝の日"), ], &mut map, - Country::JP, - "Japan", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "建国記念の日"), @@ -834,14 +835,14 @@ pub fn build( (NaiveDate::from_ymd_res(2029, 9, 24)?, "振替休日"), ], &mut map, - Country::JP, - "Japan", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "建国記念の日"), @@ -863,8 +864,8 @@ pub fn build( (NaiveDate::from_ymd_res(2030, 11, 4)?, "振替休日"), ], &mut map, - Country::JP, - "Japan", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/ke.rs b/src/data/ke.rs index 0eaea8d..a0adef2 100644 --- a/src/data/ke.rs +++ b/src/data/ke.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Kenya"; +const COUNTY_CODE: Country = Country::KE; + /// Generate holiday map for Kenya. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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"), @@ -28,14 +29,14 @@ pub fn build( (NaiveDate::from_ymd_res(2000, 12, 26)?, "Boxing Day"), ], &mut map, - Country::KE, - "Kenya", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -46,14 +47,14 @@ pub fn build( (NaiveDate::from_ymd_res(2001, 12, 26)?, "Boxing Day"), ], &mut map, - Country::KE, - "Kenya", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -69,14 +70,14 @@ pub fn build( (NaiveDate::from_ymd_res(2002, 12, 26)?, "Boxing Day"), ], &mut map, - Country::KE, - "Kenya", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -88,14 +89,14 @@ pub fn build( (NaiveDate::from_ymd_res(2003, 12, 26)?, "Boxing Day"), ], &mut map, - Country::KE, - "Kenya", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -116,14 +117,14 @@ pub fn build( ), ], &mut map, - Country::KE, - "Kenya", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -143,14 +144,14 @@ pub fn build( (NaiveDate::from_ymd_res(2005, 12, 26)?, "Boxing Day"), ], &mut map, - Country::KE, - "Kenya", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2006, - vec![ + [ (NaiveDate::from_ymd_res(2006, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2006, 1, 2)?, @@ -166,14 +167,14 @@ pub fn build( (NaiveDate::from_ymd_res(2006, 12, 26)?, "Boxing Day"), ], &mut map, - Country::KE, - "Kenya", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -185,14 +186,14 @@ pub fn build( (NaiveDate::from_ymd_res(2007, 12, 26)?, "Boxing Day"), ], &mut map, - Country::KE, - "Kenya", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -204,14 +205,14 @@ pub fn build( (NaiveDate::from_ymd_res(2008, 12, 26)?, "Boxing Day"), ], &mut map, - Country::KE, - "Kenya", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -223,14 +224,14 @@ pub fn build( (NaiveDate::from_ymd_res(2009, 12, 26)?, "Boxing Day"), ], &mut map, - Country::KE, - "Kenya", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -250,14 +251,14 @@ pub fn build( ), ], &mut map, - Country::KE, - "Kenya", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -277,14 +278,14 @@ pub fn build( (NaiveDate::from_ymd_res(2011, 12, 26)?, "Boxing Day"), ], &mut map, - Country::KE, - "Kenya", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2012, - vec![ + [ (NaiveDate::from_ymd_res(2012, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2012, 1, 2)?, @@ -300,14 +301,14 @@ pub fn build( (NaiveDate::from_ymd_res(2012, 12, 26)?, "Boxing Day"), ], &mut map, - Country::KE, - "Kenya", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -323,14 +324,14 @@ pub fn build( (NaiveDate::from_ymd_res(2013, 12, 26)?, "Boxing Day"), ], &mut map, - Country::KE, - "Kenya", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -346,14 +347,14 @@ pub fn build( (NaiveDate::from_ymd_res(2014, 12, 26)?, "Boxing Day"), ], &mut map, - Country::KE, - "Kenya", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -365,14 +366,14 @@ pub fn build( (NaiveDate::from_ymd_res(2015, 12, 26)?, "Boxing Day"), ], &mut map, - Country::KE, - "Kenya", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -392,14 +393,14 @@ pub fn build( (NaiveDate::from_ymd_res(2016, 12, 26)?, "Boxing Day"), ], &mut map, - Country::KE, - "Kenya", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2017, - vec![ + [ (NaiveDate::from_ymd_res(2017, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2017, 1, 2)?, @@ -415,14 +416,14 @@ pub fn build( (NaiveDate::from_ymd_res(2017, 12, 26)?, "Boxing Day"), ], &mut map, - Country::KE, - "Kenya", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -435,14 +436,14 @@ pub fn build( (NaiveDate::from_ymd_res(2018, 12, 26)?, "Boxing Day"), ], &mut map, - Country::KE, - "Kenya", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -459,14 +460,14 @@ pub fn build( (NaiveDate::from_ymd_res(2019, 12, 26)?, "Boxing Day"), ], &mut map, - Country::KE, - "Kenya", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -483,14 +484,14 @@ pub fn build( ), ], &mut map, - Country::KE, - "Kenya", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -515,14 +516,14 @@ pub fn build( ), ], &mut map, - Country::KE, - "Kenya", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -561,14 +562,14 @@ pub fn build( (NaiveDate::from_ymd_res(2022, 9, 13)?, "Inauguration Day"), ], &mut map, - Country::KE, - "Kenya", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2023, - vec![ + [ (NaiveDate::from_ymd_res(2023, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2023, 1, 2)?, @@ -585,14 +586,14 @@ pub fn build( (NaiveDate::from_ymd_res(2023, 12, 26)?, "Boxing Day"), ], &mut map, - Country::KE, - "Kenya", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -609,14 +610,14 @@ pub fn build( (NaiveDate::from_ymd_res(2024, 12, 26)?, "Boxing Day"), ], &mut map, - Country::KE, - "Kenya", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -633,14 +634,14 @@ pub fn build( (NaiveDate::from_ymd_res(2025, 12, 26)?, "Boxing Day"), ], &mut map, - Country::KE, - "Kenya", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -653,14 +654,14 @@ pub fn build( (NaiveDate::from_ymd_res(2026, 12, 26)?, "Boxing Day"), ], &mut map, - Country::KE, - "Kenya", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -685,14 +686,14 @@ pub fn build( ), ], &mut map, - Country::KE, - "Kenya", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -705,14 +706,14 @@ pub fn build( (NaiveDate::from_ymd_res(2028, 12, 26)?, "Boxing Day"), ], &mut map, - Country::KE, - "Kenya", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -725,14 +726,14 @@ pub fn build( (NaiveDate::from_ymd_res(2029, 12, 26)?, "Boxing Day"), ], &mut map, - Country::KE, - "Kenya", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -749,8 +750,8 @@ pub fn build( (NaiveDate::from_ymd_res(2030, 12, 26)?, "Boxing Day"), ], &mut map, - Country::KE, - "Kenya", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/kr.rs b/src/data/kr.rs index 65eebb0..df735f8 100644 --- a/src/data/kr.rs +++ b/src/data/kr.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "South Korea"; +const COUNTY_CODE: Country = Country::KR; + /// Generate holiday map for South Korea. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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)?, "설날 전날"), @@ -37,14 +38,14 @@ pub fn build( (NaiveDate::from_ymd_res(2000, 4, 13)?, "국회의원 선거일"), ], &mut map, - Country::KR, - "South Korea", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "설날 전날"), @@ -63,14 +64,14 @@ pub fn build( (NaiveDate::from_ymd_res(2001, 12, 25)?, "기독탄신일"), ], &mut map, - Country::KR, - "South Korea", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "설날 전날"), @@ -95,14 +96,14 @@ pub fn build( (NaiveDate::from_ymd_res(2002, 12, 19)?, "대통령 선거일"), ], &mut map, - Country::KR, - "South Korea", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "설날 전날"), @@ -121,14 +122,14 @@ pub fn build( (NaiveDate::from_ymd_res(2003, 12, 25)?, "기독탄신일"), ], &mut map, - Country::KR, - "South Korea", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "설날 전날"), @@ -148,14 +149,14 @@ pub fn build( (NaiveDate::from_ymd_res(2004, 4, 15)?, "국회의원 선거일"), ], &mut map, - Country::KR, - "South Korea", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "설날 전날"), @@ -174,14 +175,14 @@ pub fn build( (NaiveDate::from_ymd_res(2005, 12, 25)?, "기독탄신일"), ], &mut map, - Country::KR, - "South Korea", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "설날 전날"), @@ -199,14 +200,14 @@ pub fn build( (NaiveDate::from_ymd_res(2006, 5, 31)?, "지방선거일"), ], &mut map, - Country::KR, - "South Korea", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "설날 전날"), @@ -225,14 +226,14 @@ pub fn build( (NaiveDate::from_ymd_res(2007, 12, 19)?, "대통령 선거일"), ], &mut map, - Country::KR, - "South Korea", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "설날 전날"), @@ -250,14 +251,14 @@ pub fn build( (NaiveDate::from_ymd_res(2008, 4, 9)?, "국회의원 선거일"), ], &mut map, - Country::KR, - "South Korea", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "설날 전날"), @@ -273,14 +274,14 @@ pub fn build( (NaiveDate::from_ymd_res(2009, 12, 25)?, "기독탄신일"), ], &mut map, - Country::KR, - "South Korea", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "설날 전날"), @@ -298,14 +299,14 @@ pub fn build( (NaiveDate::from_ymd_res(2010, 6, 2)?, "지방선거일"), ], &mut map, - Country::KR, - "South Korea", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "설날 전날"), @@ -322,14 +323,14 @@ pub fn build( (NaiveDate::from_ymd_res(2011, 12, 25)?, "기독탄신일"), ], &mut map, - Country::KR, - "South Korea", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "설날 전날"), @@ -348,14 +349,14 @@ pub fn build( (NaiveDate::from_ymd_res(2012, 12, 19)?, "대통령 선거일"), ], &mut map, - Country::KR, - "South Korea", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "설날 전날"), @@ -373,14 +374,14 @@ pub fn build( (NaiveDate::from_ymd_res(2013, 12, 25)?, "기독탄신일"), ], &mut map, - Country::KR, - "South Korea", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "설날 전날"), @@ -400,14 +401,14 @@ pub fn build( (NaiveDate::from_ymd_res(2014, 9, 10)?, "추석 대체 휴일"), ], &mut map, - Country::KR, - "South Korea", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "설날 전날"), @@ -427,14 +428,14 @@ pub fn build( (NaiveDate::from_ymd_res(2015, 8, 14)?, "임시공휴일"), ], &mut map, - Country::KR, - "South Korea", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "설날 전날"), @@ -455,14 +456,14 @@ pub fn build( (NaiveDate::from_ymd_res(2016, 5, 6)?, "임시공휴일"), ], &mut map, - Country::KR, - "South Korea", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "설날 전날"), @@ -483,14 +484,14 @@ pub fn build( (NaiveDate::from_ymd_res(2017, 10, 2)?, "임시공휴일"), ], &mut map, - Country::KR, - "South Korea", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "설날 전날"), @@ -511,14 +512,14 @@ pub fn build( (NaiveDate::from_ymd_res(2018, 9, 26)?, "추석 대체 휴일"), ], &mut map, - Country::KR, - "South Korea", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "설날 전날"), @@ -537,14 +538,14 @@ pub fn build( (NaiveDate::from_ymd_res(2019, 5, 6)?, "어린이날 대체 휴일"), ], &mut map, - Country::KR, - "South Korea", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "설날 전날"), @@ -565,14 +566,14 @@ pub fn build( (NaiveDate::from_ymd_res(2020, 8, 17)?, "임시공휴일"), ], &mut map, - Country::KR, - "South Korea", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "설날 전날"), @@ -593,14 +594,14 @@ pub fn build( (NaiveDate::from_ymd_res(2021, 10, 11)?, "한글날 대체 휴일"), ], &mut map, - Country::KR, - "South Korea", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "설날 전날"), @@ -622,14 +623,14 @@ pub fn build( (NaiveDate::from_ymd_res(2022, 10, 10)?, "한글날 대체 휴일"), ], &mut map, - Country::KR, - "South Korea", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "설날 전날"), @@ -653,14 +654,14 @@ pub fn build( (NaiveDate::from_ymd_res(2023, 10, 2)?, "임시공휴일"), ], &mut map, - Country::KR, - "South Korea", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "설날 전날"), @@ -681,14 +682,14 @@ pub fn build( (NaiveDate::from_ymd_res(2024, 5, 6)?, "어린이날 대체 휴일"), ], &mut map, - Country::KR, - "South Korea", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "설날 전날"), @@ -714,14 +715,14 @@ pub fn build( (NaiveDate::from_ymd_res(2025, 10, 8)?, "추석 대체 휴일"), ], &mut map, - Country::KR, - "South Korea", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "설날 전날"), @@ -747,14 +748,14 @@ pub fn build( (NaiveDate::from_ymd_res(2026, 10, 5)?, "개천절 대체 휴일"), ], &mut map, - Country::KR, - "South Korea", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "설날 전날"), @@ -781,14 +782,14 @@ pub fn build( ), ], &mut map, - Country::KR, - "South Korea", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "설날 전날"), @@ -807,14 +808,14 @@ pub fn build( (NaiveDate::from_ymd_res(2028, 10, 5)?, "추석 대체 휴일"), ], &mut map, - Country::KR, - "South Korea", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "설날 전날"), @@ -838,14 +839,14 @@ pub fn build( (NaiveDate::from_ymd_res(2029, 9, 24)?, "추석 대체 휴일"), ], &mut map, - Country::KR, - "South Korea", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "설날 전날"), @@ -866,8 +867,8 @@ pub fn build( (NaiveDate::from_ymd_res(2030, 5, 6)?, "어린이날 대체 휴일"), ], &mut map, - Country::KR, - "South Korea", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/kz.rs b/src/data/kz.rs index e2a1fef..a197410 100644 --- a/src/data/kz.rs +++ b/src/data/kz.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Kazakhstan"; +const COUNTY_CODE: Country = Country::KZ; + /// Generate holiday map for Kazakhstan. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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"), ( @@ -40,14 +41,14 @@ pub fn build( ), ], &mut map, - Country::KZ, - "Kazakhstan", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2001, - vec![ + [ (NaiveDate::from_ymd_res(2001, 1, 1)?, "New Year"), (NaiveDate::from_ymd_res(2001, 1, 2)?, "New Year"), ( @@ -70,14 +71,14 @@ pub fn build( ), ], &mut map, - Country::KZ, - "Kazakhstan", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2002, - vec![ + [ (NaiveDate::from_ymd_res(2002, 1, 1)?, "New Year"), (NaiveDate::from_ymd_res(2002, 1, 2)?, "New Year"), ( @@ -105,14 +106,14 @@ pub fn build( ), ], &mut map, - Country::KZ, - "Kazakhstan", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2003, - vec![ + [ (NaiveDate::from_ymd_res(2003, 1, 1)?, "New Year"), (NaiveDate::from_ymd_res(2003, 1, 2)?, "New Year"), ( @@ -156,14 +157,14 @@ pub fn build( ), ], &mut map, - Country::KZ, - "Kazakhstan", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2004, - vec![ + [ (NaiveDate::from_ymd_res(2004, 1, 1)?, "New Year"), (NaiveDate::from_ymd_res(2004, 1, 2)?, "New Year"), ( @@ -199,14 +200,14 @@ pub fn build( ), ], &mut map, - Country::KZ, - "Kazakhstan", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2005, - vec![ + [ (NaiveDate::from_ymd_res(2005, 1, 1)?, "New Year"), (NaiveDate::from_ymd_res(2005, 1, 2)?, "New Year"), ( @@ -244,14 +245,14 @@ pub fn build( ), ], &mut map, - Country::KZ, - "Kazakhstan", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -297,14 +298,14 @@ pub fn build( ), ], &mut map, - Country::KZ, - "Kazakhstan", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -341,14 +342,14 @@ pub fn build( ), ], &mut map, - Country::KZ, - "Kazakhstan", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -397,14 +398,14 @@ pub fn build( ), ], &mut map, - Country::KZ, - "Kazakhstan", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -453,14 +454,14 @@ pub fn build( ), ], &mut map, - Country::KZ, - "Kazakhstan", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -508,14 +509,14 @@ pub fn build( ), ], &mut map, - Country::KZ, - "Kazakhstan", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -560,14 +561,14 @@ pub fn build( ), ], &mut map, - Country::KZ, - "Kazakhstan", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -612,14 +613,14 @@ pub fn build( ), ], &mut map, - Country::KZ, - "Kazakhstan", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -671,14 +672,14 @@ pub fn build( ), ], &mut map, - Country::KZ, - "Kazakhstan", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -738,14 +739,14 @@ pub fn build( ), ], &mut map, - Country::KZ, - "Kazakhstan", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -805,14 +806,14 @@ pub fn build( ), ], &mut map, - Country::KZ, - "Kazakhstan", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -865,14 +866,14 @@ pub fn build( ), ], &mut map, - Country::KZ, - "Kazakhstan", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -925,14 +926,14 @@ pub fn build( ), ], &mut map, - Country::KZ, - "Kazakhstan", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -980,14 +981,14 @@ pub fn build( ), ], &mut map, - Country::KZ, - "Kazakhstan", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1039,14 +1040,14 @@ pub fn build( ), ], &mut map, - Country::KZ, - "Kazakhstan", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1106,14 +1107,14 @@ pub fn build( ), ], &mut map, - Country::KZ, - "Kazakhstan", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1166,14 +1167,14 @@ pub fn build( ), ], &mut map, - Country::KZ, - "Kazakhstan", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1219,14 +1220,14 @@ pub fn build( ), ], &mut map, - Country::KZ, - "Kazakhstan", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1271,14 +1272,14 @@ pub fn build( ), ], &mut map, - Country::KZ, - "Kazakhstan", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1322,14 +1323,14 @@ pub fn build( ), ], &mut map, - Country::KZ, - "Kazakhstan", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1389,14 +1390,14 @@ pub fn build( ), ], &mut map, - Country::KZ, - "Kazakhstan", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1456,14 +1457,14 @@ pub fn build( ), ], &mut map, - Country::KZ, - "Kazakhstan", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1512,14 +1513,14 @@ pub fn build( ), ], &mut map, - Country::KZ, - "Kazakhstan", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1565,14 +1566,14 @@ pub fn build( ), ], &mut map, - Country::KZ, - "Kazakhstan", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1612,14 +1613,14 @@ pub fn build( ), ], &mut map, - Country::KZ, - "Kazakhstan", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1663,8 +1664,8 @@ pub fn build( ), ], &mut map, - Country::KZ, - "Kazakhstan", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/li.rs b/src/data/li.rs index c9a2c37..f5b308d 100644 --- a/src/data/li.rs +++ b/src/data/li.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Liechtenstein"; +const COUNTY_CODE: Country = Country::LI; + /// Generate holiday map for Liechtenstein. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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"), @@ -37,14 +38,14 @@ pub fn build( (NaiveDate::from_ymd_res(2000, 12, 26)?, "Stephanstag"), ], &mut map, - Country::LI, - "Liechtenstein", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -64,14 +65,14 @@ pub fn build( (NaiveDate::from_ymd_res(2001, 12, 26)?, "Stephanstag"), ], &mut map, - Country::LI, - "Liechtenstein", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -91,14 +92,14 @@ pub fn build( (NaiveDate::from_ymd_res(2002, 12, 26)?, "Stephanstag"), ], &mut map, - Country::LI, - "Liechtenstein", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -118,14 +119,14 @@ pub fn build( (NaiveDate::from_ymd_res(2003, 12, 26)?, "Stephanstag"), ], &mut map, - Country::LI, - "Liechtenstein", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -145,14 +146,14 @@ pub fn build( (NaiveDate::from_ymd_res(2004, 12, 26)?, "Stephanstag"), ], &mut map, - Country::LI, - "Liechtenstein", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -172,14 +173,14 @@ pub fn build( (NaiveDate::from_ymd_res(2005, 12, 26)?, "Stephanstag"), ], &mut map, - Country::LI, - "Liechtenstein", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -199,14 +200,14 @@ pub fn build( (NaiveDate::from_ymd_res(2006, 12, 26)?, "Stephanstag"), ], &mut map, - Country::LI, - "Liechtenstein", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -226,14 +227,14 @@ pub fn build( (NaiveDate::from_ymd_res(2007, 12, 26)?, "Stephanstag"), ], &mut map, - Country::LI, - "Liechtenstein", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -255,14 +256,14 @@ pub fn build( (NaiveDate::from_ymd_res(2008, 12, 26)?, "Stephanstag"), ], &mut map, - Country::LI, - "Liechtenstein", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -282,14 +283,14 @@ pub fn build( (NaiveDate::from_ymd_res(2009, 12, 26)?, "Stephanstag"), ], &mut map, - Country::LI, - "Liechtenstein", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -309,14 +310,14 @@ pub fn build( (NaiveDate::from_ymd_res(2010, 12, 26)?, "Stephanstag"), ], &mut map, - Country::LI, - "Liechtenstein", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -336,14 +337,14 @@ pub fn build( (NaiveDate::from_ymd_res(2011, 12, 26)?, "Stephanstag"), ], &mut map, - Country::LI, - "Liechtenstein", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -363,14 +364,14 @@ pub fn build( (NaiveDate::from_ymd_res(2012, 12, 26)?, "Stephanstag"), ], &mut map, - Country::LI, - "Liechtenstein", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -390,14 +391,14 @@ pub fn build( (NaiveDate::from_ymd_res(2013, 12, 26)?, "Stephanstag"), ], &mut map, - Country::LI, - "Liechtenstein", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -417,14 +418,14 @@ pub fn build( (NaiveDate::from_ymd_res(2014, 12, 26)?, "Stephanstag"), ], &mut map, - Country::LI, - "Liechtenstein", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -444,14 +445,14 @@ pub fn build( (NaiveDate::from_ymd_res(2015, 12, 26)?, "Stephanstag"), ], &mut map, - Country::LI, - "Liechtenstein", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -471,14 +472,14 @@ pub fn build( (NaiveDate::from_ymd_res(2016, 12, 26)?, "Stephanstag"), ], &mut map, - Country::LI, - "Liechtenstein", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -498,14 +499,14 @@ pub fn build( (NaiveDate::from_ymd_res(2017, 12, 26)?, "Stephanstag"), ], &mut map, - Country::LI, - "Liechtenstein", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -525,14 +526,14 @@ pub fn build( (NaiveDate::from_ymd_res(2018, 12, 26)?, "Stephanstag"), ], &mut map, - Country::LI, - "Liechtenstein", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -552,14 +553,14 @@ pub fn build( (NaiveDate::from_ymd_res(2019, 12, 26)?, "Stephanstag"), ], &mut map, - Country::LI, - "Liechtenstein", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -579,14 +580,14 @@ pub fn build( (NaiveDate::from_ymd_res(2020, 12, 26)?, "Stephanstag"), ], &mut map, - Country::LI, - "Liechtenstein", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -606,14 +607,14 @@ pub fn build( (NaiveDate::from_ymd_res(2021, 12, 26)?, "Stephanstag"), ], &mut map, - Country::LI, - "Liechtenstein", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -633,14 +634,14 @@ pub fn build( (NaiveDate::from_ymd_res(2022, 12, 26)?, "Stephanstag"), ], &mut map, - Country::LI, - "Liechtenstein", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -660,14 +661,14 @@ pub fn build( (NaiveDate::from_ymd_res(2023, 12, 26)?, "Stephanstag"), ], &mut map, - Country::LI, - "Liechtenstein", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -687,14 +688,14 @@ pub fn build( (NaiveDate::from_ymd_res(2024, 12, 26)?, "Stephanstag"), ], &mut map, - Country::LI, - "Liechtenstein", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -714,14 +715,14 @@ pub fn build( (NaiveDate::from_ymd_res(2025, 12, 26)?, "Stephanstag"), ], &mut map, - Country::LI, - "Liechtenstein", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -741,14 +742,14 @@ pub fn build( (NaiveDate::from_ymd_res(2026, 12, 26)?, "Stephanstag"), ], &mut map, - Country::LI, - "Liechtenstein", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -768,14 +769,14 @@ pub fn build( (NaiveDate::from_ymd_res(2027, 12, 26)?, "Stephanstag"), ], &mut map, - Country::LI, - "Liechtenstein", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -795,14 +796,14 @@ pub fn build( (NaiveDate::from_ymd_res(2028, 12, 26)?, "Stephanstag"), ], &mut map, - Country::LI, - "Liechtenstein", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -822,14 +823,14 @@ pub fn build( (NaiveDate::from_ymd_res(2029, 12, 26)?, "Stephanstag"), ], &mut map, - Country::LI, - "Liechtenstein", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -849,8 +850,8 @@ pub fn build( (NaiveDate::from_ymd_res(2030, 12, 26)?, "Stephanstag"), ], &mut map, - Country::LI, - "Liechtenstein", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/ls.rs b/src/data/ls.rs index 4547f6b..63a7e0b 100644 --- a/src/data/ls.rs +++ b/src/data/ls.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Lesotho"; +const COUNTY_CODE: Country = Country::LS; + /// Generate holiday map for Lesotho. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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"), @@ -31,14 +32,14 @@ pub fn build( (NaiveDate::from_ymd_res(2000, 12, 26)?, "Boxing Day"), ], &mut map, - Country::LS, - "Lesotho", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -52,14 +53,14 @@ pub fn build( (NaiveDate::from_ymd_res(2001, 12, 26)?, "Boxing Day"), ], &mut map, - Country::LS, - "Lesotho", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -74,14 +75,14 @@ pub fn build( (NaiveDate::from_ymd_res(2002, 5, 25)?, "Africa Day"), ], &mut map, - Country::LS, - "Lesotho", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -95,14 +96,14 @@ pub fn build( (NaiveDate::from_ymd_res(2003, 12, 26)?, "Boxing Day"), ], &mut map, - Country::LS, - "Lesotho", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -116,14 +117,14 @@ pub fn build( (NaiveDate::from_ymd_res(2004, 12, 26)?, "Boxing Day"), ], &mut map, - Country::LS, - "Lesotho", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -137,14 +138,14 @@ pub fn build( (NaiveDate::from_ymd_res(2005, 12, 26)?, "Boxing Day"), ], &mut map, - Country::LS, - "Lesotho", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -160,14 +161,14 @@ pub fn build( (NaiveDate::from_ymd_res(2006, 12, 26)?, "Boxing Day"), ], &mut map, - Country::LS, - "Lesotho", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -181,14 +182,14 @@ pub fn build( (NaiveDate::from_ymd_res(2007, 12, 26)?, "Boxing Day"), ], &mut map, - Country::LS, - "Lesotho", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -204,14 +205,14 @@ pub fn build( (NaiveDate::from_ymd_res(2008, 12, 26)?, "Boxing Day"), ], &mut map, - Country::LS, - "Lesotho", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -225,14 +226,14 @@ pub fn build( (NaiveDate::from_ymd_res(2009, 12, 26)?, "Boxing Day"), ], &mut map, - Country::LS, - "Lesotho", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -246,14 +247,14 @@ pub fn build( (NaiveDate::from_ymd_res(2010, 12, 26)?, "Boxing Day"), ], &mut map, - Country::LS, - "Lesotho", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -267,14 +268,14 @@ pub fn build( (NaiveDate::from_ymd_res(2011, 12, 26)?, "Boxing Day"), ], &mut map, - Country::LS, - "Lesotho", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -288,14 +289,14 @@ pub fn build( (NaiveDate::from_ymd_res(2012, 12, 26)?, "Boxing Day"), ], &mut map, - Country::LS, - "Lesotho", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -309,14 +310,14 @@ pub fn build( (NaiveDate::from_ymd_res(2013, 12, 26)?, "Boxing Day"), ], &mut map, - Country::LS, - "Lesotho", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -330,14 +331,14 @@ pub fn build( (NaiveDate::from_ymd_res(2014, 12, 26)?, "Boxing Day"), ], &mut map, - Country::LS, - "Lesotho", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -351,14 +352,14 @@ pub fn build( (NaiveDate::from_ymd_res(2015, 12, 26)?, "Boxing Day"), ], &mut map, - Country::LS, - "Lesotho", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -372,14 +373,14 @@ pub fn build( (NaiveDate::from_ymd_res(2016, 12, 26)?, "Boxing Day"), ], &mut map, - Country::LS, - "Lesotho", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -395,14 +396,14 @@ pub fn build( (NaiveDate::from_ymd_res(2017, 12, 26)?, "Boxing Day"), ], &mut map, - Country::LS, - "Lesotho", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -416,14 +417,14 @@ pub fn build( (NaiveDate::from_ymd_res(2018, 12, 26)?, "Boxing Day"), ], &mut map, - Country::LS, - "Lesotho", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -437,14 +438,14 @@ pub fn build( (NaiveDate::from_ymd_res(2019, 12, 26)?, "Boxing Day"), ], &mut map, - Country::LS, - "Lesotho", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -458,14 +459,14 @@ pub fn build( (NaiveDate::from_ymd_res(2020, 12, 26)?, "Boxing Day"), ], &mut map, - Country::LS, - "Lesotho", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -479,14 +480,14 @@ pub fn build( (NaiveDate::from_ymd_res(2021, 12, 26)?, "Boxing Day"), ], &mut map, - Country::LS, - "Lesotho", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -500,14 +501,14 @@ pub fn build( (NaiveDate::from_ymd_res(2022, 12, 26)?, "Boxing Day"), ], &mut map, - Country::LS, - "Lesotho", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -521,14 +522,14 @@ pub fn build( (NaiveDate::from_ymd_res(2023, 12, 26)?, "Boxing Day"), ], &mut map, - Country::LS, - "Lesotho", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -542,14 +543,14 @@ pub fn build( (NaiveDate::from_ymd_res(2024, 12, 26)?, "Boxing Day"), ], &mut map, - Country::LS, - "Lesotho", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -563,14 +564,14 @@ pub fn build( (NaiveDate::from_ymd_res(2025, 12, 26)?, "Boxing Day"), ], &mut map, - Country::LS, - "Lesotho", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -584,14 +585,14 @@ pub fn build( (NaiveDate::from_ymd_res(2026, 12, 26)?, "Boxing Day"), ], &mut map, - Country::LS, - "Lesotho", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -605,14 +606,14 @@ pub fn build( (NaiveDate::from_ymd_res(2027, 12, 26)?, "Boxing Day"), ], &mut map, - Country::LS, - "Lesotho", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -628,14 +629,14 @@ pub fn build( (NaiveDate::from_ymd_res(2028, 12, 26)?, "Boxing Day"), ], &mut map, - Country::LS, - "Lesotho", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -649,14 +650,14 @@ pub fn build( (NaiveDate::from_ymd_res(2029, 12, 26)?, "Boxing Day"), ], &mut map, - Country::LS, - "Lesotho", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -670,8 +671,8 @@ pub fn build( (NaiveDate::from_ymd_res(2030, 12, 26)?, "Boxing Day"), ], &mut map, - Country::LS, - "Lesotho", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/lt.rs b/src/data/lt.rs index 85d50f0..0fdf4e1 100644 --- a/src/data/lt.rs +++ b/src/data/lt.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Lithuania"; +const COUNTY_CODE: Country = Country::LT; + /// Generate holiday map for Lithuania. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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)?, @@ -58,14 +59,14 @@ pub fn build( ), ], &mut map, - Country::LT, - "Lithuania", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2001, - vec![ + [ (NaiveDate::from_ymd_res(2001, 1, 1)?, "Naujųjų metų diena"), ( NaiveDate::from_ymd_res(2001, 2, 16)?, @@ -106,14 +107,14 @@ pub fn build( ), ], &mut map, - Country::LT, - "Lithuania", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2002, - vec![ + [ (NaiveDate::from_ymd_res(2002, 1, 1)?, "Naujųjų metų diena"), ( NaiveDate::from_ymd_res(2002, 2, 16)?, @@ -154,14 +155,14 @@ pub fn build( ), ], &mut map, - Country::LT, - "Lithuania", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2003, - vec![ + [ (NaiveDate::from_ymd_res(2003, 1, 1)?, "Naujųjų metų diena"), ( NaiveDate::from_ymd_res(2003, 2, 16)?, @@ -206,14 +207,14 @@ pub fn build( ), ], &mut map, - Country::LT, - "Lithuania", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2004, - vec![ + [ (NaiveDate::from_ymd_res(2004, 1, 1)?, "Naujųjų metų diena"), ( NaiveDate::from_ymd_res(2004, 2, 16)?, @@ -258,14 +259,14 @@ pub fn build( ), ], &mut map, - Country::LT, - "Lithuania", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2005, - vec![ + [ (NaiveDate::from_ymd_res(2005, 1, 1)?, "Naujųjų metų diena"), ( NaiveDate::from_ymd_res(2005, 2, 16)?, @@ -309,14 +310,14 @@ pub fn build( ), ], &mut map, - Country::LT, - "Lithuania", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2006, - vec![ + [ (NaiveDate::from_ymd_res(2006, 1, 1)?, "Naujųjų metų diena"), ( NaiveDate::from_ymd_res(2006, 2, 16)?, @@ -361,14 +362,14 @@ pub fn build( ), ], &mut map, - Country::LT, - "Lithuania", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2007, - vec![ + [ (NaiveDate::from_ymd_res(2007, 1, 1)?, "Naujųjų metų diena"), ( NaiveDate::from_ymd_res(2007, 2, 16)?, @@ -413,14 +414,14 @@ pub fn build( ), ], &mut map, - Country::LT, - "Lithuania", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2008, - vec![ + [ (NaiveDate::from_ymd_res(2008, 1, 1)?, "Naujųjų metų diena"), ( NaiveDate::from_ymd_res(2008, 2, 16)?, @@ -465,14 +466,14 @@ pub fn build( ), ], &mut map, - Country::LT, - "Lithuania", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2009, - vec![ + [ (NaiveDate::from_ymd_res(2009, 1, 1)?, "Naujųjų metų diena"), ( NaiveDate::from_ymd_res(2009, 2, 16)?, @@ -517,14 +518,14 @@ pub fn build( ), ], &mut map, - Country::LT, - "Lithuania", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2010, - vec![ + [ (NaiveDate::from_ymd_res(2010, 1, 1)?, "Naujųjų metų diena"), ( NaiveDate::from_ymd_res(2010, 2, 16)?, @@ -569,14 +570,14 @@ pub fn build( ), ], &mut map, - Country::LT, - "Lithuania", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2011, - vec![ + [ (NaiveDate::from_ymd_res(2011, 1, 1)?, "Naujųjų metų diena"), ( NaiveDate::from_ymd_res(2011, 2, 16)?, @@ -620,14 +621,14 @@ pub fn build( ), ], &mut map, - Country::LT, - "Lithuania", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2012, - vec![ + [ (NaiveDate::from_ymd_res(2012, 1, 1)?, "Naujųjų metų diena"), ( NaiveDate::from_ymd_res(2012, 2, 16)?, @@ -672,14 +673,14 @@ pub fn build( ), ], &mut map, - Country::LT, - "Lithuania", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2013, - vec![ + [ (NaiveDate::from_ymd_res(2013, 1, 1)?, "Naujųjų metų diena"), ( NaiveDate::from_ymd_res(2013, 2, 16)?, @@ -724,14 +725,14 @@ pub fn build( ), ], &mut map, - Country::LT, - "Lithuania", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2014, - vec![ + [ (NaiveDate::from_ymd_res(2014, 1, 1)?, "Naujųjų metų diena"), ( NaiveDate::from_ymd_res(2014, 2, 16)?, @@ -776,14 +777,14 @@ pub fn build( ), ], &mut map, - Country::LT, - "Lithuania", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2015, - vec![ + [ (NaiveDate::from_ymd_res(2015, 1, 1)?, "Naujųjų metų diena"), ( NaiveDate::from_ymd_res(2015, 2, 16)?, @@ -828,14 +829,14 @@ pub fn build( ), ], &mut map, - Country::LT, - "Lithuania", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2016, - vec![ + [ (NaiveDate::from_ymd_res(2016, 1, 1)?, "Naujųjų metų diena"), ( NaiveDate::from_ymd_res(2016, 2, 16)?, @@ -879,14 +880,14 @@ pub fn build( ), ], &mut map, - Country::LT, - "Lithuania", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2017, - vec![ + [ (NaiveDate::from_ymd_res(2017, 1, 1)?, "Naujųjų metų diena"), ( NaiveDate::from_ymd_res(2017, 2, 16)?, @@ -931,14 +932,14 @@ pub fn build( ), ], &mut map, - Country::LT, - "Lithuania", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2018, - vec![ + [ (NaiveDate::from_ymd_res(2018, 1, 1)?, "Naujųjų metų diena"), ( NaiveDate::from_ymd_res(2018, 2, 16)?, @@ -983,14 +984,14 @@ pub fn build( ), ], &mut map, - Country::LT, - "Lithuania", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2019, - vec![ + [ (NaiveDate::from_ymd_res(2019, 1, 1)?, "Naujųjų metų diena"), ( NaiveDate::from_ymd_res(2019, 2, 16)?, @@ -1035,14 +1036,14 @@ pub fn build( ), ], &mut map, - Country::LT, - "Lithuania", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2020, - vec![ + [ (NaiveDate::from_ymd_res(2020, 1, 1)?, "Naujųjų metų diena"), ( NaiveDate::from_ymd_res(2020, 2, 16)?, @@ -1091,14 +1092,14 @@ pub fn build( ), ], &mut map, - Country::LT, - "Lithuania", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2021, - vec![ + [ (NaiveDate::from_ymd_res(2021, 1, 1)?, "Naujųjų metų diena"), ( NaiveDate::from_ymd_res(2021, 2, 16)?, @@ -1147,14 +1148,14 @@ pub fn build( ), ], &mut map, - Country::LT, - "Lithuania", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2022, - vec![ + [ (NaiveDate::from_ymd_res(2022, 1, 1)?, "Naujųjų metų diena"), ( NaiveDate::from_ymd_res(2022, 2, 16)?, @@ -1202,14 +1203,14 @@ pub fn build( ), ], &mut map, - Country::LT, - "Lithuania", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2023, - vec![ + [ (NaiveDate::from_ymd_res(2023, 1, 1)?, "Naujųjų metų diena"), ( NaiveDate::from_ymd_res(2023, 2, 16)?, @@ -1258,14 +1259,14 @@ pub fn build( ), ], &mut map, - Country::LT, - "Lithuania", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2024, - vec![ + [ (NaiveDate::from_ymd_res(2024, 1, 1)?, "Naujųjų metų diena"), ( NaiveDate::from_ymd_res(2024, 2, 16)?, @@ -1314,14 +1315,14 @@ pub fn build( ), ], &mut map, - Country::LT, - "Lithuania", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2025, - vec![ + [ (NaiveDate::from_ymd_res(2025, 1, 1)?, "Naujųjų metų diena"), ( NaiveDate::from_ymd_res(2025, 2, 16)?, @@ -1370,14 +1371,14 @@ pub fn build( ), ], &mut map, - Country::LT, - "Lithuania", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2026, - vec![ + [ (NaiveDate::from_ymd_res(2026, 1, 1)?, "Naujųjų metų diena"), ( NaiveDate::from_ymd_res(2026, 2, 16)?, @@ -1426,14 +1427,14 @@ pub fn build( ), ], &mut map, - Country::LT, - "Lithuania", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2027, - vec![ + [ (NaiveDate::from_ymd_res(2027, 1, 1)?, "Naujųjų metų diena"), ( NaiveDate::from_ymd_res(2027, 2, 16)?, @@ -1482,14 +1483,14 @@ pub fn build( ), ], &mut map, - Country::LT, - "Lithuania", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2028, - vec![ + [ (NaiveDate::from_ymd_res(2028, 1, 1)?, "Naujųjų metų diena"), ( NaiveDate::from_ymd_res(2028, 2, 16)?, @@ -1538,14 +1539,14 @@ pub fn build( ), ], &mut map, - Country::LT, - "Lithuania", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2029, - vec![ + [ (NaiveDate::from_ymd_res(2029, 1, 1)?, "Naujųjų metų diena"), ( NaiveDate::from_ymd_res(2029, 2, 16)?, @@ -1594,14 +1595,14 @@ pub fn build( ), ], &mut map, - Country::LT, - "Lithuania", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2030, - vec![ + [ (NaiveDate::from_ymd_res(2030, 1, 1)?, "Naujųjų metų diena"), ( NaiveDate::from_ymd_res(2030, 2, 16)?, @@ -1650,8 +1651,8 @@ pub fn build( ), ], &mut map, - Country::LT, - "Lithuania", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/lu.rs b/src/data/lu.rs index e3278c0..d6a8ce1 100644 --- a/src/data/lu.rs +++ b/src/data/lu.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Luxembourg"; +const COUNTY_CODE: Country = Country::LU; + /// Generate holiday map for Luxembourg. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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"), @@ -33,14 +34,14 @@ pub fn build( ), ], &mut map, - Country::LU, - "Luxembourg", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -56,14 +57,14 @@ pub fn build( ), ], &mut map, - Country::LU, - "Luxembourg", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -79,14 +80,14 @@ pub fn build( ), ], &mut map, - Country::LU, - "Luxembourg", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -102,14 +103,14 @@ pub fn build( ), ], &mut map, - Country::LU, - "Luxembourg", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -125,14 +126,14 @@ pub fn build( ), ], &mut map, - Country::LU, - "Luxembourg", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -148,14 +149,14 @@ pub fn build( ), ], &mut map, - Country::LU, - "Luxembourg", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -171,14 +172,14 @@ pub fn build( ), ], &mut map, - Country::LU, - "Luxembourg", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -194,14 +195,14 @@ pub fn build( ), ], &mut map, - Country::LU, - "Luxembourg", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2008, - vec![ + [ (NaiveDate::from_ymd_res(2008, 1, 1)?, "Neujahr"), (NaiveDate::from_ymd_res(2008, 3, 24)?, "Ostermontag"), ( @@ -219,14 +220,14 @@ pub fn build( ), ], &mut map, - Country::LU, - "Luxembourg", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -242,14 +243,14 @@ pub fn build( ), ], &mut map, - Country::LU, - "Luxembourg", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -265,14 +266,14 @@ pub fn build( ), ], &mut map, - Country::LU, - "Luxembourg", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -288,14 +289,14 @@ pub fn build( ), ], &mut map, - Country::LU, - "Luxembourg", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -311,14 +312,14 @@ pub fn build( ), ], &mut map, - Country::LU, - "Luxembourg", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -334,14 +335,14 @@ pub fn build( ), ], &mut map, - Country::LU, - "Luxembourg", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -357,14 +358,14 @@ pub fn build( ), ], &mut map, - Country::LU, - "Luxembourg", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -380,14 +381,14 @@ pub fn build( ), ], &mut map, - Country::LU, - "Luxembourg", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -403,14 +404,14 @@ pub fn build( ), ], &mut map, - Country::LU, - "Luxembourg", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -426,14 +427,14 @@ pub fn build( ), ], &mut map, - Country::LU, - "Luxembourg", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -449,14 +450,14 @@ pub fn build( ), ], &mut map, - Country::LU, - "Luxembourg", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -473,14 +474,14 @@ pub fn build( ), ], &mut map, - Country::LU, - "Luxembourg", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -497,14 +498,14 @@ pub fn build( ), ], &mut map, - Country::LU, - "Luxembourg", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -521,14 +522,14 @@ pub fn build( ), ], &mut map, - Country::LU, - "Luxembourg", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -545,14 +546,14 @@ pub fn build( ), ], &mut map, - Country::LU, - "Luxembourg", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -569,14 +570,14 @@ pub fn build( ), ], &mut map, - Country::LU, - "Luxembourg", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -595,14 +596,14 @@ pub fn build( ), ], &mut map, - Country::LU, - "Luxembourg", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -619,14 +620,14 @@ pub fn build( ), ], &mut map, - Country::LU, - "Luxembourg", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -643,14 +644,14 @@ pub fn build( ), ], &mut map, - Country::LU, - "Luxembourg", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -667,14 +668,14 @@ pub fn build( ), ], &mut map, - Country::LU, - "Luxembourg", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -691,14 +692,14 @@ pub fn build( ), ], &mut map, - Country::LU, - "Luxembourg", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -715,14 +716,14 @@ pub fn build( ), ], &mut map, - Country::LU, - "Luxembourg", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -739,8 +740,8 @@ pub fn build( ), ], &mut map, - Country::LU, - "Luxembourg", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/lv.rs b/src/data/lv.rs index 98e5f30..71b1616 100644 --- a/src/data/lv.rs +++ b/src/data/lv.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Latvia"; +const COUNTY_CODE: Country = Country::LV; + /// Generate holiday map for Latvia. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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"), @@ -35,14 +36,14 @@ pub fn build( (NaiveDate::from_ymd_res(2000, 12, 31)?, "Vecgada vakars"), ], &mut map, - Country::LV, - "Latvia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -60,14 +61,14 @@ pub fn build( (NaiveDate::from_ymd_res(2001, 12, 31)?, "Vecgada vakars"), ], &mut map, - Country::LV, - "Latvia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -89,14 +90,14 @@ pub fn build( (NaiveDate::from_ymd_res(2002, 12, 31)?, "Vecgada vakars"), ], &mut map, - Country::LV, - "Latvia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -118,14 +119,14 @@ pub fn build( (NaiveDate::from_ymd_res(2003, 12, 31)?, "Vecgada vakars"), ], &mut map, - Country::LV, - "Latvia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -147,14 +148,14 @@ pub fn build( (NaiveDate::from_ymd_res(2004, 12, 31)?, "Vecgada vakars"), ], &mut map, - Country::LV, - "Latvia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -176,14 +177,14 @@ pub fn build( (NaiveDate::from_ymd_res(2005, 12, 31)?, "Vecgada vakars"), ], &mut map, - Country::LV, - "Latvia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -205,14 +206,14 @@ pub fn build( (NaiveDate::from_ymd_res(2006, 12, 31)?, "Vecgada vakars"), ], &mut map, - Country::LV, - "Latvia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -242,14 +243,14 @@ pub fn build( (NaiveDate::from_ymd_res(2007, 12, 31)?, "Vecgada vakars"), ], &mut map, - Country::LV, - "Latvia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -279,14 +280,14 @@ pub fn build( (NaiveDate::from_ymd_res(2008, 12, 31)?, "Vecgada vakars"), ], &mut map, - Country::LV, - "Latvia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -312,14 +313,14 @@ pub fn build( (NaiveDate::from_ymd_res(2009, 12, 31)?, "Vecgada vakars"), ], &mut map, - Country::LV, - "Latvia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -345,14 +346,14 @@ pub fn build( (NaiveDate::from_ymd_res(2010, 12, 31)?, "Vecgada vakars"), ], &mut map, - Country::LV, - "Latvia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -378,14 +379,14 @@ pub fn build( (NaiveDate::from_ymd_res(2011, 12, 31)?, "Vecgada vakars"), ], &mut map, - Country::LV, - "Latvia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -415,14 +416,14 @@ pub fn build( (NaiveDate::from_ymd_res(2012, 12, 31)?, "Vecgada vakars"), ], &mut map, - Country::LV, - "Latvia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -452,14 +453,14 @@ pub fn build( (NaiveDate::from_ymd_res(2013, 12, 31)?, "Vecgada vakars"), ], &mut map, - Country::LV, - "Latvia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -489,14 +490,14 @@ pub fn build( (NaiveDate::from_ymd_res(2014, 12, 31)?, "Vecgada vakars"), ], &mut map, - Country::LV, - "Latvia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -522,14 +523,14 @@ pub fn build( (NaiveDate::from_ymd_res(2015, 12, 31)?, "Vecgada vakars"), ], &mut map, - Country::LV, - "Latvia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -555,14 +556,14 @@ pub fn build( (NaiveDate::from_ymd_res(2016, 12, 31)?, "Vecgada vakars"), ], &mut map, - Country::LV, - "Latvia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -592,14 +593,14 @@ pub fn build( (NaiveDate::from_ymd_res(2017, 12, 31)?, "Vecgada vakars"), ], &mut map, - Country::LV, - "Latvia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -637,14 +638,14 @@ pub fn build( ), ], &mut map, - Country::LV, - "Latvia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -674,14 +675,14 @@ pub fn build( (NaiveDate::from_ymd_res(2019, 12, 31)?, "Vecgada vakars"), ], &mut map, - Country::LV, - "Latvia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -707,14 +708,14 @@ pub fn build( (NaiveDate::from_ymd_res(2020, 12, 31)?, "Vecgada vakars"), ], &mut map, - Country::LV, - "Latvia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -740,14 +741,14 @@ pub fn build( (NaiveDate::from_ymd_res(2021, 12, 31)?, "Vecgada vakars"), ], &mut map, - Country::LV, - "Latvia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -773,42 +774,41 @@ pub fn build( (NaiveDate::from_ymd_res(2022, 12, 31)?, "Vecgada vakars"), ], &mut map, - Country::LV, - "Latvia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), + [ + (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", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -838,14 +838,14 @@ pub fn build( (NaiveDate::from_ymd_res(2024, 12, 31)?, "Vecgada vakars"), ], &mut map, - Country::LV, - "Latvia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -875,14 +875,14 @@ pub fn build( (NaiveDate::from_ymd_res(2025, 12, 31)?, "Vecgada vakars"), ], &mut map, - Country::LV, - "Latvia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -908,14 +908,14 @@ pub fn build( (NaiveDate::from_ymd_res(2026, 12, 31)?, "Vecgada vakars"), ], &mut map, - Country::LV, - "Latvia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -941,14 +941,14 @@ pub fn build( (NaiveDate::from_ymd_res(2027, 12, 31)?, "Vecgada vakars"), ], &mut map, - Country::LV, - "Latvia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -978,14 +978,14 @@ pub fn build( (NaiveDate::from_ymd_res(2028, 12, 31)?, "Vecgada vakars"), ], &mut map, - Country::LV, - "Latvia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1015,14 +1015,14 @@ pub fn build( (NaiveDate::from_ymd_res(2029, 12, 31)?, "Vecgada vakars"), ], &mut map, - Country::LV, - "Latvia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1052,8 +1052,8 @@ pub fn build( (NaiveDate::from_ymd_res(2030, 12, 31)?, "Vecgada vakars"), ], &mut map, - Country::LV, - "Latvia", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/ma.rs b/src/data/ma.rs index bd57faa..d8b293a 100644 --- a/src/data/ma.rs +++ b/src/data/ma.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Morocco"; +const COUNTY_CODE: Country = Country::MA; + /// Generate holiday map for Morocco. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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)?, @@ -59,14 +60,14 @@ pub fn build( ), ], &mut map, - Country::MA, - "Morocco", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2001, - vec![ + [ (NaiveDate::from_ymd_res(2001, 1, 1)?, "رأس السنة الميلادية"), ( NaiveDate::from_ymd_res(2001, 1, 11)?, @@ -106,14 +107,14 @@ pub fn build( ), ], &mut map, - Country::MA, - "Morocco", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2002, - vec![ + [ (NaiveDate::from_ymd_res(2002, 1, 1)?, "رأس السنة الميلادية"), ( NaiveDate::from_ymd_res(2002, 1, 11)?, @@ -153,14 +154,14 @@ pub fn build( ), ], &mut map, - Country::MA, - "Morocco", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2003, - vec![ + [ (NaiveDate::from_ymd_res(2003, 1, 1)?, "رأس السنة الميلادية"), ( NaiveDate::from_ymd_res(2003, 1, 11)?, @@ -200,14 +201,14 @@ pub fn build( ), ], &mut map, - Country::MA, - "Morocco", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2004, - vec![ + [ (NaiveDate::from_ymd_res(2004, 1, 1)?, "رأس السنة الميلادية"), ( NaiveDate::from_ymd_res(2004, 1, 11)?, @@ -246,14 +247,14 @@ pub fn build( ), ], &mut map, - Country::MA, - "Morocco", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2005, - vec![ + [ (NaiveDate::from_ymd_res(2005, 1, 1)?, "رأس السنة الميلادية"), ( NaiveDate::from_ymd_res(2005, 1, 11)?, @@ -293,14 +294,14 @@ pub fn build( ), ], &mut map, - Country::MA, - "Morocco", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2006, - vec![ + [ (NaiveDate::from_ymd_res(2006, 1, 1)?, "رأس السنة الميلادية"), ( NaiveDate::from_ymd_res(2006, 1, 11)?, @@ -340,14 +341,14 @@ pub fn build( ), ], &mut map, - Country::MA, - "Morocco", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2007, - vec![ + [ ( NaiveDate::from_ymd_res(2007, 1, 1)?, "(تقدير) عيد الأضحى; رأس السنة الميلادية", @@ -390,14 +391,14 @@ pub fn build( ), ], &mut map, - Country::MA, - "Morocco", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2008, - vec![ + [ (NaiveDate::from_ymd_res(2008, 1, 1)?, "رأس السنة الميلادية"), ( NaiveDate::from_ymd_res(2008, 1, 11)?, @@ -441,14 +442,14 @@ pub fn build( ), ], &mut map, - Country::MA, - "Morocco", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2009, - vec![ + [ (NaiveDate::from_ymd_res(2009, 1, 1)?, "رأس السنة الميلادية"), ( NaiveDate::from_ymd_res(2009, 1, 11)?, @@ -488,14 +489,14 @@ pub fn build( ), ], &mut map, - Country::MA, - "Morocco", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2010, - vec![ + [ (NaiveDate::from_ymd_res(2010, 1, 1)?, "رأس السنة الميلادية"), ( NaiveDate::from_ymd_res(2010, 1, 11)?, @@ -535,14 +536,14 @@ pub fn build( ), ], &mut map, - Country::MA, - "Morocco", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2011, - vec![ + [ (NaiveDate::from_ymd_res(2011, 1, 1)?, "رأس السنة الميلادية"), ( NaiveDate::from_ymd_res(2011, 1, 11)?, @@ -581,14 +582,14 @@ pub fn build( ), ], &mut map, - Country::MA, - "Morocco", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2012, - vec![ + [ (NaiveDate::from_ymd_res(2012, 1, 1)?, "رأس السنة الميلادية"), ( NaiveDate::from_ymd_res(2012, 1, 11)?, @@ -627,14 +628,14 @@ pub fn build( ), ], &mut map, - Country::MA, - "Morocco", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2013, - vec![ + [ (NaiveDate::from_ymd_res(2013, 1, 1)?, "رأس السنة الميلادية"), ( NaiveDate::from_ymd_res(2013, 1, 11)?, @@ -674,14 +675,14 @@ pub fn build( ), ], &mut map, - Country::MA, - "Morocco", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2014, - vec![ + [ (NaiveDate::from_ymd_res(2014, 1, 1)?, "رأس السنة الميلادية"), ( NaiveDate::from_ymd_res(2014, 1, 11)?, @@ -721,14 +722,14 @@ pub fn build( ), ], &mut map, - Country::MA, - "Morocco", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2015, - vec![ + [ (NaiveDate::from_ymd_res(2015, 1, 1)?, "رأس السنة الميلادية"), ( NaiveDate::from_ymd_res(2015, 1, 11)?, @@ -776,14 +777,14 @@ pub fn build( ), ], &mut map, - Country::MA, - "Morocco", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2016, - vec![ + [ (NaiveDate::from_ymd_res(2016, 1, 1)?, "رأس السنة الميلادية"), ( NaiveDate::from_ymd_res(2016, 1, 11)?, @@ -823,14 +824,14 @@ pub fn build( ), ], &mut map, - Country::MA, - "Morocco", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2017, - vec![ + [ (NaiveDate::from_ymd_res(2017, 1, 1)?, "رأس السنة الميلادية"), ( NaiveDate::from_ymd_res(2017, 1, 11)?, @@ -870,14 +871,14 @@ pub fn build( ), ], &mut map, - Country::MA, - "Morocco", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2018, - vec![ + [ (NaiveDate::from_ymd_res(2018, 1, 1)?, "رأس السنة الميلادية"), ( NaiveDate::from_ymd_res(2018, 1, 11)?, @@ -919,14 +920,14 @@ pub fn build( ), ], &mut map, - Country::MA, - "Morocco", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2019, - vec![ + [ (NaiveDate::from_ymd_res(2019, 1, 1)?, "رأس السنة الميلادية"), ( NaiveDate::from_ymd_res(2019, 1, 11)?, @@ -966,14 +967,14 @@ pub fn build( ), ], &mut map, - Country::MA, - "Morocco", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2020, - vec![ + [ (NaiveDate::from_ymd_res(2020, 1, 1)?, "رأس السنة الميلادية"), ( NaiveDate::from_ymd_res(2020, 1, 11)?, @@ -1009,14 +1010,14 @@ pub fn build( ), ], &mut map, - Country::MA, - "Morocco", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2021, - vec![ + [ (NaiveDate::from_ymd_res(2021, 1, 1)?, "رأس السنة الميلادية"), ( NaiveDate::from_ymd_res(2021, 1, 11)?, @@ -1056,14 +1057,14 @@ pub fn build( ), ], &mut map, - Country::MA, - "Morocco", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2022, - vec![ + [ (NaiveDate::from_ymd_res(2022, 1, 1)?, "رأس السنة الميلادية"), ( NaiveDate::from_ymd_res(2022, 1, 11)?, @@ -1102,14 +1103,14 @@ pub fn build( ), ], &mut map, - Country::MA, - "Morocco", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2023, - vec![ + [ (NaiveDate::from_ymd_res(2023, 1, 1)?, "رأس السنة الميلادية"), ( NaiveDate::from_ymd_res(2023, 1, 11)?, @@ -1149,14 +1150,14 @@ pub fn build( ), ], &mut map, - Country::MA, - "Morocco", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2024, - vec![ + [ (NaiveDate::from_ymd_res(2024, 1, 1)?, "رأس السنة الميلادية"), ( NaiveDate::from_ymd_res(2024, 1, 11)?, @@ -1200,14 +1201,14 @@ pub fn build( ), ], &mut map, - Country::MA, - "Morocco", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2025, - vec![ + [ (NaiveDate::from_ymd_res(2025, 1, 1)?, "رأس السنة الميلادية"), ( NaiveDate::from_ymd_res(2025, 1, 11)?, @@ -1251,14 +1252,14 @@ pub fn build( ), ], &mut map, - Country::MA, - "Morocco", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2026, - vec![ + [ (NaiveDate::from_ymd_res(2026, 1, 1)?, "رأس السنة الميلادية"), ( NaiveDate::from_ymd_res(2026, 1, 11)?, @@ -1302,14 +1303,14 @@ pub fn build( ), ], &mut map, - Country::MA, - "Morocco", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2027, - vec![ + [ (NaiveDate::from_ymd_res(2027, 1, 1)?, "رأس السنة الميلادية"), ( NaiveDate::from_ymd_res(2027, 1, 11)?, @@ -1349,14 +1350,14 @@ pub fn build( ), ], &mut map, - Country::MA, - "Morocco", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2028, - vec![ + [ (NaiveDate::from_ymd_res(2028, 1, 1)?, "رأس السنة الميلادية"), ( NaiveDate::from_ymd_res(2028, 1, 11)?, @@ -1400,14 +1401,14 @@ pub fn build( ), ], &mut map, - Country::MA, - "Morocco", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2029, - vec![ + [ (NaiveDate::from_ymd_res(2029, 1, 1)?, "رأس السنة الميلادية"), ( NaiveDate::from_ymd_res(2029, 1, 11)?, @@ -1451,14 +1452,14 @@ pub fn build( ), ], &mut map, - Country::MA, - "Morocco", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2030, - vec![ + [ (NaiveDate::from_ymd_res(2030, 1, 1)?, "رأس السنة الميلادية"), ( NaiveDate::from_ymd_res(2030, 1, 11)?, @@ -1502,8 +1503,8 @@ pub fn build( ), ], &mut map, - Country::MA, - "Morocco", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/md.rs b/src/data/md.rs index 8401b3f..04f9449 100644 --- a/src/data/md.rs +++ b/src/data/md.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Moldova"; +const COUNTY_CODE: Country = Country::MD; + /// Generate holiday map for Moldova. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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)?, @@ -48,14 +49,14 @@ pub fn build( (NaiveDate::from_ymd_res(2000, 8, 31)?, "Limba noastră"), ], &mut map, - Country::MD, - "Moldova", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2001, - vec![ + [ (NaiveDate::from_ymd_res(2001, 1, 1)?, "Anul Nou"), ( NaiveDate::from_ymd_res(2001, 1, 7)?, @@ -87,14 +88,14 @@ pub fn build( (NaiveDate::from_ymd_res(2001, 8, 31)?, "Limba noastră"), ], &mut map, - Country::MD, - "Moldova", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2002, - vec![ + [ (NaiveDate::from_ymd_res(2002, 1, 1)?, "Anul Nou"), ( NaiveDate::from_ymd_res(2002, 1, 7)?, @@ -126,14 +127,14 @@ pub fn build( (NaiveDate::from_ymd_res(2002, 8, 31)?, "Limba noastră"), ], &mut map, - Country::MD, - "Moldova", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2003, - vec![ + [ (NaiveDate::from_ymd_res(2003, 1, 1)?, "Anul Nou"), ( NaiveDate::from_ymd_res(2003, 1, 7)?, @@ -165,14 +166,14 @@ pub fn build( (NaiveDate::from_ymd_res(2003, 8, 31)?, "Limba noastră"), ], &mut map, - Country::MD, - "Moldova", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2004, - vec![ + [ (NaiveDate::from_ymd_res(2004, 1, 1)?, "Anul Nou"), ( NaiveDate::from_ymd_res(2004, 1, 7)?, @@ -204,34 +205,33 @@ pub fn build( (NaiveDate::from_ymd_res(2004, 8, 31)?, "Limba noastră"), ], &mut map, - Country::MD, - "Moldova", + COUNTY_CODE, + COUNTY_NAME, ); 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ă"), + [ + (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", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2006, - vec![ + [ (NaiveDate::from_ymd_res(2006, 1, 1)?, "Anul Nou"), ( NaiveDate::from_ymd_res(2006, 1, 7)?, @@ -262,14 +262,14 @@ pub fn build( (NaiveDate::from_ymd_res(2006, 8, 31)?, "Limba noastră"), ], &mut map, - Country::MD, - "Moldova", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2007, - vec![ + [ (NaiveDate::from_ymd_res(2007, 1, 1)?, "Anul Nou"), ( NaiveDate::from_ymd_res(2007, 1, 7)?, @@ -301,14 +301,14 @@ pub fn build( (NaiveDate::from_ymd_res(2007, 8, 31)?, "Limba noastră"), ], &mut map, - Country::MD, - "Moldova", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2008, - vec![ + [ (NaiveDate::from_ymd_res(2008, 1, 1)?, "Anul Nou"), ( NaiveDate::from_ymd_res(2008, 1, 7)?, @@ -340,14 +340,14 @@ pub fn build( (NaiveDate::from_ymd_res(2008, 8, 31)?, "Limba noastră"), ], &mut map, - Country::MD, - "Moldova", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2009, - vec![ + [ (NaiveDate::from_ymd_res(2009, 1, 1)?, "Anul Nou"), ( NaiveDate::from_ymd_res(2009, 1, 7)?, @@ -379,14 +379,14 @@ pub fn build( (NaiveDate::from_ymd_res(2009, 8, 31)?, "Limba noastră"), ], &mut map, - Country::MD, - "Moldova", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2010, - vec![ + [ (NaiveDate::from_ymd_res(2010, 1, 1)?, "Anul Nou"), ( NaiveDate::from_ymd_res(2010, 1, 7)?, @@ -418,14 +418,14 @@ pub fn build( (NaiveDate::from_ymd_res(2010, 8, 31)?, "Limba noastră"), ], &mut map, - Country::MD, - "Moldova", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2011, - vec![ + [ (NaiveDate::from_ymd_res(2011, 1, 1)?, "Anul Nou"), ( NaiveDate::from_ymd_res(2011, 1, 7)?, @@ -457,14 +457,14 @@ pub fn build( (NaiveDate::from_ymd_res(2011, 8, 31)?, "Limba noastră"), ], &mut map, - Country::MD, - "Moldova", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2012, - vec![ + [ (NaiveDate::from_ymd_res(2012, 1, 1)?, "Anul Nou"), ( NaiveDate::from_ymd_res(2012, 1, 7)?, @@ -496,14 +496,14 @@ pub fn build( (NaiveDate::from_ymd_res(2012, 8, 31)?, "Limba noastră"), ], &mut map, - Country::MD, - "Moldova", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2013, - vec![ + [ (NaiveDate::from_ymd_res(2013, 1, 1)?, "Anul Nou"), ( NaiveDate::from_ymd_res(2013, 1, 7)?, @@ -539,14 +539,14 @@ pub fn build( ), ], &mut map, - Country::MD, - "Moldova", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2014, - vec![ + [ (NaiveDate::from_ymd_res(2014, 1, 1)?, "Anul Nou"), ( NaiveDate::from_ymd_res(2014, 1, 7)?, @@ -582,14 +582,14 @@ pub fn build( ), ], &mut map, - Country::MD, - "Moldova", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2015, - vec![ + [ (NaiveDate::from_ymd_res(2015, 1, 1)?, "Anul Nou"), ( NaiveDate::from_ymd_res(2015, 1, 7)?, @@ -625,366 +625,351 @@ pub fn build( ), ], &mut map, - Country::MD, - "Moldova", + COUNTY_CODE, + COUNTY_NAME, ); 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)"), + [ + (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", + COUNTY_CODE, + COUNTY_NAME, ); 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)"), + [ + (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", + COUNTY_CODE, + COUNTY_NAME, ); 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)"), + [ + (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", + COUNTY_CODE, + COUNTY_NAME, ); 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)"), + [ + (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", + COUNTY_CODE, + COUNTY_NAME, ); 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)"), + [ + (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", + COUNTY_CODE, + COUNTY_NAME, ); 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)"), + [ + (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", + COUNTY_CODE, + COUNTY_NAME, ); 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)"), + [ + (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", + COUNTY_CODE, + COUNTY_NAME, ); 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)"), + [ + (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", + COUNTY_CODE, + COUNTY_NAME, ); 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)"), + [ + (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", + COUNTY_CODE, + COUNTY_NAME, ); 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)"), + [ + (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", + COUNTY_CODE, + COUNTY_NAME, ); 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)"), + [ + (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", + COUNTY_CODE, + COUNTY_NAME, ); 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)"), + [ + (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", + COUNTY_CODE, + COUNTY_NAME, ); 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)"), + [ + (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", + COUNTY_CODE, + COUNTY_NAME, ); 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)"), + [ + (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", + COUNTY_CODE, + COUNTY_NAME, ); 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)"), + [ + (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", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/mg.rs b/src/data/mg.rs index dfa6e43..8ffbb33 100644 --- a/src/data/mg.rs +++ b/src/data/mg.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Madagascar"; +const COUNTY_CODE: Country = Country::MG; + /// Generate holiday map for Madagascar. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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"), @@ -47,14 +48,14 @@ pub fn build( (NaiveDate::from_ymd_res(2000, 12, 25)?, "Fetin'ny noely"), ], &mut map, - Country::MG, - "Madagascar", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -84,14 +85,14 @@ pub fn build( (NaiveDate::from_ymd_res(2001, 12, 25)?, "Fetin'ny noely"), ], &mut map, - Country::MG, - "Madagascar", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -121,14 +122,14 @@ pub fn build( (NaiveDate::from_ymd_res(2002, 12, 25)?, "Fetin'ny noely"), ], &mut map, - Country::MG, - "Madagascar", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -158,14 +159,14 @@ pub fn build( (NaiveDate::from_ymd_res(2003, 12, 25)?, "Fetin'ny noely"), ], &mut map, - Country::MG, - "Madagascar", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -195,14 +196,14 @@ pub fn build( (NaiveDate::from_ymd_res(2004, 12, 25)?, "Fetin'ny noely"), ], &mut map, - Country::MG, - "Madagascar", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -232,14 +233,14 @@ pub fn build( (NaiveDate::from_ymd_res(2005, 12, 25)?, "Fetin'ny noely"), ], &mut map, - Country::MG, - "Madagascar", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -269,14 +270,14 @@ pub fn build( (NaiveDate::from_ymd_res(2006, 12, 25)?, "Fetin'ny noely"), ], &mut map, - Country::MG, - "Madagascar", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -306,14 +307,14 @@ pub fn build( (NaiveDate::from_ymd_res(2007, 12, 25)?, "Fetin'ny noely"), ], &mut map, - Country::MG, - "Madagascar", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -342,14 +343,14 @@ pub fn build( (NaiveDate::from_ymd_res(2008, 12, 25)?, "Fetin'ny noely"), ], &mut map, - Country::MG, - "Madagascar", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -379,14 +380,14 @@ pub fn build( (NaiveDate::from_ymd_res(2009, 12, 25)?, "Fetin'ny noely"), ], &mut map, - Country::MG, - "Madagascar", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -416,14 +417,14 @@ pub fn build( (NaiveDate::from_ymd_res(2010, 12, 25)?, "Fetin'ny noely"), ], &mut map, - Country::MG, - "Madagascar", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -454,14 +455,14 @@ pub fn build( (NaiveDate::from_ymd_res(2011, 12, 25)?, "Fetin'ny noely"), ], &mut map, - Country::MG, - "Madagascar", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -492,14 +493,14 @@ pub fn build( (NaiveDate::from_ymd_res(2012, 12, 25)?, "Fetin'ny noely"), ], &mut map, - Country::MG, - "Madagascar", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -530,14 +531,14 @@ pub fn build( (NaiveDate::from_ymd_res(2013, 12, 25)?, "Fetin'ny noely"), ], &mut map, - Country::MG, - "Madagascar", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -568,14 +569,14 @@ pub fn build( (NaiveDate::from_ymd_res(2014, 12, 25)?, "Fetin'ny noely"), ], &mut map, - Country::MG, - "Madagascar", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -606,14 +607,14 @@ pub fn build( (NaiveDate::from_ymd_res(2015, 12, 25)?, "Fetin'ny noely"), ], &mut map, - Country::MG, - "Madagascar", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -644,14 +645,14 @@ pub fn build( (NaiveDate::from_ymd_res(2016, 12, 25)?, "Fetin'ny noely"), ], &mut map, - Country::MG, - "Madagascar", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -682,14 +683,14 @@ pub fn build( (NaiveDate::from_ymd_res(2017, 12, 25)?, "Fetin'ny noely"), ], &mut map, - Country::MG, - "Madagascar", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -720,14 +721,14 @@ pub fn build( (NaiveDate::from_ymd_res(2018, 12, 25)?, "Fetin'ny noely"), ], &mut map, - Country::MG, - "Madagascar", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -758,14 +759,14 @@ pub fn build( (NaiveDate::from_ymd_res(2019, 12, 25)?, "Fetin'ny noely"), ], &mut map, - Country::MG, - "Madagascar", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -796,14 +797,14 @@ pub fn build( (NaiveDate::from_ymd_res(2020, 12, 25)?, "Fetin'ny noely"), ], &mut map, - Country::MG, - "Madagascar", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -834,14 +835,14 @@ pub fn build( (NaiveDate::from_ymd_res(2021, 12, 25)?, "Fetin'ny noely"), ], &mut map, - Country::MG, - "Madagascar", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -872,14 +873,14 @@ pub fn build( (NaiveDate::from_ymd_res(2022, 12, 25)?, "Fetin'ny noely"), ], &mut map, - Country::MG, - "Madagascar", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -910,14 +911,14 @@ pub fn build( (NaiveDate::from_ymd_res(2023, 12, 25)?, "Fetin'ny noely"), ], &mut map, - Country::MG, - "Madagascar", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -948,14 +949,14 @@ pub fn build( (NaiveDate::from_ymd_res(2024, 12, 25)?, "Fetin'ny noely"), ], &mut map, - Country::MG, - "Madagascar", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -986,14 +987,14 @@ pub fn build( (NaiveDate::from_ymd_res(2025, 12, 25)?, "Fetin'ny noely"), ], &mut map, - Country::MG, - "Madagascar", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1024,14 +1025,14 @@ pub fn build( (NaiveDate::from_ymd_res(2026, 12, 25)?, "Fetin'ny noely"), ], &mut map, - Country::MG, - "Madagascar", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2027, - vec![ + [ (NaiveDate::from_ymd_res(2027, 1, 1)?, "Taom-baovao"), (NaiveDate::from_ymd_res(2027, 3, 8)?, "Fetin'ny vehivavy"), ( @@ -1064,14 +1065,14 @@ pub fn build( (NaiveDate::from_ymd_res(2027, 12, 25)?, "Fetin'ny noely"), ], &mut map, - Country::MG, - "Madagascar", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1102,14 +1103,14 @@ pub fn build( (NaiveDate::from_ymd_res(2028, 12, 25)?, "Fetin'ny noely"), ], &mut map, - Country::MG, - "Madagascar", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1140,14 +1141,14 @@ pub fn build( (NaiveDate::from_ymd_res(2029, 12, 25)?, "Fetin'ny noely"), ], &mut map, - Country::MG, - "Madagascar", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1178,8 +1179,8 @@ pub fn build( (NaiveDate::from_ymd_res(2030, 12, 25)?, "Fetin'ny noely"), ], &mut map, - Country::MG, - "Madagascar", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/mk.rs b/src/data/mk.rs index f18d492..9f508e2 100644 --- a/src/data/mk.rs +++ b/src/data/mk.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "North Macedonia"; +const COUNTY_CODE: Country = Country::MK; + /// Generate holiday map for North Macedonia. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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)?, @@ -55,14 +56,14 @@ pub fn build( ), ], &mut map, - Country::MK, - "North Macedonia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2001, - vec![ + [ (NaiveDate::from_ymd_res(2001, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2001, 1, 7)?, @@ -97,14 +98,14 @@ pub fn build( ), ], &mut map, - Country::MK, - "North Macedonia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2002, - vec![ + [ (NaiveDate::from_ymd_res(2002, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2002, 1, 7)?, @@ -139,14 +140,14 @@ pub fn build( ), ], &mut map, - Country::MK, - "North Macedonia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2003, - vec![ + [ (NaiveDate::from_ymd_res(2003, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2003, 1, 7)?, @@ -181,14 +182,14 @@ pub fn build( ), ], &mut map, - Country::MK, - "North Macedonia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2004, - vec![ + [ (NaiveDate::from_ymd_res(2004, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2004, 1, 7)?, @@ -223,14 +224,14 @@ pub fn build( ), ], &mut map, - Country::MK, - "North Macedonia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2005, - vec![ + [ (NaiveDate::from_ymd_res(2005, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2005, 1, 7)?, @@ -265,14 +266,14 @@ pub fn build( ), ], &mut map, - Country::MK, - "North Macedonia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2006, - vec![ + [ (NaiveDate::from_ymd_res(2006, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2006, 1, 7)?, @@ -303,14 +304,14 @@ pub fn build( ), ], &mut map, - Country::MK, - "North Macedonia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2007, - vec![ + [ (NaiveDate::from_ymd_res(2007, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2007, 1, 7)?, @@ -345,14 +346,14 @@ pub fn build( ), ], &mut map, - Country::MK, - "North Macedonia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2008, - vec![ + [ (NaiveDate::from_ymd_res(2008, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2008, 1, 7)?, @@ -387,14 +388,14 @@ pub fn build( ), ], &mut map, - Country::MK, - "North Macedonia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2009, - vec![ + [ (NaiveDate::from_ymd_res(2009, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2009, 1, 7)?, @@ -429,14 +430,14 @@ pub fn build( ), ], &mut map, - Country::MK, - "North Macedonia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2010, - vec![ + [ (NaiveDate::from_ymd_res(2010, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2010, 1, 7)?, @@ -471,14 +472,14 @@ pub fn build( ), ], &mut map, - Country::MK, - "North Macedonia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2011, - vec![ + [ (NaiveDate::from_ymd_res(2011, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2011, 1, 7)?, @@ -513,14 +514,14 @@ pub fn build( ), ], &mut map, - Country::MK, - "North Macedonia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2012, - vec![ + [ (NaiveDate::from_ymd_res(2012, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2012, 1, 7)?, @@ -555,14 +556,14 @@ pub fn build( ), ], &mut map, - Country::MK, - "North Macedonia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2013, - vec![ + [ (NaiveDate::from_ymd_res(2013, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2013, 1, 7)?, @@ -597,14 +598,14 @@ pub fn build( ), ], &mut map, - Country::MK, - "North Macedonia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2014, - vec![ + [ (NaiveDate::from_ymd_res(2014, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2014, 1, 7)?, @@ -639,14 +640,14 @@ pub fn build( ), ], &mut map, - Country::MK, - "North Macedonia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2015, - vec![ + [ (NaiveDate::from_ymd_res(2015, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2015, 1, 7)?, @@ -681,14 +682,14 @@ pub fn build( ), ], &mut map, - Country::MK, - "North Macedonia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2016, - vec![ + [ (NaiveDate::from_ymd_res(2016, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2016, 1, 7)?, @@ -723,14 +724,14 @@ pub fn build( ), ], &mut map, - Country::MK, - "North Macedonia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2017, - vec![ + [ (NaiveDate::from_ymd_res(2017, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2017, 1, 7)?, @@ -765,14 +766,14 @@ pub fn build( ), ], &mut map, - Country::MK, - "North Macedonia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2018, - vec![ + [ (NaiveDate::from_ymd_res(2018, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2018, 1, 7)?, @@ -807,14 +808,14 @@ pub fn build( ), ], &mut map, - Country::MK, - "North Macedonia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2019, - vec![ + [ (NaiveDate::from_ymd_res(2019, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2019, 1, 7)?, @@ -849,14 +850,14 @@ pub fn build( ), ], &mut map, - Country::MK, - "North Macedonia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2020, - vec![ + [ (NaiveDate::from_ymd_res(2020, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2020, 1, 7)?, @@ -887,14 +888,14 @@ pub fn build( ), ], &mut map, - Country::MK, - "North Macedonia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2021, - vec![ + [ (NaiveDate::from_ymd_res(2021, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2021, 1, 7)?, @@ -929,14 +930,14 @@ pub fn build( ), ], &mut map, - Country::MK, - "North Macedonia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2022, - vec![ + [ (NaiveDate::from_ymd_res(2022, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2022, 1, 7)?, @@ -971,14 +972,14 @@ pub fn build( ), ], &mut map, - Country::MK, - "North Macedonia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2023, - vec![ + [ (NaiveDate::from_ymd_res(2023, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2023, 1, 7)?, @@ -1013,14 +1014,14 @@ pub fn build( ), ], &mut map, - Country::MK, - "North Macedonia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2024, - vec![ + [ (NaiveDate::from_ymd_res(2024, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2024, 1, 7)?, @@ -1055,14 +1056,14 @@ pub fn build( ), ], &mut map, - Country::MK, - "North Macedonia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2025, - vec![ + [ (NaiveDate::from_ymd_res(2025, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2025, 1, 7)?, @@ -1097,14 +1098,14 @@ pub fn build( ), ], &mut map, - Country::MK, - "North Macedonia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2026, - vec![ + [ (NaiveDate::from_ymd_res(2026, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2026, 1, 7)?, @@ -1139,14 +1140,14 @@ pub fn build( ), ], &mut map, - Country::MK, - "North Macedonia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2027, - vec![ + [ (NaiveDate::from_ymd_res(2027, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2027, 1, 7)?, @@ -1181,14 +1182,14 @@ pub fn build( ), ], &mut map, - Country::MK, - "North Macedonia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2028, - vec![ + [ (NaiveDate::from_ymd_res(2028, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2028, 1, 7)?, @@ -1223,14 +1224,14 @@ pub fn build( ), ], &mut map, - Country::MK, - "North Macedonia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2029, - vec![ + [ (NaiveDate::from_ymd_res(2029, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2029, 1, 7)?, @@ -1265,14 +1266,14 @@ pub fn build( ), ], &mut map, - Country::MK, - "North Macedonia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2030, - vec![ + [ (NaiveDate::from_ymd_res(2030, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2030, 1, 7)?, @@ -1307,8 +1308,8 @@ pub fn build( ), ], &mut map, - Country::MK, - "North Macedonia", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/mod.rs b/src/data/mod.rs index bc1c450..c96817c 100644 --- a/src/data/mod.rs +++ b/src/data/mod.rs @@ -1,10 +1,9 @@ mod helper; -use crate::{prelude::*, Holiday, NaiveDateExt, Result, Year}; -use helper::build_year; +use crate::{prelude::*, HolidayPerCountryMap, NaiveDateExt, Result, Year}; +use helper::{build_subdivision_year, build_year}; use chrono::NaiveDate; -use std::collections::BTreeMap; use std::collections::HashMap; #[cfg(feature = "AO")] diff --git a/src/data/mt.rs b/src/data/mt.rs index bb5a9c3..9c64341 100644 --- a/src/data/mt.rs +++ b/src/data/mt.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Malta"; +const COUNTY_CODE: Country = Country::MT; + /// Generate holiday map for Malta. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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)?, @@ -49,14 +50,14 @@ pub fn build( (NaiveDate::from_ymd_res(2000, 12, 25)?, "Il-Milied"), ], &mut map, - Country::MT, - "Malta", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2001, - vec![ + [ (NaiveDate::from_ymd_res(2001, 1, 1)?, "L-Ewwel tas-Sena"), ( NaiveDate::from_ymd_res(2001, 2, 10)?, @@ -88,14 +89,14 @@ pub fn build( (NaiveDate::from_ymd_res(2001, 12, 25)?, "Il-Milied"), ], &mut map, - Country::MT, - "Malta", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2002, - vec![ + [ (NaiveDate::from_ymd_res(2002, 1, 1)?, "L-Ewwel tas-Sena"), ( NaiveDate::from_ymd_res(2002, 2, 10)?, @@ -127,14 +128,14 @@ pub fn build( (NaiveDate::from_ymd_res(2002, 12, 25)?, "Il-Milied"), ], &mut map, - Country::MT, - "Malta", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2003, - vec![ + [ (NaiveDate::from_ymd_res(2003, 1, 1)?, "L-Ewwel tas-Sena"), ( NaiveDate::from_ymd_res(2003, 2, 10)?, @@ -166,14 +167,14 @@ pub fn build( (NaiveDate::from_ymd_res(2003, 12, 25)?, "Il-Milied"), ], &mut map, - Country::MT, - "Malta", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2004, - vec![ + [ (NaiveDate::from_ymd_res(2004, 1, 1)?, "L-Ewwel tas-Sena"), ( NaiveDate::from_ymd_res(2004, 2, 10)?, @@ -205,14 +206,14 @@ pub fn build( (NaiveDate::from_ymd_res(2004, 12, 25)?, "Il-Milied"), ], &mut map, - Country::MT, - "Malta", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2005, - vec![ + [ (NaiveDate::from_ymd_res(2005, 1, 1)?, "L-Ewwel tas-Sena"), ( NaiveDate::from_ymd_res(2005, 2, 10)?, @@ -244,14 +245,14 @@ pub fn build( (NaiveDate::from_ymd_res(2005, 12, 25)?, "Il-Milied"), ], &mut map, - Country::MT, - "Malta", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2006, - vec![ + [ (NaiveDate::from_ymd_res(2006, 1, 1)?, "L-Ewwel tas-Sena"), ( NaiveDate::from_ymd_res(2006, 2, 10)?, @@ -283,14 +284,14 @@ pub fn build( (NaiveDate::from_ymd_res(2006, 12, 25)?, "Il-Milied"), ], &mut map, - Country::MT, - "Malta", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2007, - vec![ + [ (NaiveDate::from_ymd_res(2007, 1, 1)?, "L-Ewwel tas-Sena"), ( NaiveDate::from_ymd_res(2007, 2, 10)?, @@ -322,14 +323,14 @@ pub fn build( (NaiveDate::from_ymd_res(2007, 12, 25)?, "Il-Milied"), ], &mut map, - Country::MT, - "Malta", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2008, - vec![ + [ (NaiveDate::from_ymd_res(2008, 1, 1)?, "L-Ewwel tas-Sena"), ( NaiveDate::from_ymd_res(2008, 2, 10)?, @@ -361,14 +362,14 @@ pub fn build( (NaiveDate::from_ymd_res(2008, 12, 25)?, "Il-Milied"), ], &mut map, - Country::MT, - "Malta", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2009, - vec![ + [ (NaiveDate::from_ymd_res(2009, 1, 1)?, "L-Ewwel tas-Sena"), ( NaiveDate::from_ymd_res(2009, 2, 10)?, @@ -400,14 +401,14 @@ pub fn build( (NaiveDate::from_ymd_res(2009, 12, 25)?, "Il-Milied"), ], &mut map, - Country::MT, - "Malta", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2010, - vec![ + [ (NaiveDate::from_ymd_res(2010, 1, 1)?, "L-Ewwel tas-Sena"), ( NaiveDate::from_ymd_res(2010, 2, 10)?, @@ -439,14 +440,14 @@ pub fn build( (NaiveDate::from_ymd_res(2010, 12, 25)?, "Il-Milied"), ], &mut map, - Country::MT, - "Malta", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2011, - vec![ + [ (NaiveDate::from_ymd_res(2011, 1, 1)?, "L-Ewwel tas-Sena"), ( NaiveDate::from_ymd_res(2011, 2, 10)?, @@ -478,14 +479,14 @@ pub fn build( (NaiveDate::from_ymd_res(2011, 12, 25)?, "Il-Milied"), ], &mut map, - Country::MT, - "Malta", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2012, - vec![ + [ (NaiveDate::from_ymd_res(2012, 1, 1)?, "L-Ewwel tas-Sena"), ( NaiveDate::from_ymd_res(2012, 2, 10)?, @@ -517,14 +518,14 @@ pub fn build( (NaiveDate::from_ymd_res(2012, 12, 25)?, "Il-Milied"), ], &mut map, - Country::MT, - "Malta", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2013, - vec![ + [ (NaiveDate::from_ymd_res(2013, 1, 1)?, "L-Ewwel tas-Sena"), ( NaiveDate::from_ymd_res(2013, 2, 10)?, @@ -556,14 +557,14 @@ pub fn build( (NaiveDate::from_ymd_res(2013, 12, 25)?, "Il-Milied"), ], &mut map, - Country::MT, - "Malta", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2014, - vec![ + [ (NaiveDate::from_ymd_res(2014, 1, 1)?, "L-Ewwel tas-Sena"), ( NaiveDate::from_ymd_res(2014, 2, 10)?, @@ -595,14 +596,14 @@ pub fn build( (NaiveDate::from_ymd_res(2014, 12, 25)?, "Il-Milied"), ], &mut map, - Country::MT, - "Malta", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2015, - vec![ + [ (NaiveDate::from_ymd_res(2015, 1, 1)?, "L-Ewwel tas-Sena"), ( NaiveDate::from_ymd_res(2015, 2, 10)?, @@ -634,14 +635,14 @@ pub fn build( (NaiveDate::from_ymd_res(2015, 12, 25)?, "Il-Milied"), ], &mut map, - Country::MT, - "Malta", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2016, - vec![ + [ (NaiveDate::from_ymd_res(2016, 1, 1)?, "L-Ewwel tas-Sena"), ( NaiveDate::from_ymd_res(2016, 2, 10)?, @@ -673,14 +674,14 @@ pub fn build( (NaiveDate::from_ymd_res(2016, 12, 25)?, "Il-Milied"), ], &mut map, - Country::MT, - "Malta", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2017, - vec![ + [ (NaiveDate::from_ymd_res(2017, 1, 1)?, "L-Ewwel tas-Sena"), ( NaiveDate::from_ymd_res(2017, 2, 10)?, @@ -712,14 +713,14 @@ pub fn build( (NaiveDate::from_ymd_res(2017, 12, 25)?, "Il-Milied"), ], &mut map, - Country::MT, - "Malta", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2018, - vec![ + [ (NaiveDate::from_ymd_res(2018, 1, 1)?, "L-Ewwel tas-Sena"), ( NaiveDate::from_ymd_res(2018, 2, 10)?, @@ -751,14 +752,14 @@ pub fn build( (NaiveDate::from_ymd_res(2018, 12, 25)?, "Il-Milied"), ], &mut map, - Country::MT, - "Malta", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2019, - vec![ + [ (NaiveDate::from_ymd_res(2019, 1, 1)?, "L-Ewwel tas-Sena"), ( NaiveDate::from_ymd_res(2019, 2, 10)?, @@ -790,14 +791,14 @@ pub fn build( (NaiveDate::from_ymd_res(2019, 12, 25)?, "Il-Milied"), ], &mut map, - Country::MT, - "Malta", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2020, - vec![ + [ (NaiveDate::from_ymd_res(2020, 1, 1)?, "L-Ewwel tas-Sena"), ( NaiveDate::from_ymd_res(2020, 2, 10)?, @@ -829,14 +830,14 @@ pub fn build( (NaiveDate::from_ymd_res(2020, 12, 25)?, "Il-Milied"), ], &mut map, - Country::MT, - "Malta", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2021, - vec![ + [ (NaiveDate::from_ymd_res(2021, 1, 1)?, "L-Ewwel tas-Sena"), ( NaiveDate::from_ymd_res(2021, 2, 10)?, @@ -868,14 +869,14 @@ pub fn build( (NaiveDate::from_ymd_res(2021, 12, 25)?, "Il-Milied"), ], &mut map, - Country::MT, - "Malta", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2022, - vec![ + [ (NaiveDate::from_ymd_res(2022, 1, 1)?, "L-Ewwel tas-Sena"), ( NaiveDate::from_ymd_res(2022, 2, 10)?, @@ -907,14 +908,14 @@ pub fn build( (NaiveDate::from_ymd_res(2022, 12, 25)?, "Il-Milied"), ], &mut map, - Country::MT, - "Malta", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2023, - vec![ + [ (NaiveDate::from_ymd_res(2023, 1, 1)?, "L-Ewwel tas-Sena"), ( NaiveDate::from_ymd_res(2023, 2, 10)?, @@ -946,14 +947,14 @@ pub fn build( (NaiveDate::from_ymd_res(2023, 12, 25)?, "Il-Milied"), ], &mut map, - Country::MT, - "Malta", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2024, - vec![ + [ (NaiveDate::from_ymd_res(2024, 1, 1)?, "L-Ewwel tas-Sena"), ( NaiveDate::from_ymd_res(2024, 2, 10)?, @@ -985,14 +986,14 @@ pub fn build( (NaiveDate::from_ymd_res(2024, 12, 25)?, "Il-Milied"), ], &mut map, - Country::MT, - "Malta", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2025, - vec![ + [ (NaiveDate::from_ymd_res(2025, 1, 1)?, "L-Ewwel tas-Sena"), ( NaiveDate::from_ymd_res(2025, 2, 10)?, @@ -1024,14 +1025,14 @@ pub fn build( (NaiveDate::from_ymd_res(2025, 12, 25)?, "Il-Milied"), ], &mut map, - Country::MT, - "Malta", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2026, - vec![ + [ (NaiveDate::from_ymd_res(2026, 1, 1)?, "L-Ewwel tas-Sena"), ( NaiveDate::from_ymd_res(2026, 2, 10)?, @@ -1063,14 +1064,14 @@ pub fn build( (NaiveDate::from_ymd_res(2026, 12, 25)?, "Il-Milied"), ], &mut map, - Country::MT, - "Malta", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2027, - vec![ + [ (NaiveDate::from_ymd_res(2027, 1, 1)?, "L-Ewwel tas-Sena"), ( NaiveDate::from_ymd_res(2027, 2, 10)?, @@ -1102,14 +1103,14 @@ pub fn build( (NaiveDate::from_ymd_res(2027, 12, 25)?, "Il-Milied"), ], &mut map, - Country::MT, - "Malta", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2028, - vec![ + [ (NaiveDate::from_ymd_res(2028, 1, 1)?, "L-Ewwel tas-Sena"), ( NaiveDate::from_ymd_res(2028, 2, 10)?, @@ -1141,14 +1142,14 @@ pub fn build( (NaiveDate::from_ymd_res(2028, 12, 25)?, "Il-Milied"), ], &mut map, - Country::MT, - "Malta", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2029, - vec![ + [ (NaiveDate::from_ymd_res(2029, 1, 1)?, "L-Ewwel tas-Sena"), ( NaiveDate::from_ymd_res(2029, 2, 10)?, @@ -1180,14 +1181,14 @@ pub fn build( (NaiveDate::from_ymd_res(2029, 12, 25)?, "Il-Milied"), ], &mut map, - Country::MT, - "Malta", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2030, - vec![ + [ (NaiveDate::from_ymd_res(2030, 1, 1)?, "L-Ewwel tas-Sena"), ( NaiveDate::from_ymd_res(2030, 2, 10)?, @@ -1219,8 +1220,8 @@ pub fn build( (NaiveDate::from_ymd_res(2030, 12, 25)?, "Il-Milied"), ], &mut map, - Country::MT, - "Malta", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/mw.rs b/src/data/mw.rs index 5f6f37d..7919a4a 100644 --- a/src/data/mw.rs +++ b/src/data/mw.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Malawi"; +const COUNTY_CODE: Country = Country::MW; + /// Generate holiday map for Malawi. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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)?, @@ -47,14 +48,14 @@ pub fn build( (NaiveDate::from_ymd_res(2000, 12, 26)?, "Boxing Day"), ], &mut map, - Country::MW, - "Malawi", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -72,14 +73,14 @@ pub fn build( (NaiveDate::from_ymd_res(2001, 12, 26)?, "Boxing Day"), ], &mut map, - Country::MW, - "Malawi", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -101,14 +102,14 @@ pub fn build( (NaiveDate::from_ymd_res(2002, 12, 26)?, "Boxing Day"), ], &mut map, - Country::MW, - "Malawi", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -126,14 +127,14 @@ pub fn build( (NaiveDate::from_ymd_res(2003, 12, 26)?, "Boxing Day"), ], &mut map, - Country::MW, - "Malawi", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -159,14 +160,14 @@ pub fn build( ), ], &mut map, - Country::MW, - "Malawi", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2005, - vec![ + [ (NaiveDate::from_ymd_res(2005, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2005, 1, 3)?, @@ -204,14 +205,14 @@ pub fn build( (NaiveDate::from_ymd_res(2005, 12, 26)?, "Boxing Day"), ], &mut map, - Country::MW, - "Malawi", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2006, - vec![ + [ (NaiveDate::from_ymd_res(2006, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2006, 1, 2)?, @@ -241,14 +242,14 @@ pub fn build( (NaiveDate::from_ymd_res(2006, 12, 26)?, "Boxing Day"), ], &mut map, - Country::MW, - "Malawi", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -266,14 +267,14 @@ pub fn build( (NaiveDate::from_ymd_res(2007, 12, 26)?, "Boxing Day"), ], &mut map, - Country::MW, - "Malawi", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -291,14 +292,14 @@ pub fn build( (NaiveDate::from_ymd_res(2008, 12, 26)?, "Boxing Day"), ], &mut map, - Country::MW, - "Malawi", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -316,14 +317,14 @@ pub fn build( ), ], &mut map, - Country::MW, - "Malawi", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -349,14 +350,14 @@ pub fn build( ), ], &mut map, - Country::MW, - "Malawi", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2011, - vec![ + [ (NaiveDate::from_ymd_res(2011, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2011, 1, 3)?, @@ -394,14 +395,14 @@ pub fn build( (NaiveDate::from_ymd_res(2011, 12, 26)?, "Boxing Day"), ], &mut map, - Country::MW, - "Malawi", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2012, - vec![ + [ (NaiveDate::from_ymd_res(2012, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2012, 1, 2)?, @@ -427,14 +428,14 @@ pub fn build( (NaiveDate::from_ymd_res(2012, 12, 26)?, "Boxing Day"), ], &mut map, - Country::MW, - "Malawi", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -456,14 +457,14 @@ pub fn build( (NaiveDate::from_ymd_res(2013, 12, 26)?, "Boxing Day"), ], &mut map, - Country::MW, - "Malawi", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -481,14 +482,14 @@ pub fn build( (NaiveDate::from_ymd_res(2014, 12, 26)?, "Boxing Day"), ], &mut map, - Country::MW, - "Malawi", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -506,14 +507,14 @@ pub fn build( ), ], &mut map, - Country::MW, - "Malawi", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -543,14 +544,14 @@ pub fn build( (NaiveDate::from_ymd_res(2016, 12, 26)?, "Boxing Day"), ], &mut map, - Country::MW, - "Malawi", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2017, - vec![ + [ (NaiveDate::from_ymd_res(2017, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2017, 1, 2)?, @@ -580,14 +581,14 @@ pub fn build( (NaiveDate::from_ymd_res(2017, 12, 26)?, "Boxing Day"), ], &mut map, - Country::MW, - "Malawi", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -605,14 +606,14 @@ pub fn build( (NaiveDate::from_ymd_res(2018, 12, 26)?, "Boxing Day"), ], &mut map, - Country::MW, - "Malawi", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -634,14 +635,14 @@ pub fn build( (NaiveDate::from_ymd_res(2019, 12, 26)?, "Boxing Day"), ], &mut map, - Country::MW, - "Malawi", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -659,14 +660,14 @@ pub fn build( ), ], &mut map, - Country::MW, - "Malawi", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -692,14 +693,14 @@ pub fn build( ), ], &mut map, - Country::MW, - "Malawi", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2022, - vec![ + [ (NaiveDate::from_ymd_res(2022, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2022, 1, 3)?, @@ -737,14 +738,14 @@ pub fn build( (NaiveDate::from_ymd_res(2022, 12, 26)?, "Boxing Day"), ], &mut map, - Country::MW, - "Malawi", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2023, - vec![ + [ (NaiveDate::from_ymd_res(2023, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2023, 1, 2)?, @@ -774,14 +775,14 @@ pub fn build( (NaiveDate::from_ymd_res(2023, 12, 26)?, "Boxing Day"), ], &mut map, - Country::MW, - "Malawi", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -803,14 +804,14 @@ pub fn build( (NaiveDate::from_ymd_res(2024, 12, 26)?, "Boxing Day"), ], &mut map, - Country::MW, - "Malawi", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -828,14 +829,14 @@ pub fn build( (NaiveDate::from_ymd_res(2025, 12, 26)?, "Boxing Day"), ], &mut map, - Country::MW, - "Malawi", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -853,14 +854,14 @@ pub fn build( ), ], &mut map, - Country::MW, - "Malawi", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -886,14 +887,14 @@ pub fn build( ), ], &mut map, - Country::MW, - "Malawi", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2028, - vec![ + [ (NaiveDate::from_ymd_res(2028, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2028, 1, 3)?, @@ -923,14 +924,14 @@ pub fn build( (NaiveDate::from_ymd_res(2028, 12, 26)?, "Boxing Day"), ], &mut map, - Country::MW, - "Malawi", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -948,14 +949,14 @@ pub fn build( (NaiveDate::from_ymd_res(2029, 12, 26)?, "Boxing Day"), ], &mut map, - Country::MW, - "Malawi", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -977,8 +978,8 @@ pub fn build( (NaiveDate::from_ymd_res(2030, 12, 26)?, "Boxing Day"), ], &mut map, - Country::MW, - "Malawi", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/mx.rs b/src/data/mx.rs index 707caa5..1203b1c 100644 --- a/src/data/mx.rs +++ b/src/data/mx.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Mexico"; +const COUNTY_CODE: Country = Country::MX; + /// Generate holiday map for Mexico. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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)?, @@ -43,14 +44,14 @@ pub fn build( (NaiveDate::from_ymd_res(2000, 12, 25)?, "Navidad"), ], &mut map, - Country::MX, - "Mexico", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2001, - vec![ + [ (NaiveDate::from_ymd_res(2001, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2001, 2, 5)?, @@ -72,14 +73,14 @@ pub fn build( (NaiveDate::from_ymd_res(2001, 12, 25)?, "Navidad"), ], &mut map, - Country::MX, - "Mexico", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2002, - vec![ + [ (NaiveDate::from_ymd_res(2002, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2002, 2, 5)?, @@ -101,14 +102,14 @@ pub fn build( (NaiveDate::from_ymd_res(2002, 12, 25)?, "Navidad"), ], &mut map, - Country::MX, - "Mexico", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2003, - vec![ + [ (NaiveDate::from_ymd_res(2003, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2003, 2, 5)?, @@ -130,14 +131,14 @@ pub fn build( (NaiveDate::from_ymd_res(2003, 12, 25)?, "Navidad"), ], &mut map, - Country::MX, - "Mexico", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2004, - vec![ + [ (NaiveDate::from_ymd_res(2004, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2004, 2, 5)?, @@ -159,14 +160,14 @@ pub fn build( (NaiveDate::from_ymd_res(2004, 12, 25)?, "Navidad"), ], &mut map, - Country::MX, - "Mexico", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2005, - vec![ + [ (NaiveDate::from_ymd_res(2005, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2005, 2, 5)?, @@ -188,14 +189,14 @@ pub fn build( (NaiveDate::from_ymd_res(2005, 12, 25)?, "Navidad"), ], &mut map, - Country::MX, - "Mexico", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2006, - vec![ + [ (NaiveDate::from_ymd_res(2006, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2006, 2, 6)?, @@ -221,14 +222,14 @@ pub fn build( (NaiveDate::from_ymd_res(2006, 12, 25)?, "Navidad"), ], &mut map, - Country::MX, - "Mexico", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2007, - vec![ + [ (NaiveDate::from_ymd_res(2007, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2007, 2, 5)?, @@ -250,14 +251,14 @@ pub fn build( (NaiveDate::from_ymd_res(2007, 12, 25)?, "Navidad"), ], &mut map, - Country::MX, - "Mexico", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2008, - vec![ + [ (NaiveDate::from_ymd_res(2008, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2008, 2, 4)?, @@ -279,14 +280,14 @@ pub fn build( (NaiveDate::from_ymd_res(2008, 12, 25)?, "Navidad"), ], &mut map, - Country::MX, - "Mexico", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2009, - vec![ + [ (NaiveDate::from_ymd_res(2009, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2009, 2, 2)?, @@ -308,14 +309,14 @@ pub fn build( (NaiveDate::from_ymd_res(2009, 12, 25)?, "Navidad"), ], &mut map, - Country::MX, - "Mexico", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2010, - vec![ + [ (NaiveDate::from_ymd_res(2010, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2010, 2, 1)?, @@ -337,14 +338,14 @@ pub fn build( (NaiveDate::from_ymd_res(2010, 12, 25)?, "Navidad"), ], &mut map, - Country::MX, - "Mexico", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2011, - vec![ + [ (NaiveDate::from_ymd_res(2011, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2011, 2, 7)?, @@ -366,14 +367,14 @@ pub fn build( (NaiveDate::from_ymd_res(2011, 12, 25)?, "Navidad"), ], &mut map, - Country::MX, - "Mexico", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2012, - vec![ + [ (NaiveDate::from_ymd_res(2012, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2012, 2, 6)?, @@ -399,14 +400,14 @@ pub fn build( (NaiveDate::from_ymd_res(2012, 12, 25)?, "Navidad"), ], &mut map, - Country::MX, - "Mexico", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2013, - vec![ + [ (NaiveDate::from_ymd_res(2013, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2013, 2, 4)?, @@ -428,14 +429,14 @@ pub fn build( (NaiveDate::from_ymd_res(2013, 12, 25)?, "Navidad"), ], &mut map, - Country::MX, - "Mexico", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2014, - vec![ + [ (NaiveDate::from_ymd_res(2014, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2014, 2, 3)?, @@ -457,14 +458,14 @@ pub fn build( (NaiveDate::from_ymd_res(2014, 12, 25)?, "Navidad"), ], &mut map, - Country::MX, - "Mexico", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2015, - vec![ + [ (NaiveDate::from_ymd_res(2015, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2015, 2, 2)?, @@ -486,14 +487,14 @@ pub fn build( (NaiveDate::from_ymd_res(2015, 12, 25)?, "Navidad"), ], &mut map, - Country::MX, - "Mexico", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2016, - vec![ + [ (NaiveDate::from_ymd_res(2016, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2016, 2, 1)?, @@ -515,14 +516,14 @@ pub fn build( (NaiveDate::from_ymd_res(2016, 12, 25)?, "Navidad"), ], &mut map, - Country::MX, - "Mexico", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2017, - vec![ + [ (NaiveDate::from_ymd_res(2017, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2017, 2, 6)?, @@ -544,14 +545,14 @@ pub fn build( (NaiveDate::from_ymd_res(2017, 12, 25)?, "Navidad"), ], &mut map, - Country::MX, - "Mexico", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2018, - vec![ + [ (NaiveDate::from_ymd_res(2018, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2018, 2, 5)?, @@ -577,14 +578,14 @@ pub fn build( (NaiveDate::from_ymd_res(2018, 12, 25)?, "Navidad"), ], &mut map, - Country::MX, - "Mexico", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2019, - vec![ + [ (NaiveDate::from_ymd_res(2019, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2019, 2, 4)?, @@ -606,14 +607,14 @@ pub fn build( (NaiveDate::from_ymd_res(2019, 12, 25)?, "Navidad"), ], &mut map, - Country::MX, - "Mexico", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2020, - vec![ + [ (NaiveDate::from_ymd_res(2020, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2020, 2, 3)?, @@ -635,14 +636,14 @@ pub fn build( (NaiveDate::from_ymd_res(2020, 12, 25)?, "Navidad"), ], &mut map, - Country::MX, - "Mexico", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2021, - vec![ + [ (NaiveDate::from_ymd_res(2021, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2021, 2, 1)?, @@ -664,14 +665,14 @@ pub fn build( (NaiveDate::from_ymd_res(2021, 12, 25)?, "Navidad"), ], &mut map, - Country::MX, - "Mexico", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2022, - vec![ + [ (NaiveDate::from_ymd_res(2022, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2022, 2, 7)?, @@ -693,14 +694,14 @@ pub fn build( (NaiveDate::from_ymd_res(2022, 12, 25)?, "Navidad"), ], &mut map, - Country::MX, - "Mexico", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2023, - vec![ + [ (NaiveDate::from_ymd_res(2023, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2023, 2, 6)?, @@ -722,14 +723,14 @@ pub fn build( (NaiveDate::from_ymd_res(2023, 12, 25)?, "Navidad"), ], &mut map, - Country::MX, - "Mexico", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2024, - vec![ + [ (NaiveDate::from_ymd_res(2024, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2024, 2, 5)?, @@ -755,14 +756,14 @@ pub fn build( (NaiveDate::from_ymd_res(2024, 12, 25)?, "Navidad"), ], &mut map, - Country::MX, - "Mexico", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2025, - vec![ + [ (NaiveDate::from_ymd_res(2025, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2025, 2, 3)?, @@ -784,14 +785,14 @@ pub fn build( (NaiveDate::from_ymd_res(2025, 12, 25)?, "Navidad"), ], &mut map, - Country::MX, - "Mexico", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2026, - vec![ + [ (NaiveDate::from_ymd_res(2026, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2026, 2, 2)?, @@ -813,14 +814,14 @@ pub fn build( (NaiveDate::from_ymd_res(2026, 12, 25)?, "Navidad"), ], &mut map, - Country::MX, - "Mexico", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2027, - vec![ + [ (NaiveDate::from_ymd_res(2027, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2027, 2, 1)?, @@ -842,14 +843,14 @@ pub fn build( (NaiveDate::from_ymd_res(2027, 12, 25)?, "Navidad"), ], &mut map, - Country::MX, - "Mexico", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2028, - vec![ + [ (NaiveDate::from_ymd_res(2028, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2028, 2, 7)?, @@ -871,14 +872,14 @@ pub fn build( (NaiveDate::from_ymd_res(2028, 12, 25)?, "Navidad"), ], &mut map, - Country::MX, - "Mexico", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2029, - vec![ + [ (NaiveDate::from_ymd_res(2029, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2029, 2, 5)?, @@ -900,14 +901,14 @@ pub fn build( (NaiveDate::from_ymd_res(2029, 12, 25)?, "Navidad"), ], &mut map, - Country::MX, - "Mexico", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2030, - vec![ + [ (NaiveDate::from_ymd_res(2030, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2030, 2, 4)?, @@ -933,8 +934,8 @@ pub fn build( (NaiveDate::from_ymd_res(2030, 12, 25)?, "Navidad"), ], &mut map, - Country::MX, - "Mexico", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/my.rs b/src/data/my.rs index 47a3ef6..4cbfaee 100644 --- a/src/data/my.rs +++ b/src/data/my.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Malaysia"; +const COUNTY_CODE: Country = Country::MY; + /// Generate holiday map for Malaysia. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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)", @@ -75,14 +76,14 @@ pub fn build( ), ], &mut map, - Country::MY, - "Malaysia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2001, - vec![ + [ (NaiveDate::from_ymd_res(2001, 1, 24)?, "Tahun Baharu Cina"), ( NaiveDate::from_ymd_res(2001, 1, 25)?, @@ -109,14 +110,14 @@ pub fn build( (NaiveDate::from_ymd_res(2001, 3, 6)?, "Hari Raya Qurban"), ], &mut map, - Country::MY, - "Malaysia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2002, - vec![ + [ (NaiveDate::from_ymd_res(2002, 2, 12)?, "Tahun Baharu Cina"), ( NaiveDate::from_ymd_res(2002, 2, 13)?, @@ -143,14 +144,14 @@ pub fn build( (NaiveDate::from_ymd_res(2002, 2, 23)?, "Hari Raya Qurban"), ], &mut map, - Country::MY, - "Malaysia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2003, - vec![ + [ (NaiveDate::from_ymd_res(2003, 2, 1)?, "Tahun Baharu Cina"), ( NaiveDate::from_ymd_res(2003, 2, 2)?, @@ -182,14 +183,14 @@ pub fn build( (NaiveDate::from_ymd_res(2003, 9, 1)?, "Cuti Hari Kebangsaan"), ], &mut map, - Country::MY, - "Malaysia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2004, - vec![ + [ (NaiveDate::from_ymd_res(2004, 1, 22)?, "Tahun Baharu Cina"), ( NaiveDate::from_ymd_res(2004, 1, 23)?, @@ -224,14 +225,14 @@ pub fn build( ), ], &mut map, - Country::MY, - "Malaysia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2005, - vec![ + [ (NaiveDate::from_ymd_res(2005, 2, 9)?, "Tahun Baharu Cina"), ( NaiveDate::from_ymd_res(2005, 2, 10)?, @@ -260,14 +261,14 @@ pub fn build( (NaiveDate::from_ymd_res(2005, 12, 26)?, "Cuti Hari Krismas"), ], &mut map, - Country::MY, - "Malaysia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2006, - vec![ + [ (NaiveDate::from_ymd_res(2006, 1, 29)?, "Tahun Baharu Cina"), ( NaiveDate::from_ymd_res(2006, 1, 30)?, @@ -299,14 +300,14 @@ pub fn build( ), ], &mut map, - Country::MY, - "Malaysia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2007, - vec![ + [ (NaiveDate::from_ymd_res(2007, 2, 18)?, "Tahun Baharu Cina"), ( NaiveDate::from_ymd_res(2007, 2, 19)?, @@ -343,14 +344,14 @@ pub fn build( ), ], &mut map, - Country::MY, - "Malaysia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2008, - vec![ + [ (NaiveDate::from_ymd_res(2008, 2, 7)?, "Tahun Baharu Cina"), ( NaiveDate::from_ymd_res(2008, 2, 8)?, @@ -379,14 +380,14 @@ pub fn build( (NaiveDate::from_ymd_res(2008, 9, 1)?, "Cuti Hari Kebangsaan"), ], &mut map, - Country::MY, - "Malaysia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2009, - vec![ + [ (NaiveDate::from_ymd_res(2009, 1, 26)?, "Tahun Baharu Cina"), ( NaiveDate::from_ymd_res(2009, 1, 27)?, @@ -417,14 +418,14 @@ pub fn build( ), ], &mut map, - Country::MY, - "Malaysia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2010, - vec![ + [ (NaiveDate::from_ymd_res(2010, 2, 14)?, "Tahun Baharu Cina"), ( NaiveDate::from_ymd_res(2010, 2, 15)?, @@ -456,14 +457,14 @@ pub fn build( ), ], &mut map, - Country::MY, - "Malaysia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2011, - vec![ + [ (NaiveDate::from_ymd_res(2011, 2, 3)?, "Tahun Baharu Cina"), ( NaiveDate::from_ymd_res(2011, 2, 4)?, @@ -495,14 +496,14 @@ pub fn build( (NaiveDate::from_ymd_res(2011, 12, 26)?, "Cuti Hari Krismas"), ], &mut map, - Country::MY, - "Malaysia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2012, - vec![ + [ (NaiveDate::from_ymd_res(2012, 1, 23)?, "Tahun Baharu Cina"), ( NaiveDate::from_ymd_res(2012, 1, 24)?, @@ -539,14 +540,14 @@ pub fn build( (NaiveDate::from_ymd_res(2012, 9, 17)?, "Cuti Hari Malaysia"), ], &mut map, - Country::MY, - "Malaysia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2013, - vec![ + [ (NaiveDate::from_ymd_res(2013, 2, 10)?, "Tahun Baharu Cina"), ( NaiveDate::from_ymd_res(2013, 2, 11)?, @@ -578,14 +579,14 @@ pub fn build( ), ], &mut map, - Country::MY, - "Malaysia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2014, - vec![ + [ (NaiveDate::from_ymd_res(2014, 1, 31)?, "Tahun Baharu Cina"), ( NaiveDate::from_ymd_res(2014, 2, 1)?, @@ -618,14 +619,14 @@ pub fn build( ), ], &mut map, - Country::MY, - "Malaysia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2015, - vec![ + [ (NaiveDate::from_ymd_res(2015, 2, 19)?, "Tahun Baharu Cina"), ( NaiveDate::from_ymd_res(2015, 2, 20)?, @@ -658,14 +659,14 @@ pub fn build( (NaiveDate::from_ymd_res(2015, 5, 4)?, "Cuti Hari Wesak"), ], &mut map, - Country::MY, - "Malaysia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2016, - vec![ + [ (NaiveDate::from_ymd_res(2016, 2, 8)?, "Tahun Baharu Cina"), ( NaiveDate::from_ymd_res(2016, 2, 9)?, @@ -695,14 +696,14 @@ pub fn build( (NaiveDate::from_ymd_res(2016, 12, 26)?, "Cuti Hari Krismas"), ], &mut map, - Country::MY, - "Malaysia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2017, - vec![ + [ (NaiveDate::from_ymd_res(2017, 1, 28)?, "Tahun Baharu Cina"), ( NaiveDate::from_ymd_res(2017, 1, 29)?, @@ -746,14 +747,14 @@ pub fn build( ), ], &mut map, - Country::MY, - "Malaysia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2018, - vec![ + [ (NaiveDate::from_ymd_res(2018, 2, 16)?, "Tahun Baharu Cina"), ( NaiveDate::from_ymd_res(2018, 2, 17)?, @@ -790,14 +791,14 @@ pub fn build( (NaiveDate::from_ymd_res(2018, 9, 17)?, "Cuti Hari Malaysia"), ], &mut map, - Country::MY, - "Malaysia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2019, - vec![ + [ (NaiveDate::from_ymd_res(2019, 2, 5)?, "Tahun Baharu Cina"), ( NaiveDate::from_ymd_res(2019, 2, 6)?, @@ -834,14 +835,14 @@ pub fn build( ), ], &mut map, - Country::MY, - "Malaysia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2020, - vec![ + [ (NaiveDate::from_ymd_res(2020, 1, 25)?, "Tahun Baharu Cina"), ( NaiveDate::from_ymd_res(2020, 1, 26)?, @@ -877,14 +878,14 @@ pub fn build( ), ], &mut map, - Country::MY, - "Malaysia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2021, - vec![ + [ (NaiveDate::from_ymd_res(2021, 2, 12)?, "Tahun Baharu Cina"), ( NaiveDate::from_ymd_res(2021, 2, 13)?, @@ -912,14 +913,14 @@ pub fn build( (NaiveDate::from_ymd_res(2021, 7, 20)?, "Hari Raya Qurban"), ], &mut map, - Country::MY, - "Malaysia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2022, - vec![ + [ (NaiveDate::from_ymd_res(2022, 2, 1)?, "Tahun Baharu Cina"), ( NaiveDate::from_ymd_res(2022, 2, 2)?, @@ -963,14 +964,14 @@ pub fn build( (NaiveDate::from_ymd_res(2022, 12, 26)?, "Cuti Hari Krismas"), ], &mut map, - Country::MY, - "Malaysia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2023, - vec![ + [ (NaiveDate::from_ymd_res(2023, 1, 22)?, "Tahun Baharu Cina"), ( NaiveDate::from_ymd_res(2023, 1, 23)?, @@ -1010,14 +1011,14 @@ pub fn build( ), ], &mut map, - Country::MY, - "Malaysia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2024, - vec![ + [ (NaiveDate::from_ymd_res(2024, 2, 10)?, "Tahun Baharu Cina"), ( NaiveDate::from_ymd_res(2024, 2, 11)?, @@ -1048,14 +1049,14 @@ pub fn build( ), ], &mut map, - Country::MY, - "Malaysia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2025, - vec![ + [ ( NaiveDate::from_ymd_res(2025, 1, 29)?, "Tahun Baharu Cina (anggaran)", @@ -1107,14 +1108,14 @@ pub fn build( (NaiveDate::from_ymd_res(2025, 9, 1)?, "Cuti Hari Kebangsaan"), ], &mut map, - Country::MY, - "Malaysia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2026, - vec![ + [ ( NaiveDate::from_ymd_res(2026, 2, 17)?, "Tahun Baharu Cina (anggaran)", @@ -1156,14 +1157,14 @@ pub fn build( ), ], &mut map, - Country::MY, - "Malaysia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2027, - vec![ + [ ( NaiveDate::from_ymd_res(2027, 2, 6)?, "Tahun Baharu Cina (anggaran)", @@ -1214,14 +1215,14 @@ pub fn build( ), ], &mut map, - Country::MY, - "Malaysia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2028, - vec![ + [ ( NaiveDate::from_ymd_res(2028, 1, 26)?, "Tahun Baharu Cina (anggaran)", @@ -1268,14 +1269,14 @@ pub fn build( ), ], &mut map, - Country::MY, - "Malaysia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2029, - vec![ + [ ( NaiveDate::from_ymd_res(2029, 2, 13)?, "Tahun Baharu Cina (anggaran)", @@ -1319,14 +1320,14 @@ pub fn build( (NaiveDate::from_ymd_res(2029, 9, 17)?, "Cuti Hari Malaysia"), ], &mut map, - Country::MY, - "Malaysia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2030, - vec![ + [ ( NaiveDate::from_ymd_res(2030, 2, 3)?, "Tahun Baharu Cina (anggaran)", @@ -1369,8 +1370,8 @@ pub fn build( ), ], &mut map, - Country::MY, - "Malaysia", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/mz.rs b/src/data/mz.rs index feb5639..27ff951 100644 --- a/src/data/mz.rs +++ b/src/data/mz.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Mozambique"; +const COUNTY_CODE: Country = Country::MZ; + /// Generate holiday map for Mozambique. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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", @@ -54,14 +55,14 @@ pub fn build( (NaiveDate::from_ymd_res(2000, 12, 25)?, "Dia da Família"), ], &mut map, - Country::MZ, - "Mozambique", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2001, - vec![ + [ ( NaiveDate::from_ymd_res(2001, 1, 1)?, "Dia da Fraternidade universal", @@ -94,14 +95,14 @@ pub fn build( (NaiveDate::from_ymd_res(2001, 12, 25)?, "Dia da Família"), ], &mut map, - Country::MZ, - "Mozambique", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2002, - vec![ + [ ( NaiveDate::from_ymd_res(2002, 1, 1)?, "Dia da Fraternidade universal", @@ -142,14 +143,14 @@ pub fn build( (NaiveDate::from_ymd_res(2002, 12, 25)?, "Dia da Família"), ], &mut map, - Country::MZ, - "Mozambique", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2003, - vec![ + [ ( NaiveDate::from_ymd_res(2003, 1, 1)?, "Dia da Fraternidade universal", @@ -186,14 +187,14 @@ pub fn build( (NaiveDate::from_ymd_res(2003, 12, 25)?, "Dia da Família"), ], &mut map, - Country::MZ, - "Mozambique", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2004, - vec![ + [ ( NaiveDate::from_ymd_res(2004, 1, 1)?, "Dia da Fraternidade universal", @@ -226,14 +227,14 @@ pub fn build( (NaiveDate::from_ymd_res(2004, 12, 25)?, "Dia da Família"), ], &mut map, - Country::MZ, - "Mozambique", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2005, - vec![ + [ ( NaiveDate::from_ymd_res(2005, 1, 1)?, "Dia da Fraternidade universal", @@ -278,14 +279,14 @@ pub fn build( ), ], &mut map, - Country::MZ, - "Mozambique", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2006, - vec![ + [ ( NaiveDate::from_ymd_res(2006, 1, 1)?, "Dia da Fraternidade universal", @@ -326,14 +327,14 @@ pub fn build( (NaiveDate::from_ymd_res(2006, 12, 25)?, "Dia da Família"), ], &mut map, - Country::MZ, - "Mozambique", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2007, - vec![ + [ ( NaiveDate::from_ymd_res(2007, 1, 1)?, "Dia da Fraternidade universal", @@ -366,14 +367,14 @@ pub fn build( (NaiveDate::from_ymd_res(2007, 12, 25)?, "Dia da Família"), ], &mut map, - Country::MZ, - "Mozambique", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2008, - vec![ + [ ( NaiveDate::from_ymd_res(2008, 1, 1)?, "Dia da Fraternidade universal", @@ -414,14 +415,14 @@ pub fn build( (NaiveDate::from_ymd_res(2008, 12, 25)?, "Dia da Família"), ], &mut map, - Country::MZ, - "Mozambique", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2009, - vec![ + [ ( NaiveDate::from_ymd_res(2009, 1, 1)?, "Dia da Fraternidade universal", @@ -458,14 +459,14 @@ pub fn build( (NaiveDate::from_ymd_res(2009, 12, 25)?, "Dia da Família"), ], &mut map, - Country::MZ, - "Mozambique", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2010, - vec![ + [ ( NaiveDate::from_ymd_res(2010, 1, 1)?, "Dia da Fraternidade universal", @@ -498,14 +499,14 @@ pub fn build( (NaiveDate::from_ymd_res(2010, 12, 25)?, "Dia da Família"), ], &mut map, - Country::MZ, - "Mozambique", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2011, - vec![ + [ ( NaiveDate::from_ymd_res(2011, 1, 1)?, "Dia da Fraternidade universal", @@ -550,14 +551,14 @@ pub fn build( ), ], &mut map, - Country::MZ, - "Mozambique", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2012, - vec![ + [ ( NaiveDate::from_ymd_res(2012, 1, 1)?, "Dia da Fraternidade universal", @@ -594,14 +595,14 @@ pub fn build( (NaiveDate::from_ymd_res(2012, 12, 25)?, "Dia da Família"), ], &mut map, - Country::MZ, - "Mozambique", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2013, - vec![ + [ ( NaiveDate::from_ymd_res(2013, 1, 1)?, "Dia da Fraternidade universal", @@ -642,14 +643,14 @@ pub fn build( (NaiveDate::from_ymd_res(2013, 12, 25)?, "Dia da Família"), ], &mut map, - Country::MZ, - "Mozambique", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2014, - vec![ + [ ( NaiveDate::from_ymd_res(2014, 1, 1)?, "Dia da Fraternidade universal", @@ -686,14 +687,14 @@ pub fn build( (NaiveDate::from_ymd_res(2014, 12, 25)?, "Dia da Família"), ], &mut map, - Country::MZ, - "Mozambique", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2015, - vec![ + [ ( NaiveDate::from_ymd_res(2015, 1, 1)?, "Dia da Fraternidade universal", @@ -730,14 +731,14 @@ pub fn build( (NaiveDate::from_ymd_res(2015, 12, 25)?, "Dia da Família"), ], &mut map, - Country::MZ, - "Mozambique", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2016, - vec![ + [ ( NaiveDate::from_ymd_res(2016, 1, 1)?, "Dia da Fraternidade universal", @@ -782,14 +783,14 @@ pub fn build( ), ], &mut map, - Country::MZ, - "Mozambique", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2017, - vec![ + [ ( NaiveDate::from_ymd_res(2017, 1, 1)?, "Dia da Fraternidade universal", @@ -830,14 +831,14 @@ pub fn build( (NaiveDate::from_ymd_res(2017, 12, 25)?, "Dia da Família"), ], &mut map, - Country::MZ, - "Mozambique", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2018, - vec![ + [ ( NaiveDate::from_ymd_res(2018, 1, 1)?, "Dia da Fraternidade universal", @@ -870,14 +871,14 @@ pub fn build( (NaiveDate::from_ymd_res(2018, 12, 25)?, "Dia da Família"), ], &mut map, - Country::MZ, - "Mozambique", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2019, - vec![ + [ ( NaiveDate::from_ymd_res(2019, 1, 1)?, "Dia da Fraternidade universal", @@ -918,14 +919,14 @@ pub fn build( (NaiveDate::from_ymd_res(2019, 12, 25)?, "Dia da Família"), ], &mut map, - Country::MZ, - "Mozambique", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2020, - vec![ + [ ( NaiveDate::from_ymd_res(2020, 1, 1)?, "Dia da Fraternidade universal", @@ -962,14 +963,14 @@ pub fn build( (NaiveDate::from_ymd_res(2020, 12, 25)?, "Dia da Família"), ], &mut map, - Country::MZ, - "Mozambique", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2021, - vec![ + [ ( NaiveDate::from_ymd_res(2021, 1, 1)?, "Dia da Fraternidade universal", @@ -1002,14 +1003,14 @@ pub fn build( (NaiveDate::from_ymd_res(2021, 12, 25)?, "Dia da Família"), ], &mut map, - Country::MZ, - "Mozambique", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2022, - vec![ + [ ( NaiveDate::from_ymd_res(2022, 1, 1)?, "Dia da Fraternidade universal", @@ -1054,14 +1055,14 @@ pub fn build( ), ], &mut map, - Country::MZ, - "Mozambique", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2023, - vec![ + [ ( NaiveDate::from_ymd_res(2023, 1, 1)?, "Dia da Fraternidade universal", @@ -1102,14 +1103,14 @@ pub fn build( (NaiveDate::from_ymd_res(2023, 12, 25)?, "Dia da Família"), ], &mut map, - Country::MZ, - "Mozambique", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2024, - vec![ + [ ( NaiveDate::from_ymd_res(2024, 1, 1)?, "Dia da Fraternidade universal", @@ -1146,14 +1147,14 @@ pub fn build( (NaiveDate::from_ymd_res(2024, 12, 25)?, "Dia da Família"), ], &mut map, - Country::MZ, - "Mozambique", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2025, - vec![ + [ ( NaiveDate::from_ymd_res(2025, 1, 1)?, "Dia da Fraternidade universal", @@ -1190,14 +1191,14 @@ pub fn build( (NaiveDate::from_ymd_res(2025, 12, 25)?, "Dia da Família"), ], &mut map, - Country::MZ, - "Mozambique", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2026, - vec![ + [ ( NaiveDate::from_ymd_res(2026, 1, 1)?, "Dia da Fraternidade universal", @@ -1234,14 +1235,14 @@ pub fn build( (NaiveDate::from_ymd_res(2026, 12, 25)?, "Dia da Família"), ], &mut map, - Country::MZ, - "Mozambique", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2027, - vec![ + [ ( NaiveDate::from_ymd_res(2027, 1, 1)?, "Dia da Fraternidade universal", @@ -1274,14 +1275,14 @@ pub fn build( (NaiveDate::from_ymd_res(2027, 12, 25)?, "Dia da Família"), ], &mut map, - Country::MZ, - "Mozambique", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2028, - vec![ + [ ( NaiveDate::from_ymd_res(2028, 1, 1)?, "Dia da Fraternidade universal", @@ -1318,14 +1319,14 @@ pub fn build( (NaiveDate::from_ymd_res(2028, 12, 25)?, "Dia da Família"), ], &mut map, - Country::MZ, - "Mozambique", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2029, - vec![ + [ ( NaiveDate::from_ymd_res(2029, 1, 1)?, "Dia da Fraternidade universal", @@ -1358,14 +1359,14 @@ pub fn build( (NaiveDate::from_ymd_res(2029, 12, 25)?, "Dia da Família"), ], &mut map, - Country::MZ, - "Mozambique", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2030, - vec![ + [ ( NaiveDate::from_ymd_res(2030, 1, 1)?, "Dia da Fraternidade universal", @@ -1406,8 +1407,8 @@ pub fn build( (NaiveDate::from_ymd_res(2030, 12, 25)?, "Dia da Família"), ], &mut map, - Country::MZ, - "Mozambique", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/na.rs b/src/data/na.rs index 9a4d88a..eab5669 100644 --- a/src/data/na.rs +++ b/src/data/na.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Namibia"; +const COUNTY_CODE: Country = Country::NA; + /// Generate holiday map for Namibia. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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"), @@ -40,14 +41,14 @@ pub fn build( (NaiveDate::from_ymd_res(2000, 1, 3)?, "Y2K changeover"), ], &mut map, - Country::NA, - "Namibia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -69,14 +70,14 @@ pub fn build( (NaiveDate::from_ymd_res(2001, 12, 26)?, "Family Day"), ], &mut map, - Country::NA, - "Namibia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -94,14 +95,14 @@ pub fn build( (NaiveDate::from_ymd_res(2002, 12, 26)?, "Family Day"), ], &mut map, - Country::NA, - "Namibia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -127,14 +128,14 @@ pub fn build( (NaiveDate::from_ymd_res(2003, 12, 26)?, "Family Day"), ], &mut map, - Country::NA, - "Namibia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -160,14 +161,14 @@ pub fn build( ), ], &mut map, - Country::NA, - "Namibia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -189,14 +190,14 @@ pub fn build( (NaiveDate::from_ymd_res(2005, 12, 26)?, "Family Day"), ], &mut map, - Country::NA, - "Namibia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2006, - vec![ + [ (NaiveDate::from_ymd_res(2006, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2006, 1, 2)?, @@ -224,14 +225,14 @@ pub fn build( (NaiveDate::from_ymd_res(2006, 12, 26)?, "Family Day"), ], &mut map, - Country::NA, - "Namibia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -253,14 +254,14 @@ pub fn build( (NaiveDate::from_ymd_res(2007, 12, 26)?, "Family Day"), ], &mut map, - Country::NA, - "Namibia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2008, - vec![ + [ (NaiveDate::from_ymd_res(2008, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2008, 3, 21)?, @@ -290,14 +291,14 @@ pub fn build( (NaiveDate::from_ymd_res(2008, 12, 26)?, "Family Day"), ], &mut map, - Country::NA, - "Namibia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -315,14 +316,14 @@ pub fn build( (NaiveDate::from_ymd_res(2009, 12, 26)?, "Family Day"), ], &mut map, - Country::NA, - "Namibia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -348,14 +349,14 @@ pub fn build( ), ], &mut map, - Country::NA, - "Namibia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -377,14 +378,14 @@ pub fn build( (NaiveDate::from_ymd_res(2011, 12, 26)?, "Family Day"), ], &mut map, - Country::NA, - "Namibia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2012, - vec![ + [ (NaiveDate::from_ymd_res(2012, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2012, 1, 2)?, @@ -410,14 +411,14 @@ pub fn build( (NaiveDate::from_ymd_res(2012, 12, 26)?, "Family Day"), ], &mut map, - Country::NA, - "Namibia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -435,14 +436,14 @@ pub fn build( (NaiveDate::from_ymd_res(2013, 12, 26)?, "Family Day"), ], &mut map, - Country::NA, - "Namibia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -468,14 +469,14 @@ pub fn build( (NaiveDate::from_ymd_res(2014, 12, 26)?, "Family Day"), ], &mut map, - Country::NA, - "Namibia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -493,14 +494,14 @@ pub fn build( (NaiveDate::from_ymd_res(2015, 12, 26)?, "Family Day"), ], &mut map, - Country::NA, - "Namibia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -522,14 +523,14 @@ pub fn build( (NaiveDate::from_ymd_res(2016, 12, 26)?, "Family Day"), ], &mut map, - Country::NA, - "Namibia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2017, - vec![ + [ (NaiveDate::from_ymd_res(2017, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2017, 1, 2)?, @@ -557,14 +558,14 @@ pub fn build( (NaiveDate::from_ymd_res(2017, 12, 26)?, "Family Day"), ], &mut map, - Country::NA, - "Namibia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -586,14 +587,14 @@ pub fn build( (NaiveDate::from_ymd_res(2018, 12, 26)?, "Family Day"), ], &mut map, - Country::NA, - "Namibia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -611,14 +612,14 @@ pub fn build( (NaiveDate::from_ymd_res(2019, 12, 26)?, "Family Day"), ], &mut map, - Country::NA, - "Namibia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -636,14 +637,14 @@ pub fn build( (NaiveDate::from_ymd_res(2020, 12, 26)?, "Family Day"), ], &mut map, - Country::NA, - "Namibia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -669,14 +670,14 @@ pub fn build( ), ], &mut map, - Country::NA, - "Namibia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -698,14 +699,14 @@ pub fn build( (NaiveDate::from_ymd_res(2022, 12, 26)?, "Family Day"), ], &mut map, - Country::NA, - "Namibia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2023, - vec![ + [ (NaiveDate::from_ymd_res(2023, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2023, 1, 2)?, @@ -731,14 +732,14 @@ pub fn build( (NaiveDate::from_ymd_res(2023, 12, 26)?, "Family Day"), ], &mut map, - Country::NA, - "Namibia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -756,14 +757,14 @@ pub fn build( (NaiveDate::from_ymd_res(2024, 12, 26)?, "Family Day"), ], &mut map, - Country::NA, - "Namibia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -789,14 +790,14 @@ pub fn build( (NaiveDate::from_ymd_res(2025, 12, 26)?, "Family Day"), ], &mut map, - Country::NA, - "Namibia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -814,14 +815,14 @@ pub fn build( (NaiveDate::from_ymd_res(2026, 12, 26)?, "Family Day"), ], &mut map, - Country::NA, - "Namibia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -847,14 +848,14 @@ pub fn build( ), ], &mut map, - Country::NA, - "Namibia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -878,14 +879,14 @@ pub fn build( (NaiveDate::from_ymd_res(2028, 12, 26)?, "Family Day"), ], &mut map, - Country::NA, - "Namibia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -907,14 +908,14 @@ pub fn build( (NaiveDate::from_ymd_res(2029, 12, 26)?, "Family Day"), ], &mut map, - Country::NA, - "Namibia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -932,8 +933,8 @@ pub fn build( (NaiveDate::from_ymd_res(2030, 12, 26)?, "Family Day"), ], &mut map, - Country::NA, - "Namibia", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/ng.rs b/src/data/ng.rs index a88986a..e3463de 100644 --- a/src/data/ng.rs +++ b/src/data/ng.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Nigeria"; +const COUNTY_CODE: Country = Country::NG; + /// Generate holiday map for Nigeria. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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"), @@ -56,14 +57,14 @@ pub fn build( ), ], &mut map, - Country::NG, - "Nigeria", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -94,14 +95,14 @@ pub fn build( ), ], &mut map, - Country::NG, - "Nigeria", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -132,14 +133,14 @@ pub fn build( ), ], &mut map, - Country::NG, - "Nigeria", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -170,14 +171,14 @@ pub fn build( ), ], &mut map, - Country::NG, - "Nigeria", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -207,14 +208,14 @@ pub fn build( ), ], &mut map, - Country::NG, - "Nigeria", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -245,14 +246,14 @@ pub fn build( ), ], &mut map, - Country::NG, - "Nigeria", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -287,14 +288,14 @@ pub fn build( ), ], &mut map, - Country::NG, - "Nigeria", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2007, - vec![ + [ ( NaiveDate::from_ymd_res(2007, 1, 1)?, "Eid-el-Kabir Holiday (estimated); New Year's Day", @@ -328,14 +329,14 @@ pub fn build( ), ], &mut map, - Country::NG, - "Nigeria", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -365,14 +366,14 @@ pub fn build( ), ], &mut map, - Country::NG, - "Nigeria", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -403,14 +404,14 @@ pub fn build( ), ], &mut map, - Country::NG, - "Nigeria", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -441,14 +442,14 @@ pub fn build( ), ], &mut map, - Country::NG, - "Nigeria", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -479,14 +480,14 @@ pub fn build( ), ], &mut map, - Country::NG, - "Nigeria", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -517,14 +518,14 @@ pub fn build( ), ], &mut map, - Country::NG, - "Nigeria", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -555,14 +556,14 @@ pub fn build( ), ], &mut map, - Country::NG, - "Nigeria", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -593,14 +594,14 @@ pub fn build( ), ], &mut map, - Country::NG, - "Nigeria", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -635,14 +636,14 @@ pub fn build( ), ], &mut map, - Country::NG, - "Nigeria", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -697,14 +698,14 @@ pub fn build( ), ], &mut map, - Country::NG, - "Nigeria", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -751,14 +752,14 @@ pub fn build( ), ], &mut map, - Country::NG, - "Nigeria", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -793,14 +794,14 @@ pub fn build( ), ], &mut map, - Country::NG, - "Nigeria", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -847,14 +848,14 @@ pub fn build( ), ], &mut map, - Country::NG, - "Nigeria", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -897,14 +898,14 @@ pub fn build( ), ], &mut map, - Country::NG, - "Nigeria", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -951,14 +952,14 @@ pub fn build( ), ], &mut map, - Country::NG, - "Nigeria", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1021,14 +1022,14 @@ pub fn build( ), ], &mut map, - Country::NG, - "Nigeria", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1071,14 +1072,14 @@ pub fn build( ), ], &mut map, - Country::NG, - "Nigeria", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1117,14 +1118,14 @@ pub fn build( ), ], &mut map, - Country::NG, - "Nigeria", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1163,14 +1164,14 @@ pub fn build( ), ], &mut map, - Country::NG, - "Nigeria", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1209,14 +1210,14 @@ pub fn build( ), ], &mut map, - Country::NG, - "Nigeria", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1271,14 +1272,14 @@ pub fn build( ), ], &mut map, - Country::NG, - "Nigeria", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1329,14 +1330,14 @@ pub fn build( ), ], &mut map, - Country::NG, - "Nigeria", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1367,14 +1368,14 @@ pub fn build( ), ], &mut map, - Country::NG, - "Nigeria", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1417,8 +1418,8 @@ pub fn build( ), ], &mut map, - Country::NG, - "Nigeria", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/ni.rs b/src/data/ni.rs index d907fbe..5031b4f 100644 --- a/src/data/ni.rs +++ b/src/data/ni.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Nicaragua"; +const COUNTY_CODE: Country = Country::NI; + /// Generate holiday map for Nicaragua. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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"), @@ -46,14 +47,14 @@ pub fn build( ), ], &mut map, - Country::NI, - "Nicaragua", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -82,14 +83,14 @@ pub fn build( ), ], &mut map, - Country::NI, - "Nicaragua", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -118,14 +119,14 @@ pub fn build( ), ], &mut map, - Country::NI, - "Nicaragua", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -154,14 +155,14 @@ pub fn build( ), ], &mut map, - Country::NI, - "Nicaragua", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -190,14 +191,14 @@ pub fn build( ), ], &mut map, - Country::NI, - "Nicaragua", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -226,14 +227,14 @@ pub fn build( ), ], &mut map, - Country::NI, - "Nicaragua", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -262,14 +263,14 @@ pub fn build( ), ], &mut map, - Country::NI, - "Nicaragua", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -298,14 +299,14 @@ pub fn build( ), ], &mut map, - Country::NI, - "Nicaragua", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -334,14 +335,14 @@ pub fn build( ), ], &mut map, - Country::NI, - "Nicaragua", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -370,14 +371,14 @@ pub fn build( ), ], &mut map, - Country::NI, - "Nicaragua", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -406,14 +407,14 @@ pub fn build( ), ], &mut map, - Country::NI, - "Nicaragua", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -442,14 +443,14 @@ pub fn build( ), ], &mut map, - Country::NI, - "Nicaragua", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -478,14 +479,14 @@ pub fn build( ), ], &mut map, - Country::NI, - "Nicaragua", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -514,14 +515,14 @@ pub fn build( ), ], &mut map, - Country::NI, - "Nicaragua", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -550,14 +551,14 @@ pub fn build( ), ], &mut map, - Country::NI, - "Nicaragua", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -586,14 +587,14 @@ pub fn build( ), ], &mut map, - Country::NI, - "Nicaragua", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -622,14 +623,14 @@ pub fn build( ), ], &mut map, - Country::NI, - "Nicaragua", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -658,14 +659,14 @@ pub fn build( ), ], &mut map, - Country::NI, - "Nicaragua", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -694,14 +695,14 @@ pub fn build( ), ], &mut map, - Country::NI, - "Nicaragua", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -730,14 +731,14 @@ pub fn build( ), ], &mut map, - Country::NI, - "Nicaragua", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -766,14 +767,14 @@ pub fn build( ), ], &mut map, - Country::NI, - "Nicaragua", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -802,14 +803,14 @@ pub fn build( ), ], &mut map, - Country::NI, - "Nicaragua", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -838,14 +839,14 @@ pub fn build( ), ], &mut map, - Country::NI, - "Nicaragua", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -874,14 +875,14 @@ pub fn build( ), ], &mut map, - Country::NI, - "Nicaragua", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -910,14 +911,14 @@ pub fn build( ), ], &mut map, - Country::NI, - "Nicaragua", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -946,14 +947,14 @@ pub fn build( ), ], &mut map, - Country::NI, - "Nicaragua", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -982,14 +983,14 @@ pub fn build( ), ], &mut map, - Country::NI, - "Nicaragua", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1018,14 +1019,14 @@ pub fn build( ), ], &mut map, - Country::NI, - "Nicaragua", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1054,14 +1055,14 @@ pub fn build( ), ], &mut map, - Country::NI, - "Nicaragua", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1090,14 +1091,14 @@ pub fn build( ), ], &mut map, - Country::NI, - "Nicaragua", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1126,8 +1127,8 @@ pub fn build( ), ], &mut map, - Country::NI, - "Nicaragua", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/nl.rs b/src/data/nl.rs index 5663027..bd6904c 100644 --- a/src/data/nl.rs +++ b/src/data/nl.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Netherlands"; +const COUNTY_CODE: Country = Country::NL; + /// Generate holiday map for Netherlands. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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"), @@ -30,14 +31,14 @@ pub fn build( (NaiveDate::from_ymd_res(2000, 12, 26)?, "Tweede Kerstdag"), ], &mut map, - Country::NL, - "Netherlands", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -49,14 +50,14 @@ pub fn build( (NaiveDate::from_ymd_res(2001, 12, 26)?, "Tweede Kerstdag"), ], &mut map, - Country::NL, - "Netherlands", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -68,14 +69,14 @@ pub fn build( (NaiveDate::from_ymd_res(2002, 12, 26)?, "Tweede Kerstdag"), ], &mut map, - Country::NL, - "Netherlands", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -87,14 +88,14 @@ pub fn build( (NaiveDate::from_ymd_res(2003, 12, 26)?, "Tweede Kerstdag"), ], &mut map, - Country::NL, - "Netherlands", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -106,14 +107,14 @@ pub fn build( (NaiveDate::from_ymd_res(2004, 12, 26)?, "Tweede Kerstdag"), ], &mut map, - Country::NL, - "Netherlands", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -128,14 +129,14 @@ pub fn build( (NaiveDate::from_ymd_res(2005, 12, 26)?, "Tweede Kerstdag"), ], &mut map, - Country::NL, - "Netherlands", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -147,14 +148,14 @@ pub fn build( (NaiveDate::from_ymd_res(2006, 12, 26)?, "Tweede Kerstdag"), ], &mut map, - Country::NL, - "Netherlands", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -166,14 +167,14 @@ pub fn build( (NaiveDate::from_ymd_res(2007, 12, 26)?, "Tweede Kerstdag"), ], &mut map, - Country::NL, - "Netherlands", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -185,14 +186,14 @@ pub fn build( (NaiveDate::from_ymd_res(2008, 12, 26)?, "Tweede Kerstdag"), ], &mut map, - Country::NL, - "Netherlands", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -204,14 +205,14 @@ pub fn build( (NaiveDate::from_ymd_res(2009, 12, 26)?, "Tweede Kerstdag"), ], &mut map, - Country::NL, - "Netherlands", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -224,14 +225,14 @@ pub fn build( (NaiveDate::from_ymd_res(2010, 12, 26)?, "Tweede Kerstdag"), ], &mut map, - Country::NL, - "Netherlands", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -243,14 +244,14 @@ pub fn build( (NaiveDate::from_ymd_res(2011, 12, 26)?, "Tweede Kerstdag"), ], &mut map, - Country::NL, - "Netherlands", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -262,14 +263,14 @@ pub fn build( (NaiveDate::from_ymd_res(2012, 12, 26)?, "Tweede Kerstdag"), ], &mut map, - Country::NL, - "Netherlands", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -281,14 +282,14 @@ pub fn build( (NaiveDate::from_ymd_res(2013, 12, 26)?, "Tweede Kerstdag"), ], &mut map, - Country::NL, - "Netherlands", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -300,14 +301,14 @@ pub fn build( (NaiveDate::from_ymd_res(2014, 12, 26)?, "Tweede Kerstdag"), ], &mut map, - Country::NL, - "Netherlands", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -320,14 +321,14 @@ pub fn build( (NaiveDate::from_ymd_res(2015, 12, 26)?, "Tweede Kerstdag"), ], &mut map, - Country::NL, - "Netherlands", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -339,14 +340,14 @@ pub fn build( (NaiveDate::from_ymd_res(2016, 12, 26)?, "Tweede Kerstdag"), ], &mut map, - Country::NL, - "Netherlands", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -358,14 +359,14 @@ pub fn build( (NaiveDate::from_ymd_res(2017, 12, 26)?, "Tweede Kerstdag"), ], &mut map, - Country::NL, - "Netherlands", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -377,14 +378,14 @@ pub fn build( (NaiveDate::from_ymd_res(2018, 12, 26)?, "Tweede Kerstdag"), ], &mut map, - Country::NL, - "Netherlands", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -396,14 +397,14 @@ pub fn build( (NaiveDate::from_ymd_res(2019, 12, 26)?, "Tweede Kerstdag"), ], &mut map, - Country::NL, - "Netherlands", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -416,14 +417,14 @@ pub fn build( (NaiveDate::from_ymd_res(2020, 12, 26)?, "Tweede Kerstdag"), ], &mut map, - Country::NL, - "Netherlands", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -435,14 +436,14 @@ pub fn build( (NaiveDate::from_ymd_res(2021, 12, 26)?, "Tweede Kerstdag"), ], &mut map, - Country::NL, - "Netherlands", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -454,14 +455,14 @@ pub fn build( (NaiveDate::from_ymd_res(2022, 12, 26)?, "Tweede Kerstdag"), ], &mut map, - Country::NL, - "Netherlands", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -473,14 +474,14 @@ pub fn build( (NaiveDate::from_ymd_res(2023, 12, 26)?, "Tweede Kerstdag"), ], &mut map, - Country::NL, - "Netherlands", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -492,14 +493,14 @@ pub fn build( (NaiveDate::from_ymd_res(2024, 12, 26)?, "Tweede Kerstdag"), ], &mut map, - Country::NL, - "Netherlands", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -512,14 +513,14 @@ pub fn build( (NaiveDate::from_ymd_res(2025, 12, 26)?, "Tweede Kerstdag"), ], &mut map, - Country::NL, - "Netherlands", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -531,14 +532,14 @@ pub fn build( (NaiveDate::from_ymd_res(2026, 12, 26)?, "Tweede Kerstdag"), ], &mut map, - Country::NL, - "Netherlands", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -550,14 +551,14 @@ pub fn build( (NaiveDate::from_ymd_res(2027, 12, 26)?, "Tweede Kerstdag"), ], &mut map, - Country::NL, - "Netherlands", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -569,14 +570,14 @@ pub fn build( (NaiveDate::from_ymd_res(2028, 12, 26)?, "Tweede Kerstdag"), ], &mut map, - Country::NL, - "Netherlands", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -588,14 +589,14 @@ pub fn build( (NaiveDate::from_ymd_res(2029, 12, 26)?, "Tweede Kerstdag"), ], &mut map, - Country::NL, - "Netherlands", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -608,8 +609,8 @@ pub fn build( (NaiveDate::from_ymd_res(2030, 12, 26)?, "Tweede Kerstdag"), ], &mut map, - Country::NL, - "Netherlands", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/no.rs b/src/data/no.rs index 8496a7e..ce02bf9 100644 --- a/src/data/no.rs +++ b/src/data/no.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Norway"; +const COUNTY_CODE: Country = Country::NO; + /// Generate holiday map for Norway. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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"), @@ -35,14 +36,14 @@ pub fn build( (NaiveDate::from_ymd_res(2000, 12, 26)?, "Andre juledag"), ], &mut map, - Country::NO, - "Norway", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -60,14 +61,14 @@ pub fn build( (NaiveDate::from_ymd_res(2001, 12, 26)?, "Andre juledag"), ], &mut map, - Country::NO, - "Norway", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -85,14 +86,14 @@ pub fn build( (NaiveDate::from_ymd_res(2002, 12, 26)?, "Andre juledag"), ], &mut map, - Country::NO, - "Norway", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -110,14 +111,14 @@ pub fn build( (NaiveDate::from_ymd_res(2003, 12, 26)?, "Andre juledag"), ], &mut map, - Country::NO, - "Norway", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -135,14 +136,14 @@ pub fn build( (NaiveDate::from_ymd_res(2004, 12, 26)?, "Andre juledag"), ], &mut map, - Country::NO, - "Norway", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -160,14 +161,14 @@ pub fn build( (NaiveDate::from_ymd_res(2005, 12, 26)?, "Andre juledag"), ], &mut map, - Country::NO, - "Norway", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -185,14 +186,14 @@ pub fn build( (NaiveDate::from_ymd_res(2006, 12, 26)?, "Andre juledag"), ], &mut map, - Country::NO, - "Norway", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -209,14 +210,14 @@ pub fn build( (NaiveDate::from_ymd_res(2007, 12, 26)?, "Andre juledag"), ], &mut map, - Country::NO, - "Norway", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -233,14 +234,14 @@ pub fn build( (NaiveDate::from_ymd_res(2008, 12, 26)?, "Andre juledag"), ], &mut map, - Country::NO, - "Norway", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -258,14 +259,14 @@ pub fn build( (NaiveDate::from_ymd_res(2009, 12, 26)?, "Andre juledag"), ], &mut map, - Country::NO, - "Norway", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -283,14 +284,14 @@ pub fn build( (NaiveDate::from_ymd_res(2010, 12, 26)?, "Andre juledag"), ], &mut map, - Country::NO, - "Norway", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -308,14 +309,14 @@ pub fn build( (NaiveDate::from_ymd_res(2011, 12, 26)?, "Andre juledag"), ], &mut map, - Country::NO, - "Norway", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -332,14 +333,14 @@ pub fn build( (NaiveDate::from_ymd_res(2012, 12, 26)?, "Andre juledag"), ], &mut map, - Country::NO, - "Norway", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -357,14 +358,14 @@ pub fn build( (NaiveDate::from_ymd_res(2013, 12, 26)?, "Andre juledag"), ], &mut map, - Country::NO, - "Norway", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -382,14 +383,14 @@ pub fn build( (NaiveDate::from_ymd_res(2014, 12, 26)?, "Andre juledag"), ], &mut map, - Country::NO, - "Norway", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -407,14 +408,14 @@ pub fn build( (NaiveDate::from_ymd_res(2015, 12, 26)?, "Andre juledag"), ], &mut map, - Country::NO, - "Norway", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -432,14 +433,14 @@ pub fn build( (NaiveDate::from_ymd_res(2016, 12, 26)?, "Andre juledag"), ], &mut map, - Country::NO, - "Norway", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -457,14 +458,14 @@ pub fn build( (NaiveDate::from_ymd_res(2017, 12, 26)?, "Andre juledag"), ], &mut map, - Country::NO, - "Norway", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -482,14 +483,14 @@ pub fn build( (NaiveDate::from_ymd_res(2018, 12, 26)?, "Andre juledag"), ], &mut map, - Country::NO, - "Norway", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -507,14 +508,14 @@ pub fn build( (NaiveDate::from_ymd_res(2019, 12, 26)?, "Andre juledag"), ], &mut map, - Country::NO, - "Norway", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -532,14 +533,14 @@ pub fn build( (NaiveDate::from_ymd_res(2020, 12, 26)?, "Andre juledag"), ], &mut map, - Country::NO, - "Norway", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -557,14 +558,14 @@ pub fn build( (NaiveDate::from_ymd_res(2021, 12, 26)?, "Andre juledag"), ], &mut map, - Country::NO, - "Norway", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -582,14 +583,14 @@ pub fn build( (NaiveDate::from_ymd_res(2022, 12, 26)?, "Andre juledag"), ], &mut map, - Country::NO, - "Norway", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -607,14 +608,14 @@ pub fn build( (NaiveDate::from_ymd_res(2023, 12, 26)?, "Andre juledag"), ], &mut map, - Country::NO, - "Norway", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -632,14 +633,14 @@ pub fn build( (NaiveDate::from_ymd_res(2024, 12, 26)?, "Andre juledag"), ], &mut map, - Country::NO, - "Norway", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -657,14 +658,14 @@ pub fn build( (NaiveDate::from_ymd_res(2025, 12, 26)?, "Andre juledag"), ], &mut map, - Country::NO, - "Norway", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -682,14 +683,14 @@ pub fn build( (NaiveDate::from_ymd_res(2026, 12, 26)?, "Andre juledag"), ], &mut map, - Country::NO, - "Norway", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -709,14 +710,14 @@ pub fn build( (NaiveDate::from_ymd_res(2027, 12, 26)?, "Andre juledag"), ], &mut map, - Country::NO, - "Norway", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -734,14 +735,14 @@ pub fn build( (NaiveDate::from_ymd_res(2028, 12, 26)?, "Andre juledag"), ], &mut map, - Country::NO, - "Norway", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -759,14 +760,14 @@ pub fn build( (NaiveDate::from_ymd_res(2029, 12, 26)?, "Andre juledag"), ], &mut map, - Country::NO, - "Norway", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -784,8 +785,8 @@ pub fn build( (NaiveDate::from_ymd_res(2030, 12, 26)?, "Andre juledag"), ], &mut map, - Country::NO, - "Norway", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/nz.rs b/src/data/nz.rs index 3c4a16a..1d396d2 100644 --- a/src/data/nz.rs +++ b/src/data/nz.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "New Zealand"; +const COUNTY_CODE: Country = Country::NZ; + /// Generate holiday map for New Zealand. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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)?, @@ -41,14 +42,14 @@ pub fn build( (NaiveDate::from_ymd_res(2000, 12, 26)?, "Boxing Day"), ], &mut map, - Country::NZ, - "New Zealand", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2001, - vec![ + [ (NaiveDate::from_ymd_res(2001, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2001, 1, 2)?, @@ -64,14 +65,14 @@ pub fn build( (NaiveDate::from_ymd_res(2001, 12, 26)?, "Boxing Day"), ], &mut map, - Country::NZ, - "New Zealand", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2002, - vec![ + [ (NaiveDate::from_ymd_res(2002, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2002, 1, 2)?, @@ -87,14 +88,14 @@ pub fn build( (NaiveDate::from_ymd_res(2002, 12, 26)?, "Boxing Day"), ], &mut map, - Country::NZ, - "New Zealand", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2003, - vec![ + [ (NaiveDate::from_ymd_res(2003, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2003, 1, 2)?, @@ -110,14 +111,14 @@ pub fn build( (NaiveDate::from_ymd_res(2003, 12, 26)?, "Boxing Day"), ], &mut map, - Country::NZ, - "New Zealand", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2004, - vec![ + [ (NaiveDate::from_ymd_res(2004, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2004, 1, 2)?, @@ -141,14 +142,14 @@ pub fn build( ), ], &mut map, - Country::NZ, - "New Zealand", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2005, - vec![ + [ (NaiveDate::from_ymd_res(2005, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2005, 1, 3)?, @@ -176,14 +177,14 @@ pub fn build( (NaiveDate::from_ymd_res(2005, 12, 26)?, "Boxing Day"), ], &mut map, - Country::NZ, - "New Zealand", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2006, - vec![ + [ (NaiveDate::from_ymd_res(2006, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2006, 1, 3)?, @@ -203,14 +204,14 @@ pub fn build( (NaiveDate::from_ymd_res(2006, 12, 26)?, "Boxing Day"), ], &mut map, - Country::NZ, - "New Zealand", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2007, - vec![ + [ (NaiveDate::from_ymd_res(2007, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2007, 1, 2)?, @@ -226,14 +227,14 @@ pub fn build( (NaiveDate::from_ymd_res(2007, 12, 26)?, "Boxing Day"), ], &mut map, - Country::NZ, - "New Zealand", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2008, - vec![ + [ (NaiveDate::from_ymd_res(2008, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2008, 1, 2)?, @@ -249,14 +250,14 @@ pub fn build( (NaiveDate::from_ymd_res(2008, 12, 26)?, "Boxing Day"), ], &mut map, - Country::NZ, - "New Zealand", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2009, - vec![ + [ (NaiveDate::from_ymd_res(2009, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2009, 1, 2)?, @@ -276,14 +277,14 @@ pub fn build( ), ], &mut map, - Country::NZ, - "New Zealand", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2010, - vec![ + [ (NaiveDate::from_ymd_res(2010, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2010, 1, 2)?, @@ -311,14 +312,14 @@ pub fn build( ), ], &mut map, - Country::NZ, - "New Zealand", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2011, - vec![ + [ (NaiveDate::from_ymd_res(2011, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2011, 1, 3)?, @@ -348,14 +349,14 @@ pub fn build( (NaiveDate::from_ymd_res(2011, 12, 26)?, "Boxing Day"), ], &mut map, - Country::NZ, - "New Zealand", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2012, - vec![ + [ (NaiveDate::from_ymd_res(2012, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2012, 1, 3)?, @@ -375,14 +376,14 @@ pub fn build( (NaiveDate::from_ymd_res(2012, 12, 26)?, "Boxing Day"), ], &mut map, - Country::NZ, - "New Zealand", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2013, - vec![ + [ (NaiveDate::from_ymd_res(2013, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2013, 1, 2)?, @@ -398,14 +399,14 @@ pub fn build( (NaiveDate::from_ymd_res(2013, 12, 26)?, "Boxing Day"), ], &mut map, - Country::NZ, - "New Zealand", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2014, - vec![ + [ (NaiveDate::from_ymd_res(2014, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2014, 1, 2)?, @@ -421,14 +422,14 @@ pub fn build( (NaiveDate::from_ymd_res(2014, 12, 26)?, "Boxing Day"), ], &mut map, - Country::NZ, - "New Zealand", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2015, - vec![ + [ (NaiveDate::from_ymd_res(2015, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2015, 1, 2)?, @@ -452,14 +453,14 @@ pub fn build( ), ], &mut map, - Country::NZ, - "New Zealand", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2016, - vec![ + [ (NaiveDate::from_ymd_res(2016, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2016, 1, 2)?, @@ -487,14 +488,14 @@ pub fn build( (NaiveDate::from_ymd_res(2016, 12, 26)?, "Boxing Day"), ], &mut map, - Country::NZ, - "New Zealand", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2017, - vec![ + [ (NaiveDate::from_ymd_res(2017, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2017, 1, 3)?, @@ -514,14 +515,14 @@ pub fn build( (NaiveDate::from_ymd_res(2017, 12, 26)?, "Boxing Day"), ], &mut map, - Country::NZ, - "New Zealand", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2018, - vec![ + [ (NaiveDate::from_ymd_res(2018, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2018, 1, 2)?, @@ -537,14 +538,14 @@ pub fn build( (NaiveDate::from_ymd_res(2018, 12, 26)?, "Boxing Day"), ], &mut map, - Country::NZ, - "New Zealand", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2019, - vec![ + [ (NaiveDate::from_ymd_res(2019, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2019, 1, 2)?, @@ -560,14 +561,14 @@ pub fn build( (NaiveDate::from_ymd_res(2019, 12, 26)?, "Boxing Day"), ], &mut map, - Country::NZ, - "New Zealand", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2020, - vec![ + [ (NaiveDate::from_ymd_res(2020, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2020, 1, 2)?, @@ -591,14 +592,14 @@ pub fn build( ), ], &mut map, - Country::NZ, - "New Zealand", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2021, - vec![ + [ (NaiveDate::from_ymd_res(2021, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2021, 1, 2)?, @@ -634,14 +635,14 @@ pub fn build( ), ], &mut map, - Country::NZ, - "New Zealand", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2022, - vec![ + [ (NaiveDate::from_ymd_res(2022, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2022, 1, 3)?, @@ -678,14 +679,14 @@ pub fn build( ), ], &mut map, - Country::NZ, - "New Zealand", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2023, - vec![ + [ (NaiveDate::from_ymd_res(2023, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2023, 1, 3)?, @@ -706,14 +707,14 @@ pub fn build( (NaiveDate::from_ymd_res(2023, 12, 26)?, "Boxing Day"), ], &mut map, - Country::NZ, - "New Zealand", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2024, - vec![ + [ (NaiveDate::from_ymd_res(2024, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2024, 1, 2)?, @@ -730,14 +731,14 @@ pub fn build( (NaiveDate::from_ymd_res(2024, 12, 26)?, "Boxing Day"), ], &mut map, - Country::NZ, - "New Zealand", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2025, - vec![ + [ (NaiveDate::from_ymd_res(2025, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2025, 1, 2)?, @@ -754,14 +755,14 @@ pub fn build( (NaiveDate::from_ymd_res(2025, 12, 26)?, "Boxing Day"), ], &mut map, - Country::NZ, - "New Zealand", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2026, - vec![ + [ (NaiveDate::from_ymd_res(2026, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2026, 1, 2)?, @@ -786,14 +787,14 @@ pub fn build( ), ], &mut map, - Country::NZ, - "New Zealand", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2027, - vec![ + [ (NaiveDate::from_ymd_res(2027, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2027, 1, 2)?, @@ -830,14 +831,14 @@ pub fn build( ), ], &mut map, - Country::NZ, - "New Zealand", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2028, - vec![ + [ (NaiveDate::from_ymd_res(2028, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2028, 1, 3)?, @@ -866,14 +867,14 @@ pub fn build( (NaiveDate::from_ymd_res(2028, 12, 26)?, "Boxing Day"), ], &mut map, - Country::NZ, - "New Zealand", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2029, - vec![ + [ (NaiveDate::from_ymd_res(2029, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2029, 1, 2)?, @@ -890,14 +891,14 @@ pub fn build( (NaiveDate::from_ymd_res(2029, 12, 26)?, "Boxing Day"), ], &mut map, - Country::NZ, - "New Zealand", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2030, - vec![ + [ (NaiveDate::from_ymd_res(2030, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2030, 1, 2)?, @@ -914,8 +915,8 @@ pub fn build( (NaiveDate::from_ymd_res(2030, 12, 26)?, "Boxing Day"), ], &mut map, - Country::NZ, - "New Zealand", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/pe.rs b/src/data/pe.rs index 7b060a6..11cd867 100644 --- a/src/data/pe.rs +++ b/src/data/pe.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Peru"; +const COUNTY_CODE: Country = Country::PE; + /// Generate holiday map for Peru. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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"), @@ -48,14 +49,14 @@ pub fn build( (NaiveDate::from_ymd_res(2000, 12, 25)?, "Navidad del Señor"), ], &mut map, - Country::PE, - "Peru", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -86,14 +87,14 @@ pub fn build( (NaiveDate::from_ymd_res(2001, 12, 25)?, "Navidad del Señor"), ], &mut map, - Country::PE, - "Peru", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -124,14 +125,14 @@ pub fn build( (NaiveDate::from_ymd_res(2002, 12, 25)?, "Navidad del Señor"), ], &mut map, - Country::PE, - "Peru", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -162,14 +163,14 @@ pub fn build( (NaiveDate::from_ymd_res(2003, 12, 25)?, "Navidad del Señor"), ], &mut map, - Country::PE, - "Peru", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -200,14 +201,14 @@ pub fn build( (NaiveDate::from_ymd_res(2004, 12, 25)?, "Navidad del Señor"), ], &mut map, - Country::PE, - "Peru", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -238,14 +239,14 @@ pub fn build( (NaiveDate::from_ymd_res(2005, 12, 25)?, "Navidad del Señor"), ], &mut map, - Country::PE, - "Peru", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -276,14 +277,14 @@ pub fn build( (NaiveDate::from_ymd_res(2006, 12, 25)?, "Navidad del Señor"), ], &mut map, - Country::PE, - "Peru", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -314,14 +315,14 @@ pub fn build( (NaiveDate::from_ymd_res(2007, 12, 25)?, "Navidad del Señor"), ], &mut map, - Country::PE, - "Peru", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -352,14 +353,14 @@ pub fn build( (NaiveDate::from_ymd_res(2008, 12, 25)?, "Navidad del Señor"), ], &mut map, - Country::PE, - "Peru", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -390,14 +391,14 @@ pub fn build( (NaiveDate::from_ymd_res(2009, 12, 25)?, "Navidad del Señor"), ], &mut map, - Country::PE, - "Peru", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -428,14 +429,14 @@ pub fn build( (NaiveDate::from_ymd_res(2010, 12, 25)?, "Navidad del Señor"), ], &mut map, - Country::PE, - "Peru", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -466,14 +467,14 @@ pub fn build( (NaiveDate::from_ymd_res(2011, 12, 25)?, "Navidad del Señor"), ], &mut map, - Country::PE, - "Peru", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -504,14 +505,14 @@ pub fn build( (NaiveDate::from_ymd_res(2012, 12, 25)?, "Navidad del Señor"), ], &mut map, - Country::PE, - "Peru", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -542,14 +543,14 @@ pub fn build( (NaiveDate::from_ymd_res(2013, 12, 25)?, "Navidad del Señor"), ], &mut map, - Country::PE, - "Peru", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -580,14 +581,14 @@ pub fn build( (NaiveDate::from_ymd_res(2014, 12, 25)?, "Navidad del Señor"), ], &mut map, - Country::PE, - "Peru", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -618,14 +619,14 @@ pub fn build( (NaiveDate::from_ymd_res(2015, 12, 25)?, "Navidad del Señor"), ], &mut map, - Country::PE, - "Peru", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -656,14 +657,14 @@ pub fn build( (NaiveDate::from_ymd_res(2016, 12, 25)?, "Navidad del Señor"), ], &mut map, - Country::PE, - "Peru", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -694,14 +695,14 @@ pub fn build( (NaiveDate::from_ymd_res(2017, 12, 25)?, "Navidad del Señor"), ], &mut map, - Country::PE, - "Peru", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -732,14 +733,14 @@ pub fn build( (NaiveDate::from_ymd_res(2018, 12, 25)?, "Navidad del Señor"), ], &mut map, - Country::PE, - "Peru", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -770,14 +771,14 @@ pub fn build( (NaiveDate::from_ymd_res(2019, 12, 25)?, "Navidad del Señor"), ], &mut map, - Country::PE, - "Peru", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -808,14 +809,14 @@ pub fn build( (NaiveDate::from_ymd_res(2020, 12, 25)?, "Navidad del Señor"), ], &mut map, - Country::PE, - "Peru", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -846,14 +847,14 @@ pub fn build( (NaiveDate::from_ymd_res(2021, 12, 25)?, "Navidad del Señor"), ], &mut map, - Country::PE, - "Peru", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -886,14 +887,14 @@ pub fn build( (NaiveDate::from_ymd_res(2022, 12, 25)?, "Navidad del Señor"), ], &mut map, - Country::PE, - "Peru", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -926,14 +927,14 @@ pub fn build( (NaiveDate::from_ymd_res(2023, 12, 25)?, "Navidad del Señor"), ], &mut map, - Country::PE, - "Peru", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -966,14 +967,14 @@ pub fn build( (NaiveDate::from_ymd_res(2024, 12, 25)?, "Navidad del Señor"), ], &mut map, - Country::PE, - "Peru", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1006,14 +1007,14 @@ pub fn build( (NaiveDate::from_ymd_res(2025, 12, 25)?, "Navidad del Señor"), ], &mut map, - Country::PE, - "Peru", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1046,14 +1047,14 @@ pub fn build( (NaiveDate::from_ymd_res(2026, 12, 25)?, "Navidad del Señor"), ], &mut map, - Country::PE, - "Peru", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1086,14 +1087,14 @@ pub fn build( (NaiveDate::from_ymd_res(2027, 12, 25)?, "Navidad del Señor"), ], &mut map, - Country::PE, - "Peru", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1126,14 +1127,14 @@ pub fn build( (NaiveDate::from_ymd_res(2028, 12, 25)?, "Navidad del Señor"), ], &mut map, - Country::PE, - "Peru", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1166,14 +1167,14 @@ pub fn build( (NaiveDate::from_ymd_res(2029, 12, 25)?, "Navidad del Señor"), ], &mut map, - Country::PE, - "Peru", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1206,8 +1207,8 @@ pub fn build( (NaiveDate::from_ymd_res(2030, 12, 25)?, "Navidad del Señor"), ], &mut map, - Country::PE, - "Peru", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/pk.rs b/src/data/pk.rs index 62d121a..de83ca2 100644 --- a/src/data/pk.rs +++ b/src/data/pk.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Pakistan"; +const COUNTY_CODE: Country = Country::PK; + /// Generate holiday map for Pakistan. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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", @@ -71,14 +72,14 @@ pub fn build( (NaiveDate::from_ymd_res(2000, 4, 15)?, "Ashura (estimated)"), ], &mut map, - Country::PK, - "Pakistan", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2001, - vec![ + [ ( NaiveDate::from_ymd_res(2001, 2, 5)?, "Kashmir Solidarity Day", @@ -120,14 +121,14 @@ pub fn build( (NaiveDate::from_ymd_res(2001, 4, 4)?, "Ashura (estimated)"), ], &mut map, - Country::PK, - "Pakistan", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2002, - vec![ + [ ( NaiveDate::from_ymd_res(2002, 2, 5)?, "Kashmir Solidarity Day", @@ -171,14 +172,14 @@ pub fn build( (NaiveDate::from_ymd_res(2002, 3, 24)?, "Ashura (estimated)"), ], &mut map, - Country::PK, - "Pakistan", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2003, - vec![ + [ ( NaiveDate::from_ymd_res(2003, 2, 5)?, "Kashmir Solidarity Day", @@ -220,14 +221,14 @@ pub fn build( (NaiveDate::from_ymd_res(2003, 3, 13)?, "Ashura (estimated)"), ], &mut map, - Country::PK, - "Pakistan", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2004, - vec![ + [ ( NaiveDate::from_ymd_res(2004, 2, 5)?, "Kashmir Solidarity Day", @@ -268,14 +269,14 @@ pub fn build( (NaiveDate::from_ymd_res(2004, 3, 1)?, "Ashura (estimated)"), ], &mut map, - Country::PK, - "Pakistan", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2005, - vec![ + [ ( NaiveDate::from_ymd_res(2005, 2, 5)?, "Kashmir Solidarity Day", @@ -296,14 +297,14 @@ pub fn build( (NaiveDate::from_ymd_res(2005, 2, 18)?, "Ashura"), ], &mut map, - Country::PK, - "Pakistan", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2006, - vec![ + [ ( NaiveDate::from_ymd_res(2006, 2, 5)?, "Kashmir Solidarity Day", @@ -325,14 +326,14 @@ pub fn build( (NaiveDate::from_ymd_res(2006, 2, 8)?, "Ashura"), ], &mut map, - Country::PK, - "Pakistan", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2007, - vec![ + [ ( NaiveDate::from_ymd_res(2007, 2, 5)?, "Kashmir Solidarity Day", @@ -355,14 +356,14 @@ pub fn build( (NaiveDate::from_ymd_res(2007, 1, 28)?, "Ashura"), ], &mut map, - Country::PK, - "Pakistan", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2008, - vec![ + [ ( NaiveDate::from_ymd_res(2008, 2, 5)?, "Kashmir Solidarity Day", @@ -383,14 +384,14 @@ pub fn build( (NaiveDate::from_ymd_res(2008, 1, 18)?, "Ashura"), ], &mut map, - Country::PK, - "Pakistan", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2009, - vec![ + [ ( NaiveDate::from_ymd_res(2009, 2, 5)?, "Kashmir Solidarity Day", @@ -415,14 +416,14 @@ pub fn build( (NaiveDate::from_ymd_res(2009, 12, 26)?, "Ashura"), ], &mut map, - Country::PK, - "Pakistan", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2010, - vec![ + [ ( NaiveDate::from_ymd_res(2010, 2, 5)?, "Kashmir Solidarity Day", @@ -443,14 +444,14 @@ pub fn build( (NaiveDate::from_ymd_res(2010, 12, 16)?, "Ashura"), ], &mut map, - Country::PK, - "Pakistan", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2011, - vec![ + [ ( NaiveDate::from_ymd_res(2011, 2, 5)?, "Kashmir Solidarity Day", @@ -473,14 +474,14 @@ pub fn build( (NaiveDate::from_ymd_res(2011, 12, 5)?, "Ashura"), ], &mut map, - Country::PK, - "Pakistan", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2012, - vec![ + [ ( NaiveDate::from_ymd_res(2012, 2, 5)?, "Eid Milad-un-Nabi; Kashmir Solidarity Day", @@ -500,14 +501,14 @@ pub fn build( (NaiveDate::from_ymd_res(2012, 11, 23)?, "Ashura"), ], &mut map, - Country::PK, - "Pakistan", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2013, - vec![ + [ ( NaiveDate::from_ymd_res(2013, 2, 5)?, "Kashmir Solidarity Day", @@ -528,14 +529,14 @@ pub fn build( (NaiveDate::from_ymd_res(2013, 11, 13)?, "Ashura"), ], &mut map, - Country::PK, - "Pakistan", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2014, - vec![ + [ ( NaiveDate::from_ymd_res(2014, 2, 5)?, "Kashmir Solidarity Day", @@ -556,14 +557,14 @@ pub fn build( (NaiveDate::from_ymd_res(2014, 11, 3)?, "Ashura"), ], &mut map, - Country::PK, - "Pakistan", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2015, - vec![ + [ ( NaiveDate::from_ymd_res(2015, 2, 5)?, "Kashmir Solidarity Day", @@ -583,14 +584,14 @@ pub fn build( (NaiveDate::from_ymd_res(2015, 10, 23)?, "Ashura"), ], &mut map, - Country::PK, - "Pakistan", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2016, - vec![ + [ ( NaiveDate::from_ymd_res(2016, 2, 5)?, "Kashmir Solidarity Day", @@ -610,14 +611,14 @@ pub fn build( (NaiveDate::from_ymd_res(2016, 10, 11)?, "Ashura"), ], &mut map, - Country::PK, - "Pakistan", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2017, - vec![ + [ ( NaiveDate::from_ymd_res(2017, 2, 5)?, "Kashmir Solidarity Day", @@ -637,14 +638,14 @@ pub fn build( (NaiveDate::from_ymd_res(2017, 9, 30)?, "Ashura"), ], &mut map, - Country::PK, - "Pakistan", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2018, - vec![ + [ ( NaiveDate::from_ymd_res(2018, 2, 5)?, "Kashmir Solidarity Day", @@ -664,14 +665,14 @@ pub fn build( (NaiveDate::from_ymd_res(2018, 9, 21)?, "Ashura"), ], &mut map, - Country::PK, - "Pakistan", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2019, - vec![ + [ ( NaiveDate::from_ymd_res(2019, 2, 5)?, "Kashmir Solidarity Day", @@ -693,14 +694,14 @@ pub fn build( (NaiveDate::from_ymd_res(2019, 9, 9)?, "Ashura"), ], &mut map, - Country::PK, - "Pakistan", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2020, - vec![ + [ ( NaiveDate::from_ymd_res(2020, 2, 5)?, "Kashmir Solidarity Day", @@ -720,14 +721,14 @@ pub fn build( (NaiveDate::from_ymd_res(2020, 8, 29)?, "Ashura"), ], &mut map, - Country::PK, - "Pakistan", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2021, - vec![ + [ ( NaiveDate::from_ymd_res(2021, 2, 5)?, "Kashmir Solidarity Day", @@ -747,14 +748,14 @@ pub fn build( (NaiveDate::from_ymd_res(2021, 8, 18)?, "Ashura"), ], &mut map, - Country::PK, - "Pakistan", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2022, - vec![ + [ ( NaiveDate::from_ymd_res(2022, 2, 5)?, "Kashmir Solidarity Day", @@ -775,14 +776,14 @@ pub fn build( (NaiveDate::from_ymd_res(2022, 8, 9)?, "Ashura"), ], &mut map, - Country::PK, - "Pakistan", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2023, - vec![ + [ ( NaiveDate::from_ymd_res(2023, 2, 5)?, "Kashmir Solidarity Day", @@ -806,14 +807,14 @@ pub fn build( (NaiveDate::from_ymd_res(2023, 7, 28)?, "Ashura (estimated)"), ], &mut map, - Country::PK, - "Pakistan", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2024, - vec![ + [ ( NaiveDate::from_ymd_res(2024, 2, 5)?, "Kashmir Solidarity Day", @@ -846,14 +847,14 @@ pub fn build( (NaiveDate::from_ymd_res(2024, 7, 16)?, "Ashura (estimated)"), ], &mut map, - Country::PK, - "Pakistan", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2025, - vec![ + [ ( NaiveDate::from_ymd_res(2025, 2, 5)?, "Kashmir Solidarity Day", @@ -895,14 +896,14 @@ pub fn build( (NaiveDate::from_ymd_res(2025, 7, 5)?, "Ashura (estimated)"), ], &mut map, - Country::PK, - "Pakistan", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2026, - vec![ + [ ( NaiveDate::from_ymd_res(2026, 2, 5)?, "Kashmir Solidarity Day", @@ -944,14 +945,14 @@ pub fn build( (NaiveDate::from_ymd_res(2026, 6, 25)?, "Ashura (estimated)"), ], &mut map, - Country::PK, - "Pakistan", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2027, - vec![ + [ ( NaiveDate::from_ymd_res(2027, 2, 5)?, "Kashmir Solidarity Day", @@ -992,14 +993,14 @@ pub fn build( (NaiveDate::from_ymd_res(2027, 6, 15)?, "Ashura (estimated)"), ], &mut map, - Country::PK, - "Pakistan", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2028, - vec![ + [ ( NaiveDate::from_ymd_res(2028, 2, 5)?, "Kashmir Solidarity Day", @@ -1041,14 +1042,14 @@ pub fn build( (NaiveDate::from_ymd_res(2028, 6, 3)?, "Ashura (estimated)"), ], &mut map, - Country::PK, - "Pakistan", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2029, - vec![ + [ ( NaiveDate::from_ymd_res(2029, 2, 5)?, "Kashmir Solidarity Day", @@ -1090,14 +1091,14 @@ pub fn build( (NaiveDate::from_ymd_res(2029, 5, 23)?, "Ashura (estimated)"), ], &mut map, - Country::PK, - "Pakistan", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2030, - vec![ + [ ( NaiveDate::from_ymd_res(2030, 2, 5)?, "Eid-ul-Fitr (estimated); Kashmir Solidarity Day", @@ -1135,8 +1136,8 @@ pub fn build( (NaiveDate::from_ymd_res(2030, 5, 12)?, "Ashura (estimated)"), ], &mut map, - Country::PK, - "Pakistan", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/pl.rs b/src/data/pl.rs index 86f352a..d840b9e 100644 --- a/src/data/pl.rs +++ b/src/data/pl.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Poland"; +const COUNTY_CODE: Country = Country::PL; + /// Generate holiday map for Poland. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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)?, @@ -56,14 +57,14 @@ pub fn build( ), ], &mut map, - Country::PL, - "Poland", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2001, - vec![ + [ (NaiveDate::from_ymd_res(2001, 1, 1)?, "Nowy Rok"), ( NaiveDate::from_ymd_res(2001, 4, 15)?, @@ -102,14 +103,14 @@ pub fn build( ), ], &mut map, - Country::PL, - "Poland", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2002, - vec![ + [ (NaiveDate::from_ymd_res(2002, 1, 1)?, "Nowy Rok"), ( NaiveDate::from_ymd_res(2002, 3, 31)?, @@ -148,14 +149,14 @@ pub fn build( ), ], &mut map, - Country::PL, - "Poland", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2003, - vec![ + [ (NaiveDate::from_ymd_res(2003, 1, 1)?, "Nowy Rok"), ( NaiveDate::from_ymd_res(2003, 4, 20)?, @@ -194,14 +195,14 @@ pub fn build( ), ], &mut map, - Country::PL, - "Poland", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2004, - vec![ + [ (NaiveDate::from_ymd_res(2004, 1, 1)?, "Nowy Rok"), ( NaiveDate::from_ymd_res(2004, 4, 11)?, @@ -240,14 +241,14 @@ pub fn build( ), ], &mut map, - Country::PL, - "Poland", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2005, - vec![ + [ (NaiveDate::from_ymd_res(2005, 1, 1)?, "Nowy Rok"), ( NaiveDate::from_ymd_res(2005, 3, 27)?, @@ -286,14 +287,14 @@ pub fn build( ), ], &mut map, - Country::PL, - "Poland", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2006, - vec![ + [ (NaiveDate::from_ymd_res(2006, 1, 1)?, "Nowy Rok"), ( NaiveDate::from_ymd_res(2006, 4, 16)?, @@ -332,14 +333,14 @@ pub fn build( ), ], &mut map, - Country::PL, - "Poland", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2007, - vec![ + [ (NaiveDate::from_ymd_res(2007, 1, 1)?, "Nowy Rok"), ( NaiveDate::from_ymd_res(2007, 4, 8)?, @@ -378,14 +379,14 @@ pub fn build( ), ], &mut map, - Country::PL, - "Poland", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2008, - vec![ + [ (NaiveDate::from_ymd_res(2008, 1, 1)?, "Nowy Rok"), ( NaiveDate::from_ymd_res(2008, 3, 23)?, @@ -424,14 +425,14 @@ pub fn build( ), ], &mut map, - Country::PL, - "Poland", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2009, - vec![ + [ (NaiveDate::from_ymd_res(2009, 1, 1)?, "Nowy Rok"), ( NaiveDate::from_ymd_res(2009, 4, 12)?, @@ -470,14 +471,14 @@ pub fn build( ), ], &mut map, - Country::PL, - "Poland", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2010, - vec![ + [ (NaiveDate::from_ymd_res(2010, 1, 1)?, "Nowy Rok"), ( NaiveDate::from_ymd_res(2010, 4, 4)?, @@ -516,14 +517,14 @@ pub fn build( ), ], &mut map, - Country::PL, - "Poland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -563,14 +564,14 @@ pub fn build( ), ], &mut map, - Country::PL, - "Poland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -610,14 +611,14 @@ pub fn build( ), ], &mut map, - Country::PL, - "Poland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -657,14 +658,14 @@ pub fn build( ), ], &mut map, - Country::PL, - "Poland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -704,14 +705,14 @@ pub fn build( ), ], &mut map, - Country::PL, - "Poland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -751,14 +752,14 @@ pub fn build( ), ], &mut map, - Country::PL, - "Poland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -798,14 +799,14 @@ pub fn build( ), ], &mut map, - Country::PL, - "Poland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -845,14 +846,14 @@ pub fn build( ), ], &mut map, - Country::PL, - "Poland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -896,14 +897,14 @@ pub fn build( ), ], &mut map, - Country::PL, - "Poland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -943,14 +944,14 @@ pub fn build( ), ], &mut map, - Country::PL, - "Poland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -990,14 +991,14 @@ pub fn build( ), ], &mut map, - Country::PL, - "Poland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -1037,14 +1038,14 @@ pub fn build( ), ], &mut map, - Country::PL, - "Poland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -1084,14 +1085,14 @@ pub fn build( ), ], &mut map, - Country::PL, - "Poland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -1131,14 +1132,14 @@ pub fn build( ), ], &mut map, - Country::PL, - "Poland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -1178,14 +1179,14 @@ pub fn build( ), ], &mut map, - Country::PL, - "Poland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -1225,14 +1226,14 @@ pub fn build( ), ], &mut map, - Country::PL, - "Poland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -1272,14 +1273,14 @@ pub fn build( ), ], &mut map, - Country::PL, - "Poland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -1319,14 +1320,14 @@ pub fn build( ), ], &mut map, - Country::PL, - "Poland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -1366,14 +1367,14 @@ pub fn build( ), ], &mut map, - Country::PL, - "Poland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -1413,14 +1414,14 @@ pub fn build( ), ], &mut map, - Country::PL, - "Poland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -1460,8 +1461,8 @@ pub fn build( ), ], &mut map, - Country::PL, - "Poland", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/pt.rs b/src/data/pt.rs index b959dff..380d002 100644 --- a/src/data/pt.rs +++ b/src/data/pt.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Portugal"; +const COUNTY_CODE: Country = Country::PT; + /// Generate holiday map for Portugal. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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"), @@ -48,14 +49,14 @@ pub fn build( (NaiveDate::from_ymd_res(2000, 12, 25)?, "Dia de Natal"), ], &mut map, - Country::PT, - "Portugal", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -86,14 +87,14 @@ pub fn build( (NaiveDate::from_ymd_res(2001, 12, 25)?, "Dia de Natal"), ], &mut map, - Country::PT, - "Portugal", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -124,14 +125,14 @@ pub fn build( (NaiveDate::from_ymd_res(2002, 12, 25)?, "Dia de Natal"), ], &mut map, - Country::PT, - "Portugal", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -162,14 +163,14 @@ pub fn build( (NaiveDate::from_ymd_res(2003, 12, 25)?, "Dia de Natal"), ], &mut map, - Country::PT, - "Portugal", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -199,14 +200,14 @@ pub fn build( (NaiveDate::from_ymd_res(2004, 12, 25)?, "Dia de Natal"), ], &mut map, - Country::PT, - "Portugal", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -237,14 +238,14 @@ pub fn build( (NaiveDate::from_ymd_res(2005, 12, 25)?, "Dia de Natal"), ], &mut map, - Country::PT, - "Portugal", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -275,14 +276,14 @@ pub fn build( (NaiveDate::from_ymd_res(2006, 12, 25)?, "Dia de Natal"), ], &mut map, - Country::PT, - "Portugal", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -313,14 +314,14 @@ pub fn build( (NaiveDate::from_ymd_res(2007, 12, 25)?, "Dia de Natal"), ], &mut map, - Country::PT, - "Portugal", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -351,14 +352,14 @@ pub fn build( (NaiveDate::from_ymd_res(2008, 12, 25)?, "Dia de Natal"), ], &mut map, - Country::PT, - "Portugal", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -389,14 +390,14 @@ pub fn build( (NaiveDate::from_ymd_res(2009, 12, 25)?, "Dia de Natal"), ], &mut map, - Country::PT, - "Portugal", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -427,14 +428,14 @@ pub fn build( (NaiveDate::from_ymd_res(2010, 12, 25)?, "Dia de Natal"), ], &mut map, - Country::PT, - "Portugal", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -465,14 +466,14 @@ pub fn build( (NaiveDate::from_ymd_res(2011, 12, 25)?, "Dia de Natal"), ], &mut map, - Country::PT, - "Portugal", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -503,14 +504,14 @@ pub fn build( (NaiveDate::from_ymd_res(2012, 12, 25)?, "Dia de Natal"), ], &mut map, - Country::PT, - "Portugal", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -528,14 +529,14 @@ pub fn build( (NaiveDate::from_ymd_res(2013, 12, 25)?, "Dia de Natal"), ], &mut map, - Country::PT, - "Portugal", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -553,14 +554,14 @@ pub fn build( (NaiveDate::from_ymd_res(2014, 12, 25)?, "Dia de Natal"), ], &mut map, - Country::PT, - "Portugal", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -578,14 +579,14 @@ pub fn build( (NaiveDate::from_ymd_res(2015, 12, 25)?, "Dia de Natal"), ], &mut map, - Country::PT, - "Portugal", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -616,14 +617,14 @@ pub fn build( (NaiveDate::from_ymd_res(2016, 12, 25)?, "Dia de Natal"), ], &mut map, - Country::PT, - "Portugal", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -654,14 +655,14 @@ pub fn build( (NaiveDate::from_ymd_res(2017, 12, 25)?, "Dia de Natal"), ], &mut map, - Country::PT, - "Portugal", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -692,14 +693,14 @@ pub fn build( (NaiveDate::from_ymd_res(2018, 12, 25)?, "Dia de Natal"), ], &mut map, - Country::PT, - "Portugal", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -730,14 +731,14 @@ pub fn build( (NaiveDate::from_ymd_res(2019, 12, 25)?, "Dia de Natal"), ], &mut map, - Country::PT, - "Portugal", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -768,14 +769,14 @@ pub fn build( (NaiveDate::from_ymd_res(2020, 12, 25)?, "Dia de Natal"), ], &mut map, - Country::PT, - "Portugal", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -806,14 +807,14 @@ pub fn build( (NaiveDate::from_ymd_res(2021, 12, 25)?, "Dia de Natal"), ], &mut map, - Country::PT, - "Portugal", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -844,14 +845,14 @@ pub fn build( (NaiveDate::from_ymd_res(2022, 12, 25)?, "Dia de Natal"), ], &mut map, - Country::PT, - "Portugal", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -882,14 +883,14 @@ pub fn build( (NaiveDate::from_ymd_res(2023, 12, 25)?, "Dia de Natal"), ], &mut map, - Country::PT, - "Portugal", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -920,14 +921,14 @@ pub fn build( (NaiveDate::from_ymd_res(2024, 12, 25)?, "Dia de Natal"), ], &mut map, - Country::PT, - "Portugal", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -958,14 +959,14 @@ pub fn build( (NaiveDate::from_ymd_res(2025, 12, 25)?, "Dia de Natal"), ], &mut map, - Country::PT, - "Portugal", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -996,14 +997,14 @@ pub fn build( (NaiveDate::from_ymd_res(2026, 12, 25)?, "Dia de Natal"), ], &mut map, - Country::PT, - "Portugal", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1034,14 +1035,14 @@ pub fn build( (NaiveDate::from_ymd_res(2027, 12, 25)?, "Dia de Natal"), ], &mut map, - Country::PT, - "Portugal", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1072,14 +1073,14 @@ pub fn build( (NaiveDate::from_ymd_res(2028, 12, 25)?, "Dia de Natal"), ], &mut map, - Country::PT, - "Portugal", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1110,14 +1111,14 @@ pub fn build( (NaiveDate::from_ymd_res(2029, 12, 25)?, "Dia de Natal"), ], &mut map, - Country::PT, - "Portugal", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1148,8 +1149,8 @@ pub fn build( (NaiveDate::from_ymd_res(2030, 12, 25)?, "Dia de Natal"), ], &mut map, - Country::PT, - "Portugal", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/py.rs b/src/data/py.rs index 427c2d8..ed174b1 100644 --- a/src/data/py.rs +++ b/src/data/py.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Paraguay"; +const COUNTY_CODE: Country = Country::PY; + /// Generate holiday map for Paraguay. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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)?, @@ -53,14 +54,14 @@ pub fn build( (NaiveDate::from_ymd_res(2000, 12, 25)?, "Navidad"), ], &mut map, - Country::PY, - "Paraguay", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2001, - vec![ + [ (NaiveDate::from_ymd_res(2001, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2001, 3, 1)?, @@ -96,14 +97,14 @@ pub fn build( (NaiveDate::from_ymd_res(2001, 12, 25)?, "Navidad"), ], &mut map, - Country::PY, - "Paraguay", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2002, - vec![ + [ (NaiveDate::from_ymd_res(2002, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2002, 3, 1)?, @@ -139,14 +140,14 @@ pub fn build( (NaiveDate::from_ymd_res(2002, 12, 25)?, "Navidad"), ], &mut map, - Country::PY, - "Paraguay", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2003, - vec![ + [ (NaiveDate::from_ymd_res(2003, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2003, 3, 1)?, @@ -182,14 +183,14 @@ pub fn build( (NaiveDate::from_ymd_res(2003, 12, 25)?, "Navidad"), ], &mut map, - Country::PY, - "Paraguay", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2004, - vec![ + [ (NaiveDate::from_ymd_res(2004, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2004, 3, 1)?, @@ -225,14 +226,14 @@ pub fn build( (NaiveDate::from_ymd_res(2004, 12, 25)?, "Navidad"), ], &mut map, - Country::PY, - "Paraguay", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2005, - vec![ + [ (NaiveDate::from_ymd_res(2005, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2005, 3, 1)?, @@ -268,14 +269,14 @@ pub fn build( (NaiveDate::from_ymd_res(2005, 12, 25)?, "Navidad"), ], &mut map, - Country::PY, - "Paraguay", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2006, - vec![ + [ (NaiveDate::from_ymd_res(2006, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2006, 3, 1)?, @@ -311,14 +312,14 @@ pub fn build( (NaiveDate::from_ymd_res(2006, 12, 25)?, "Navidad"), ], &mut map, - Country::PY, - "Paraguay", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2007, - vec![ + [ (NaiveDate::from_ymd_res(2007, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2007, 3, 1)?, @@ -355,14 +356,14 @@ pub fn build( (NaiveDate::from_ymd_res(2007, 1, 29)?, "Asueto adicionale"), ], &mut map, - Country::PY, - "Paraguay", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2008, - vec![ + [ (NaiveDate::from_ymd_res(2008, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2008, 3, 1)?, @@ -398,14 +399,14 @@ pub fn build( (NaiveDate::from_ymd_res(2008, 12, 25)?, "Navidad"), ], &mut map, - Country::PY, - "Paraguay", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2009, - vec![ + [ (NaiveDate::from_ymd_res(2009, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2009, 3, 1)?, @@ -442,14 +443,14 @@ pub fn build( (NaiveDate::from_ymd_res(2009, 9, 10)?, "Asueto adicionale"), ], &mut map, - Country::PY, - "Paraguay", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2010, - vec![ + [ (NaiveDate::from_ymd_res(2010, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2010, 3, 1)?, @@ -486,14 +487,14 @@ pub fn build( (NaiveDate::from_ymd_res(2010, 6, 14)?, "Asueto adicionale"), ], &mut map, - Country::PY, - "Paraguay", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2011, - vec![ + [ (NaiveDate::from_ymd_res(2011, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2011, 3, 1)?, @@ -532,14 +533,14 @@ pub fn build( (NaiveDate::from_ymd_res(2011, 5, 16)?, "Asueto adicionale"), ], &mut map, - Country::PY, - "Paraguay", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2012, - vec![ + [ (NaiveDate::from_ymd_res(2012, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2012, 3, 1)?, @@ -579,14 +580,14 @@ pub fn build( (NaiveDate::from_ymd_res(2012, 12, 25)?, "Navidad"), ], &mut map, - Country::PY, - "Paraguay", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2013, - vec![ + [ (NaiveDate::from_ymd_res(2013, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2013, 3, 4)?, @@ -627,14 +628,14 @@ pub fn build( (NaiveDate::from_ymd_res(2013, 8, 14)?, "Asueto adicionale"), ], &mut map, - Country::PY, - "Paraguay", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2014, - vec![ + [ (NaiveDate::from_ymd_res(2014, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2014, 3, 1)?, @@ -674,14 +675,14 @@ pub fn build( (NaiveDate::from_ymd_res(2014, 12, 25)?, "Navidad"), ], &mut map, - Country::PY, - "Paraguay", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2015, - vec![ + [ (NaiveDate::from_ymd_res(2015, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2015, 3, 1)?, @@ -723,14 +724,14 @@ pub fn build( (NaiveDate::from_ymd_res(2015, 7, 11)?, "Asueto adicionale"), ], &mut map, - Country::PY, - "Paraguay", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2016, - vec![ + [ (NaiveDate::from_ymd_res(2016, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2016, 2, 29)?, @@ -770,14 +771,14 @@ pub fn build( (NaiveDate::from_ymd_res(2016, 12, 25)?, "Navidad"), ], &mut map, - Country::PY, - "Paraguay", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2017, - vec![ + [ (NaiveDate::from_ymd_res(2017, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2017, 3, 1)?, @@ -817,14 +818,14 @@ pub fn build( (NaiveDate::from_ymd_res(2017, 12, 25)?, "Navidad"), ], &mut map, - Country::PY, - "Paraguay", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2018, - vec![ + [ (NaiveDate::from_ymd_res(2018, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2018, 2, 26)?, @@ -864,14 +865,14 @@ pub fn build( (NaiveDate::from_ymd_res(2018, 12, 25)?, "Navidad"), ], &mut map, - Country::PY, - "Paraguay", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2019, - vec![ + [ (NaiveDate::from_ymd_res(2019, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2019, 3, 1)?, @@ -911,14 +912,14 @@ pub fn build( (NaiveDate::from_ymd_res(2019, 12, 25)?, "Navidad"), ], &mut map, - Country::PY, - "Paraguay", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2020, - vec![ + [ (NaiveDate::from_ymd_res(2020, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2020, 3, 1)?, @@ -958,14 +959,14 @@ pub fn build( (NaiveDate::from_ymd_res(2020, 12, 25)?, "Navidad"), ], &mut map, - Country::PY, - "Paraguay", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2021, - vec![ + [ (NaiveDate::from_ymd_res(2021, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2021, 3, 1)?, @@ -1005,14 +1006,14 @@ pub fn build( (NaiveDate::from_ymd_res(2021, 12, 25)?, "Navidad"), ], &mut map, - Country::PY, - "Paraguay", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2022, - vec![ + [ (NaiveDate::from_ymd_res(2022, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2022, 2, 28)?, @@ -1052,14 +1053,14 @@ pub fn build( (NaiveDate::from_ymd_res(2022, 12, 25)?, "Navidad"), ], &mut map, - Country::PY, - "Paraguay", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2023, - vec![ + [ (NaiveDate::from_ymd_res(2023, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2023, 3, 1)?, @@ -1099,14 +1100,14 @@ pub fn build( (NaiveDate::from_ymd_res(2023, 12, 25)?, "Navidad"), ], &mut map, - Country::PY, - "Paraguay", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2024, - vec![ + [ (NaiveDate::from_ymd_res(2024, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2024, 3, 1)?, @@ -1146,14 +1147,14 @@ pub fn build( (NaiveDate::from_ymd_res(2024, 12, 25)?, "Navidad"), ], &mut map, - Country::PY, - "Paraguay", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2025, - vec![ + [ (NaiveDate::from_ymd_res(2025, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2025, 3, 1)?, @@ -1193,14 +1194,14 @@ pub fn build( (NaiveDate::from_ymd_res(2025, 12, 25)?, "Navidad"), ], &mut map, - Country::PY, - "Paraguay", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2026, - vec![ + [ (NaiveDate::from_ymd_res(2026, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2026, 3, 1)?, @@ -1240,14 +1241,14 @@ pub fn build( (NaiveDate::from_ymd_res(2026, 12, 25)?, "Navidad"), ], &mut map, - Country::PY, - "Paraguay", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2027, - vec![ + [ (NaiveDate::from_ymd_res(2027, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2027, 3, 1)?, @@ -1287,14 +1288,14 @@ pub fn build( (NaiveDate::from_ymd_res(2027, 12, 25)?, "Navidad"), ], &mut map, - Country::PY, - "Paraguay", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2028, - vec![ + [ (NaiveDate::from_ymd_res(2028, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2028, 3, 1)?, @@ -1334,14 +1335,14 @@ pub fn build( (NaiveDate::from_ymd_res(2028, 12, 25)?, "Navidad"), ], &mut map, - Country::PY, - "Paraguay", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2029, - vec![ + [ (NaiveDate::from_ymd_res(2029, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2029, 3, 1)?, @@ -1381,14 +1382,14 @@ pub fn build( (NaiveDate::from_ymd_res(2029, 12, 25)?, "Navidad"), ], &mut map, - Country::PY, - "Paraguay", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2030, - vec![ + [ (NaiveDate::from_ymd_res(2030, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2030, 3, 1)?, @@ -1428,8 +1429,8 @@ pub fn build( (NaiveDate::from_ymd_res(2030, 12, 25)?, "Navidad"), ], &mut map, - Country::PY, - "Paraguay", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/ro.rs b/src/data/ro.rs index 09e30de..c3b9acf 100644 --- a/src/data/ro.rs +++ b/src/data/ro.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Romania"; +const COUNTY_CODE: Country = Country::RO; + /// Generate holiday map for Romania. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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"), @@ -32,14 +33,14 @@ pub fn build( (NaiveDate::from_ymd_res(2000, 12, 26)?, "Crăciunul"), ], &mut map, - Country::RO, - "Romania", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -55,14 +56,14 @@ pub fn build( (NaiveDate::from_ymd_res(2001, 12, 26)?, "Crăciunul"), ], &mut map, - Country::RO, - "Romania", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -78,14 +79,14 @@ pub fn build( (NaiveDate::from_ymd_res(2002, 12, 26)?, "Crăciunul"), ], &mut map, - Country::RO, - "Romania", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -101,14 +102,14 @@ pub fn build( (NaiveDate::from_ymd_res(2003, 12, 26)?, "Crăciunul"), ], &mut map, - Country::RO, - "Romania", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -124,14 +125,14 @@ pub fn build( (NaiveDate::from_ymd_res(2004, 12, 26)?, "Crăciunul"), ], &mut map, - Country::RO, - "Romania", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -146,14 +147,14 @@ pub fn build( (NaiveDate::from_ymd_res(2005, 12, 26)?, "Crăciunul"), ], &mut map, - Country::RO, - "Romania", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -169,14 +170,14 @@ pub fn build( (NaiveDate::from_ymd_res(2006, 12, 26)?, "Crăciunul"), ], &mut map, - Country::RO, - "Romania", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -192,14 +193,14 @@ pub fn build( (NaiveDate::from_ymd_res(2007, 12, 26)?, "Crăciunul"), ], &mut map, - Country::RO, - "Romania", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -215,14 +216,14 @@ pub fn build( (NaiveDate::from_ymd_res(2008, 12, 26)?, "Crăciunul"), ], &mut map, - Country::RO, - "Romania", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -242,14 +243,14 @@ pub fn build( (NaiveDate::from_ymd_res(2009, 12, 26)?, "Crăciunul"), ], &mut map, - Country::RO, - "Romania", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -269,14 +270,14 @@ pub fn build( (NaiveDate::from_ymd_res(2010, 12, 26)?, "Crăciunul"), ], &mut map, - Country::RO, - "Romania", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -296,14 +297,14 @@ pub fn build( (NaiveDate::from_ymd_res(2011, 12, 26)?, "Crăciunul"), ], &mut map, - Country::RO, - "Romania", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -327,14 +328,14 @@ pub fn build( (NaiveDate::from_ymd_res(2012, 12, 26)?, "Crăciunul"), ], &mut map, - Country::RO, - "Romania", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -358,14 +359,14 @@ pub fn build( (NaiveDate::from_ymd_res(2013, 12, 26)?, "Crăciunul"), ], &mut map, - Country::RO, - "Romania", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -389,14 +390,14 @@ pub fn build( (NaiveDate::from_ymd_res(2014, 12, 26)?, "Crăciunul"), ], &mut map, - Country::RO, - "Romania", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -420,14 +421,14 @@ pub fn build( (NaiveDate::from_ymd_res(2015, 12, 26)?, "Crăciunul"), ], &mut map, - Country::RO, - "Romania", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2016, - vec![ + [ (NaiveDate::from_ymd_res(2016, 1, 1)?, "Anul Nou"), (NaiveDate::from_ymd_res(2016, 1, 2)?, "Anul Nou"), ( @@ -454,14 +455,14 @@ pub fn build( (NaiveDate::from_ymd_res(2016, 12, 26)?, "Crăciunul"), ], &mut map, - Country::RO, - "Romania", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2017, - vec![ + [ (NaiveDate::from_ymd_res(2017, 1, 1)?, "Anul Nou"), (NaiveDate::from_ymd_res(2017, 1, 2)?, "Anul Nou"), ( @@ -490,14 +491,14 @@ pub fn build( (NaiveDate::from_ymd_res(2017, 12, 26)?, "Crăciunul"), ], &mut map, - Country::RO, - "Romania", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2018, - vec![ + [ (NaiveDate::from_ymd_res(2018, 1, 1)?, "Anul Nou"), (NaiveDate::from_ymd_res(2018, 1, 2)?, "Anul Nou"), ( @@ -527,14 +528,14 @@ pub fn build( (NaiveDate::from_ymd_res(2018, 12, 26)?, "Crăciunul"), ], &mut map, - Country::RO, - "Romania", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2019, - vec![ + [ (NaiveDate::from_ymd_res(2019, 1, 1)?, "Anul Nou"), (NaiveDate::from_ymd_res(2019, 1, 2)?, "Anul Nou"), ( @@ -564,14 +565,14 @@ pub fn build( (NaiveDate::from_ymd_res(2019, 12, 26)?, "Crăciunul"), ], &mut map, - Country::RO, - "Romania", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2020, - vec![ + [ (NaiveDate::from_ymd_res(2020, 1, 1)?, "Anul Nou"), (NaiveDate::from_ymd_res(2020, 1, 2)?, "Anul Nou"), ( @@ -601,14 +602,14 @@ pub fn build( (NaiveDate::from_ymd_res(2020, 12, 26)?, "Crăciunul"), ], &mut map, - Country::RO, - "Romania", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2021, - vec![ + [ (NaiveDate::from_ymd_res(2021, 1, 1)?, "Anul Nou"), (NaiveDate::from_ymd_res(2021, 1, 2)?, "Anul Nou"), ( @@ -638,14 +639,14 @@ pub fn build( (NaiveDate::from_ymd_res(2021, 12, 26)?, "Crăciunul"), ], &mut map, - Country::RO, - "Romania", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2022, - vec![ + [ (NaiveDate::from_ymd_res(2022, 1, 1)?, "Anul Nou"), (NaiveDate::from_ymd_res(2022, 1, 2)?, "Anul Nou"), ( @@ -675,14 +676,14 @@ pub fn build( (NaiveDate::from_ymd_res(2022, 12, 26)?, "Crăciunul"), ], &mut map, - Country::RO, - "Romania", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2023, - vec![ + [ (NaiveDate::from_ymd_res(2023, 1, 1)?, "Anul Nou"), (NaiveDate::from_ymd_res(2023, 1, 2)?, "Anul Nou"), ( @@ -712,14 +713,14 @@ pub fn build( (NaiveDate::from_ymd_res(2023, 12, 26)?, "Crăciunul"), ], &mut map, - Country::RO, - "Romania", + COUNTY_CODE, + COUNTY_NAME, ); 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ă"), @@ -751,14 +752,14 @@ pub fn build( (NaiveDate::from_ymd_res(2024, 12, 26)?, "Crăciunul"), ], &mut map, - Country::RO, - "Romania", + COUNTY_CODE, + COUNTY_NAME, ); 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ă"), @@ -790,14 +791,14 @@ pub fn build( (NaiveDate::from_ymd_res(2025, 12, 26)?, "Crăciunul"), ], &mut map, - Country::RO, - "Romania", + COUNTY_CODE, + COUNTY_NAME, ); 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ă"), @@ -831,14 +832,14 @@ pub fn build( (NaiveDate::from_ymd_res(2026, 12, 26)?, "Crăciunul"), ], &mut map, - Country::RO, - "Romania", + COUNTY_CODE, + COUNTY_NAME, ); 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ă"), @@ -870,14 +871,14 @@ pub fn build( (NaiveDate::from_ymd_res(2027, 12, 26)?, "Crăciunul"), ], &mut map, - Country::RO, - "Romania", + COUNTY_CODE, + COUNTY_NAME, ); 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ă"), @@ -909,14 +910,14 @@ pub fn build( (NaiveDate::from_ymd_res(2028, 12, 26)?, "Crăciunul"), ], &mut map, - Country::RO, - "Romania", + COUNTY_CODE, + COUNTY_NAME, ); 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ă"), @@ -948,14 +949,14 @@ pub fn build( (NaiveDate::from_ymd_res(2029, 12, 26)?, "Crăciunul"), ], &mut map, - Country::RO, - "Romania", + COUNTY_CODE, + COUNTY_NAME, ); 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ă"), @@ -987,8 +988,8 @@ pub fn build( (NaiveDate::from_ymd_res(2030, 12, 26)?, "Crăciunul"), ], &mut map, - Country::RO, - "Romania", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/rs.rs b/src/data/rs.rs index d1436a9..095c402 100644 --- a/src/data/rs.rs +++ b/src/data/rs.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Serbia"; +const COUNTY_CODE: Country = Country::RS; + /// Generate holiday map for Serbia. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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)?, "Нова година"), ( @@ -47,14 +48,14 @@ pub fn build( (NaiveDate::from_ymd_res(2000, 4, 30)?, "Васкрс"), ], &mut map, - Country::RS, - "Serbia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Божић"), @@ -82,14 +83,14 @@ pub fn build( (NaiveDate::from_ymd_res(2001, 4, 16)?, "Други дан Васкрса"), ], &mut map, - Country::RS, - "Serbia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Божић"), @@ -113,14 +114,14 @@ pub fn build( (NaiveDate::from_ymd_res(2002, 5, 6)?, "Други дан Васкрса"), ], &mut map, - Country::RS, - "Serbia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Божић"), @@ -148,14 +149,14 @@ pub fn build( (NaiveDate::from_ymd_res(2003, 4, 28)?, "Други дан Васкрса"), ], &mut map, - Country::RS, - "Serbia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Божић"), @@ -187,14 +188,14 @@ pub fn build( (NaiveDate::from_ymd_res(2004, 4, 12)?, "Други дан Васкрса"), ], &mut map, - Country::RS, - "Serbia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2005, - vec![ + [ (NaiveDate::from_ymd_res(2005, 1, 1)?, "Нова година"), (NaiveDate::from_ymd_res(2005, 1, 2)?, "Нова година"), ( @@ -227,14 +228,14 @@ pub fn build( (NaiveDate::from_ymd_res(2005, 4, 30)?, "Велика субота"), ], &mut map, - Country::RS, - "Serbia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2006, - vec![ + [ (NaiveDate::from_ymd_res(2006, 1, 1)?, "Нова година"), ( NaiveDate::from_ymd_res(2006, 1, 3)?, @@ -262,14 +263,14 @@ pub fn build( (NaiveDate::from_ymd_res(2006, 4, 24)?, "Други дан Васкрса"), ], &mut map, - Country::RS, - "Serbia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Божић"), @@ -297,14 +298,14 @@ pub fn build( (NaiveDate::from_ymd_res(2007, 4, 9)?, "Други дан Васкрса"), ], &mut map, - Country::RS, - "Serbia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Божић"), @@ -328,14 +329,14 @@ pub fn build( (NaiveDate::from_ymd_res(2008, 4, 28)?, "Други дан Васкрса"), ], &mut map, - Country::RS, - "Serbia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Божић"), @@ -363,14 +364,14 @@ pub fn build( (NaiveDate::from_ymd_res(2009, 4, 20)?, "Други дан Васкрса"), ], &mut map, - Country::RS, - "Serbia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Божић"), @@ -398,14 +399,14 @@ pub fn build( (NaiveDate::from_ymd_res(2010, 4, 5)?, "Други дан Васкрса"), ], &mut map, - Country::RS, - "Serbia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2011, - vec![ + [ (NaiveDate::from_ymd_res(2011, 1, 1)?, "Нова година"), (NaiveDate::from_ymd_res(2011, 1, 2)?, "Нова година"), ( @@ -437,14 +438,14 @@ pub fn build( (NaiveDate::from_ymd_res(2011, 4, 25)?, "Други дан Васкрса"), ], &mut map, - Country::RS, - "Serbia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2012, - vec![ + [ (NaiveDate::from_ymd_res(2012, 1, 1)?, "Нова година"), ( NaiveDate::from_ymd_res(2012, 1, 3)?, @@ -476,14 +477,14 @@ pub fn build( (NaiveDate::from_ymd_res(2012, 4, 16)?, "Други дан Васкрса"), ], &mut map, - Country::RS, - "Serbia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Божић"), @@ -507,14 +508,14 @@ pub fn build( (NaiveDate::from_ymd_res(2013, 5, 6)?, "Други дан Васкрса"), ], &mut map, - Country::RS, - "Serbia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Божић"), @@ -542,14 +543,14 @@ pub fn build( (NaiveDate::from_ymd_res(2014, 4, 21)?, "Други дан Васкрса"), ], &mut map, - Country::RS, - "Serbia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Божић"), @@ -577,14 +578,14 @@ pub fn build( (NaiveDate::from_ymd_res(2015, 4, 13)?, "Други дан Васкрса"), ], &mut map, - Country::RS, - "Serbia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Божић"), @@ -613,14 +614,14 @@ pub fn build( (NaiveDate::from_ymd_res(2016, 4, 30)?, "Велика субота"), ], &mut map, - Country::RS, - "Serbia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2017, - vec![ + [ (NaiveDate::from_ymd_res(2017, 1, 1)?, "Нова година"), ( NaiveDate::from_ymd_res(2017, 1, 3)?, @@ -648,14 +649,14 @@ pub fn build( (NaiveDate::from_ymd_res(2017, 4, 17)?, "Други дан Васкрса"), ], &mut map, - Country::RS, - "Serbia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Божић"), @@ -683,14 +684,14 @@ pub fn build( (NaiveDate::from_ymd_res(2018, 4, 9)?, "Други дан Васкрса"), ], &mut map, - Country::RS, - "Serbia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Божић"), @@ -714,14 +715,14 @@ pub fn build( (NaiveDate::from_ymd_res(2019, 4, 29)?, "Други дан Васкрса"), ], &mut map, - Country::RS, - "Serbia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Божић"), @@ -749,14 +750,14 @@ pub fn build( (NaiveDate::from_ymd_res(2020, 4, 20)?, "Други дан Васкрса"), ], &mut map, - Country::RS, - "Serbia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Божић"), @@ -785,14 +786,14 @@ pub fn build( (NaiveDate::from_ymd_res(2021, 5, 3)?, "Други дан Васкрса"), ], &mut map, - Country::RS, - "Serbia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2022, - vec![ + [ (NaiveDate::from_ymd_res(2022, 1, 1)?, "Нова година"), (NaiveDate::from_ymd_res(2022, 1, 2)?, "Нова година"), ( @@ -824,14 +825,14 @@ pub fn build( (NaiveDate::from_ymd_res(2022, 4, 25)?, "Други дан Васкрса"), ], &mut map, - Country::RS, - "Serbia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2023, - vec![ + [ (NaiveDate::from_ymd_res(2023, 1, 1)?, "Нова година"), ( NaiveDate::from_ymd_res(2023, 1, 3)?, @@ -859,14 +860,14 @@ pub fn build( (NaiveDate::from_ymd_res(2023, 4, 17)?, "Други дан Васкрса"), ], &mut map, - Country::RS, - "Serbia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Божић"), @@ -890,14 +891,14 @@ pub fn build( (NaiveDate::from_ymd_res(2024, 5, 6)?, "Други дан Васкрса"), ], &mut map, - Country::RS, - "Serbia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Божић"), @@ -925,14 +926,14 @@ pub fn build( (NaiveDate::from_ymd_res(2025, 4, 21)?, "Други дан Васкрса"), ], &mut map, - Country::RS, - "Serbia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Божић"), @@ -960,14 +961,14 @@ pub fn build( (NaiveDate::from_ymd_res(2026, 4, 13)?, "Други дан Васкрса"), ], &mut map, - Country::RS, - "Serbia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Божић"), @@ -996,14 +997,14 @@ pub fn build( (NaiveDate::from_ymd_res(2027, 5, 3)?, "Други дан Васкрса"), ], &mut map, - Country::RS, - "Serbia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2028, - vec![ + [ (NaiveDate::from_ymd_res(2028, 1, 1)?, "Нова година"), (NaiveDate::from_ymd_res(2028, 1, 2)?, "Нова година"), ( @@ -1031,14 +1032,14 @@ pub fn build( (NaiveDate::from_ymd_res(2028, 4, 17)?, "Други дан Васкрса"), ], &mut map, - Country::RS, - "Serbia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Божић"), @@ -1066,14 +1067,14 @@ pub fn build( (NaiveDate::from_ymd_res(2029, 4, 9)?, "Други дан Васкрса"), ], &mut map, - Country::RS, - "Serbia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Божић"), @@ -1097,8 +1098,8 @@ pub fn build( (NaiveDate::from_ymd_res(2030, 4, 29)?, "Други дан Васкрса"), ], &mut map, - Country::RS, - "Serbia", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/ru.rs b/src/data/ru.rs index 7e6e7ef..c124d58 100644 --- a/src/data/ru.rs +++ b/src/data/ru.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Russia"; +const COUNTY_CODE: Country = Country::RU; + /// Generate holiday map for Russia. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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)?, "Рождество Христово"), @@ -44,14 +45,14 @@ pub fn build( ), ], &mut map, - Country::RU, - "Russia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Рождество Христово"), @@ -78,14 +79,14 @@ pub fn build( ), ], &mut map, - Country::RU, - "Russia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Рождество Христово"), @@ -113,14 +114,14 @@ pub fn build( ), ], &mut map, - Country::RU, - "Russia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Рождество Христово"), @@ -148,14 +149,14 @@ pub fn build( ), ], &mut map, - Country::RU, - "Russia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Рождество Христово"), @@ -183,14 +184,14 @@ pub fn build( ), ], &mut map, - Country::RU, - "Russia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Новогодние каникулы"), @@ -217,14 +218,14 @@ pub fn build( ), ], &mut map, - Country::RU, - "Russia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Новогодние каникулы"), @@ -251,14 +252,14 @@ pub fn build( ), ], &mut map, - Country::RU, - "Russia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Новогодние каникулы"), @@ -285,14 +286,14 @@ pub fn build( ), ], &mut map, - Country::RU, - "Russia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Новогодние каникулы"), @@ -319,14 +320,14 @@ pub fn build( ), ], &mut map, - Country::RU, - "Russia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Новогодние каникулы"), @@ -353,14 +354,14 @@ pub fn build( ), ], &mut map, - Country::RU, - "Russia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Новогодние каникулы"), @@ -387,14 +388,14 @@ pub fn build( ), ], &mut map, - Country::RU, - "Russia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Новогодние каникулы"), @@ -421,14 +422,14 @@ pub fn build( ), ], &mut map, - Country::RU, - "Russia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Новогодние каникулы"), @@ -455,14 +456,14 @@ pub fn build( ), ], &mut map, - Country::RU, - "Russia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Новогодние каникулы"), @@ -491,14 +492,14 @@ pub fn build( ), ], &mut map, - Country::RU, - "Russia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Новогодние каникулы"), @@ -527,14 +528,14 @@ pub fn build( ), ], &mut map, - Country::RU, - "Russia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Новогодние каникулы"), @@ -563,14 +564,14 @@ pub fn build( ), ], &mut map, - Country::RU, - "Russia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Новогодние каникулы"), @@ -599,14 +600,14 @@ pub fn build( ), ], &mut map, - Country::RU, - "Russia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Новогодние каникулы"), @@ -635,14 +636,14 @@ pub fn build( ), ], &mut map, - Country::RU, - "Russia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Новогодние каникулы"), @@ -671,14 +672,14 @@ pub fn build( ), ], &mut map, - Country::RU, - "Russia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Новогодние каникулы"), @@ -707,14 +708,14 @@ pub fn build( ), ], &mut map, - Country::RU, - "Russia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Новогодние каникулы"), @@ -743,14 +744,14 @@ pub fn build( ), ], &mut map, - Country::RU, - "Russia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Новогодние каникулы"), @@ -779,14 +780,14 @@ pub fn build( ), ], &mut map, - Country::RU, - "Russia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Новогодние каникулы"), @@ -815,14 +816,14 @@ pub fn build( ), ], &mut map, - Country::RU, - "Russia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Новогодние каникулы"), @@ -859,14 +860,14 @@ pub fn build( ), ], &mut map, - Country::RU, - "Russia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Новогодние каникулы"), @@ -915,14 +916,14 @@ pub fn build( ), ], &mut map, - Country::RU, - "Russia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Новогодние каникулы"), @@ -951,14 +952,14 @@ pub fn build( ), ], &mut map, - Country::RU, - "Russia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Новогодние каникулы"), @@ -987,14 +988,14 @@ pub fn build( ), ], &mut map, - Country::RU, - "Russia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Новогодние каникулы"), @@ -1023,14 +1024,14 @@ pub fn build( ), ], &mut map, - Country::RU, - "Russia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Новогодние каникулы"), @@ -1059,14 +1060,14 @@ pub fn build( ), ], &mut map, - Country::RU, - "Russia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Новогодние каникулы"), @@ -1095,14 +1096,14 @@ pub fn build( ), ], &mut map, - Country::RU, - "Russia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "Новогодние каникулы"), @@ -1131,8 +1132,8 @@ pub fn build( ), ], &mut map, - Country::RU, - "Russia", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/sa.rs b/src/data/sa.rs index 1bde904..7c00907 100644 --- a/src/data/sa.rs +++ b/src/data/sa.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Saudi Arabia"; +const COUNTY_CODE: Country = Country::SA; + /// Generate holiday map for Saudi Arabia. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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)?, "(تقدير) عطلة عيد الفطر", @@ -77,14 +78,14 @@ pub fn build( ), ], &mut map, - Country::SA, - "Saudi Arabia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2001, - vec![ + [ ( NaiveDate::from_ymd_res(2001, 12, 16)?, "(تقدير) عطلة عيد الفطر", @@ -120,14 +121,14 @@ pub fn build( ), ], &mut map, - Country::SA, - "Saudi Arabia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2002, - vec![ + [ ( NaiveDate::from_ymd_res(2002, 12, 5)?, "(تقدير) عطلة عيد الفطر", @@ -175,14 +176,14 @@ pub fn build( ), ], &mut map, - Country::SA, - "Saudi Arabia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2003, - vec![ + [ ( NaiveDate::from_ymd_res(2003, 11, 25)?, "(تقدير) عطلة عيد الفطر", @@ -226,14 +227,14 @@ pub fn build( ), ], &mut map, - Country::SA, - "Saudi Arabia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2004, - vec![ + [ ( NaiveDate::from_ymd_res(2004, 11, 14)?, "(تقدير) عطلة عيد الفطر", @@ -265,14 +266,14 @@ pub fn build( ), ], &mut map, - Country::SA, - "Saudi Arabia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2005, - vec![ + [ ( NaiveDate::from_ymd_res(2005, 11, 3)?, "(تقدير) عطلة عيد الفطر", @@ -325,14 +326,14 @@ pub fn build( ), ], &mut map, - Country::SA, - "Saudi Arabia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2006, - vec![ + [ ( NaiveDate::from_ymd_res(2006, 10, 23)?, "(تقدير) عطلة عيد الفطر", @@ -378,14 +379,14 @@ pub fn build( (NaiveDate::from_ymd_res(2006, 9, 23)?, "اليوم الوطني"), ], &mut map, - Country::SA, - "Saudi Arabia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2007, - vec![ + [ ( NaiveDate::from_ymd_res(2007, 10, 13)?, "(تقدير) عطلة عيد الفطر", @@ -434,14 +435,14 @@ pub fn build( (NaiveDate::from_ymd_res(2007, 9, 23)?, "اليوم الوطني"), ], &mut map, - Country::SA, - "Saudi Arabia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2008, - vec![ + [ ( NaiveDate::from_ymd_res(2008, 10, 1)?, "(تقدير) عطلة عيد الفطر", @@ -482,14 +483,14 @@ pub fn build( (NaiveDate::from_ymd_res(2008, 9, 23)?, "اليوم الوطني"), ], &mut map, - Country::SA, - "Saudi Arabia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2009, - vec![ + [ ( NaiveDate::from_ymd_res(2009, 9, 20)?, "(تقدير) عطلة عيد الفطر", @@ -529,14 +530,14 @@ pub fn build( ), ], &mut map, - Country::SA, - "Saudi Arabia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2010, - vec![ + [ ( NaiveDate::from_ymd_res(2010, 9, 10)?, "(تقدير) عطلة عيد الفطر", @@ -581,14 +582,14 @@ pub fn build( ), ], &mut map, - Country::SA, - "Saudi Arabia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2011, - vec![ + [ ( NaiveDate::from_ymd_res(2011, 8, 30)?, "(تقدير) عطلة عيد الفطر", @@ -633,14 +634,14 @@ pub fn build( ), ], &mut map, - Country::SA, - "Saudi Arabia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2012, - vec![ + [ ( NaiveDate::from_ymd_res(2012, 8, 19)?, "(تقدير) عطلة عيد الفطر", @@ -681,14 +682,14 @@ pub fn build( (NaiveDate::from_ymd_res(2012, 9, 23)?, "اليوم الوطني"), ], &mut map, - Country::SA, - "Saudi Arabia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2013, - vec![ + [ ( NaiveDate::from_ymd_res(2013, 8, 8)?, "(تقدير) عطلة عيد الفطر", @@ -729,14 +730,14 @@ pub fn build( (NaiveDate::from_ymd_res(2013, 9, 23)?, "اليوم الوطني"), ], &mut map, - Country::SA, - "Saudi Arabia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2014, - vec![ + [ ( NaiveDate::from_ymd_res(2014, 7, 28)?, "(تقدير) عطلة عيد الفطر", @@ -777,14 +778,14 @@ pub fn build( (NaiveDate::from_ymd_res(2014, 9, 23)?, "اليوم الوطني"), ], &mut map, - Country::SA, - "Saudi Arabia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2015, - vec![ + [ ( NaiveDate::from_ymd_res(2015, 7, 17)?, "(تقدير) عطلة عيد الفطر", @@ -828,14 +829,14 @@ pub fn build( ), ], &mut map, - Country::SA, - "Saudi Arabia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2016, - vec![ + [ ( NaiveDate::from_ymd_res(2016, 7, 6)?, "(تقدير) عطلة عيد الفطر", @@ -884,14 +885,14 @@ pub fn build( ), ], &mut map, - Country::SA, - "Saudi Arabia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2017, - vec![ + [ ( NaiveDate::from_ymd_res(2017, 6, 25)?, "(تقدير) عطلة عيد الفطر", @@ -936,14 +937,14 @@ pub fn build( ), ], &mut map, - Country::SA, - "Saudi Arabia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2018, - vec![ + [ ( NaiveDate::from_ymd_res(2018, 6, 15)?, "(تقدير) عطلة عيد الفطر", @@ -984,14 +985,14 @@ pub fn build( (NaiveDate::from_ymd_res(2018, 9, 23)?, "اليوم الوطني"), ], &mut map, - Country::SA, - "Saudi Arabia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2019, - vec![ + [ ( NaiveDate::from_ymd_res(2019, 6, 4)?, "(تقدير) عطلة عيد الفطر", @@ -1032,14 +1033,14 @@ pub fn build( (NaiveDate::from_ymd_res(2019, 9, 23)?, "اليوم الوطني"), ], &mut map, - Country::SA, - "Saudi Arabia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2020, - vec![ + [ ( NaiveDate::from_ymd_res(2020, 5, 24)?, "(تقدير) عطلة عيد الفطر", @@ -1080,14 +1081,14 @@ pub fn build( (NaiveDate::from_ymd_res(2020, 9, 23)?, "اليوم الوطني"), ], &mut map, - Country::SA, - "Saudi Arabia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2021, - vec![ + [ ( NaiveDate::from_ymd_res(2021, 5, 13)?, "(تقدير) عطلة عيد الفطر", @@ -1128,14 +1129,14 @@ pub fn build( (NaiveDate::from_ymd_res(2021, 9, 23)?, "اليوم الوطني"), ], &mut map, - Country::SA, - "Saudi Arabia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2022, - vec![ + [ ( NaiveDate::from_ymd_res(2022, 5, 2)?, "(تقدير) عطلة عيد الفطر", @@ -1182,14 +1183,14 @@ pub fn build( (NaiveDate::from_ymd_res(2022, 11, 23)?, "يوم وطني"), ], &mut map, - Country::SA, - "Saudi Arabia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2023, - vec![ + [ ( NaiveDate::from_ymd_res(2023, 4, 21)?, "(تقدير) عطلة عيد الفطر", @@ -1239,14 +1240,14 @@ pub fn build( (NaiveDate::from_ymd_res(2023, 2, 22)?, "يوم التأسيسي"), ], &mut map, - Country::SA, - "Saudi Arabia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2024, - vec![ + [ ( NaiveDate::from_ymd_res(2024, 4, 10)?, "(تقدير) عطلة عيد الفطر", @@ -1292,14 +1293,14 @@ pub fn build( (NaiveDate::from_ymd_res(2024, 2, 22)?, "يوم التأسيسي"), ], &mut map, - Country::SA, - "Saudi Arabia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2025, - vec![ + [ ( NaiveDate::from_ymd_res(2025, 3, 30)?, "(تقدير) عطلة عيد الفطر", @@ -1345,14 +1346,14 @@ pub fn build( ), ], &mut map, - Country::SA, - "Saudi Arabia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2026, - vec![ + [ ( NaiveDate::from_ymd_res(2026, 3, 20)?, "(تقدير) عطلة عيد الفطر", @@ -1398,14 +1399,14 @@ pub fn build( (NaiveDate::from_ymd_res(2026, 2, 22)?, "يوم التأسيسي"), ], &mut map, - Country::SA, - "Saudi Arabia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2027, - vec![ + [ ( NaiveDate::from_ymd_res(2027, 3, 9)?, "(تقدير) عطلة عيد الفطر", @@ -1447,14 +1448,14 @@ pub fn build( (NaiveDate::from_ymd_res(2027, 2, 22)?, "يوم التأسيسي"), ], &mut map, - Country::SA, - "Saudi Arabia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2028, - vec![ + [ ( NaiveDate::from_ymd_res(2028, 2, 26)?, "(تقدير) عطلة عيد الفطر", @@ -1504,14 +1505,14 @@ pub fn build( (NaiveDate::from_ymd_res(2028, 2, 22)?, "يوم التأسيسي"), ], &mut map, - Country::SA, - "Saudi Arabia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2029, - vec![ + [ ( NaiveDate::from_ymd_res(2029, 2, 14)?, "(تقدير) عطلة عيد الفطر", @@ -1553,14 +1554,14 @@ pub fn build( (NaiveDate::from_ymd_res(2029, 2, 22)?, "يوم التأسيسي"), ], &mut map, - Country::SA, - "Saudi Arabia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2030, - vec![ + [ ( NaiveDate::from_ymd_res(2030, 2, 4)?, "(تقدير) عطلة عيد الفطر", @@ -1606,8 +1607,8 @@ pub fn build( ), ], &mut map, - Country::SA, - "Saudi Arabia", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/se.rs b/src/data/se.rs index 2ae7d50..e77b1a5 100644 --- a/src/data/se.rs +++ b/src/data/se.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Sweden"; +const COUNTY_CODE: Country = Country::SE; + /// Generate holiday map for Sweden. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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"), @@ -88,14 +89,14 @@ pub fn build( (NaiveDate::from_ymd_res(2000, 12, 17)?, "Söndag"), ], &mut map, - Country::SE, - "Sweden", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -167,14 +168,14 @@ pub fn build( (NaiveDate::from_ymd_res(2001, 12, 30)?, "Söndag"), ], &mut map, - Country::SE, - "Sweden", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2002, - vec![ + [ (NaiveDate::from_ymd_res(2002, 1, 1)?, "Nyårsdagen"), ( NaiveDate::from_ymd_res(2002, 1, 6)?, @@ -248,14 +249,14 @@ pub fn build( (NaiveDate::from_ymd_res(2002, 12, 29)?, "Söndag"), ], &mut map, - Country::SE, - "Sweden", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -327,14 +328,14 @@ pub fn build( (NaiveDate::from_ymd_res(2003, 12, 28)?, "Söndag"), ], &mut map, - Country::SE, - "Sweden", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -408,14 +409,14 @@ pub fn build( (NaiveDate::from_ymd_res(2004, 12, 19)?, "Söndag"), ], &mut map, - Country::SE, - "Sweden", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -485,14 +486,14 @@ pub fn build( (NaiveDate::from_ymd_res(2005, 12, 18)?, "Söndag"), ], &mut map, - Country::SE, - "Sweden", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -562,14 +563,14 @@ pub fn build( (NaiveDate::from_ymd_res(2006, 12, 17)?, "Söndag"), ], &mut map, - Country::SE, - "Sweden", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -641,14 +642,14 @@ pub fn build( (NaiveDate::from_ymd_res(2007, 12, 30)?, "Söndag"), ], &mut map, - Country::SE, - "Sweden", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2008, - vec![ + [ (NaiveDate::from_ymd_res(2008, 1, 1)?, "Nyårsdagen"), ( NaiveDate::from_ymd_res(2008, 1, 6)?, @@ -721,14 +722,14 @@ pub fn build( (NaiveDate::from_ymd_res(2008, 12, 28)?, "Söndag"), ], &mut map, - Country::SE, - "Sweden", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -800,14 +801,14 @@ pub fn build( (NaiveDate::from_ymd_res(2009, 12, 27)?, "Söndag"), ], &mut map, - Country::SE, - "Sweden", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -883,14 +884,14 @@ pub fn build( (NaiveDate::from_ymd_res(2010, 12, 19)?, "Söndag"), ], &mut map, - Country::SE, - "Sweden", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -960,14 +961,14 @@ pub fn build( (NaiveDate::from_ymd_res(2011, 12, 18)?, "Söndag"), ], &mut map, - Country::SE, - "Sweden", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1039,14 +1040,14 @@ pub fn build( (NaiveDate::from_ymd_res(2012, 12, 30)?, "Söndag"), ], &mut map, - Country::SE, - "Sweden", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2013, - vec![ + [ (NaiveDate::from_ymd_res(2013, 1, 1)?, "Nyårsdagen"), ( NaiveDate::from_ymd_res(2013, 1, 6)?, @@ -1120,14 +1121,14 @@ pub fn build( (NaiveDate::from_ymd_res(2013, 12, 29)?, "Söndag"), ], &mut map, - Country::SE, - "Sweden", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1199,14 +1200,14 @@ pub fn build( (NaiveDate::from_ymd_res(2014, 12, 28)?, "Söndag"), ], &mut map, - Country::SE, - "Sweden", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1278,14 +1279,14 @@ pub fn build( (NaiveDate::from_ymd_res(2015, 12, 27)?, "Söndag"), ], &mut map, - Country::SE, - "Sweden", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1355,14 +1356,14 @@ pub fn build( (NaiveDate::from_ymd_res(2016, 12, 18)?, "Söndag"), ], &mut map, - Country::SE, - "Sweden", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1432,14 +1433,14 @@ pub fn build( (NaiveDate::from_ymd_res(2017, 12, 17)?, "Söndag"), ], &mut map, - Country::SE, - "Sweden", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1511,14 +1512,14 @@ pub fn build( (NaiveDate::from_ymd_res(2018, 12, 30)?, "Söndag"), ], &mut map, - Country::SE, - "Sweden", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2019, - vec![ + [ (NaiveDate::from_ymd_res(2019, 1, 1)?, "Nyårsdagen"), ( NaiveDate::from_ymd_res(2019, 1, 6)?, @@ -1592,14 +1593,14 @@ pub fn build( (NaiveDate::from_ymd_res(2019, 12, 29)?, "Söndag"), ], &mut map, - Country::SE, - "Sweden", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1671,14 +1672,14 @@ pub fn build( (NaiveDate::from_ymd_res(2020, 12, 27)?, "Söndag"), ], &mut map, - Country::SE, - "Sweden", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1754,14 +1755,14 @@ pub fn build( (NaiveDate::from_ymd_res(2021, 12, 19)?, "Söndag"), ], &mut map, - Country::SE, - "Sweden", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1831,14 +1832,14 @@ pub fn build( (NaiveDate::from_ymd_res(2022, 12, 18)?, "Söndag"), ], &mut map, - Country::SE, - "Sweden", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1908,14 +1909,14 @@ pub fn build( (NaiveDate::from_ymd_res(2023, 12, 17)?, "Söndag"), ], &mut map, - Country::SE, - "Sweden", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1987,14 +1988,14 @@ pub fn build( (NaiveDate::from_ymd_res(2024, 12, 29)?, "Söndag"), ], &mut map, - Country::SE, - "Sweden", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -2066,14 +2067,14 @@ pub fn build( (NaiveDate::from_ymd_res(2025, 12, 28)?, "Söndag"), ], &mut map, - Country::SE, - "Sweden", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -2145,14 +2146,14 @@ pub fn build( (NaiveDate::from_ymd_res(2026, 12, 27)?, "Söndag"), ], &mut map, - Country::SE, - "Sweden", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -2228,14 +2229,14 @@ pub fn build( (NaiveDate::from_ymd_res(2027, 12, 19)?, "Söndag"), ], &mut map, - Country::SE, - "Sweden", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -2306,14 +2307,14 @@ pub fn build( (NaiveDate::from_ymd_res(2028, 12, 17)?, "Söndag"), ], &mut map, - Country::SE, - "Sweden", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -2385,14 +2386,14 @@ pub fn build( (NaiveDate::from_ymd_res(2029, 12, 30)?, "Söndag"), ], &mut map, - Country::SE, - "Sweden", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2030, - vec![ + [ (NaiveDate::from_ymd_res(2030, 1, 1)?, "Nyårsdagen"), ( NaiveDate::from_ymd_res(2030, 1, 6)?, @@ -2466,8 +2467,8 @@ pub fn build( (NaiveDate::from_ymd_res(2030, 12, 29)?, "Söndag"), ], &mut map, - Country::SE, - "Sweden", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/sg.rs b/src/data/sg.rs index 283cac0..a27741b 100644 --- a/src/data/sg.rs +++ b/src/data/sg.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Singapore"; +const COUNTY_CODE: Country = Country::SG; + /// Generate holiday map for Singapore. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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)?, @@ -54,14 +55,14 @@ pub fn build( ), ], &mut map, - Country::SG, - "Singapore", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -80,14 +81,14 @@ pub fn build( (NaiveDate::from_ymd_res(2001, 11, 3)?, "Polling Day"), ], &mut map, - Country::SG, - "Singapore", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -109,14 +110,14 @@ pub fn build( ), ], &mut map, - Country::SG, - "Singapore", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -134,14 +135,14 @@ pub fn build( ), ], &mut map, - Country::SG, - "Singapore", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -163,14 +164,14 @@ pub fn build( ), ], &mut map, - Country::SG, - "Singapore", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -196,14 +197,14 @@ pub fn build( ), ], &mut map, - Country::SG, - "Singapore", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -223,14 +224,14 @@ pub fn build( (NaiveDate::from_ymd_res(2006, 5, 6)?, "Polling Day"), ], &mut map, - Country::SG, - "Singapore", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -248,14 +249,14 @@ pub fn build( ), ], &mut map, - Country::SG, - "Singapore", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -269,14 +270,14 @@ pub fn build( (NaiveDate::from_ymd_res(2008, 12, 25)?, "Christmas Day"), ], &mut map, - Country::SG, - "Singapore", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -302,14 +303,14 @@ pub fn build( ), ], &mut map, - Country::SG, - "Singapore", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -327,14 +328,14 @@ pub fn build( ), ], &mut map, - Country::SG, - "Singapore", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -361,14 +362,14 @@ pub fn build( (NaiveDate::from_ymd_res(2011, 5, 7)?, "Polling Day"), ], &mut map, - Country::SG, - "Singapore", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -390,14 +391,14 @@ pub fn build( ), ], &mut map, - Country::SG, - "Singapore", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -415,14 +416,14 @@ pub fn build( ), ], &mut map, - Country::SG, - "Singapore", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -440,14 +441,14 @@ pub fn build( ), ], &mut map, - Country::SG, - "Singapore", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -467,14 +468,14 @@ pub fn build( (NaiveDate::from_ymd_res(2015, 9, 11)?, "Polling Day"), ], &mut map, - Country::SG, - "Singapore", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -496,14 +497,14 @@ pub fn build( ), ], &mut map, - Country::SG, - "Singapore", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -529,14 +530,14 @@ pub fn build( ), ], &mut map, - Country::SG, - "Singapore", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -550,14 +551,14 @@ pub fn build( (NaiveDate::from_ymd_res(2018, 12, 25)?, "Christmas Day"), ], &mut map, - Country::SG, - "Singapore", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -583,14 +584,14 @@ pub fn build( ), ], &mut map, - Country::SG, - "Singapore", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -617,14 +618,14 @@ pub fn build( (NaiveDate::from_ymd_res(2020, 7, 10)?, "Polling Day"), ], &mut map, - Country::SG, - "Singapore", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -638,14 +639,14 @@ pub fn build( (NaiveDate::from_ymd_res(2021, 12, 25)?, "Christmas Day"), ], &mut map, - Country::SG, - "Singapore", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -675,14 +676,14 @@ pub fn build( ), ], &mut map, - Country::SG, - "Singapore", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -709,14 +710,14 @@ pub fn build( (NaiveDate::from_ymd_res(2023, 9, 1)?, "Polling Day"), ], &mut map, - Country::SG, - "Singapore", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -734,14 +735,14 @@ pub fn build( ), ], &mut map, - Country::SG, - "Singapore", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2025, - vec![ + [ (NaiveDate::from_ymd_res(2025, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2025, 1, 29)?, @@ -778,14 +779,14 @@ pub fn build( ), ], &mut map, - Country::SG, - "Singapore", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2026, - vec![ + [ (NaiveDate::from_ymd_res(2026, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2026, 2, 17)?, @@ -822,14 +823,14 @@ pub fn build( ), ], &mut map, - Country::SG, - "Singapore", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2027, - vec![ + [ (NaiveDate::from_ymd_res(2027, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2027, 2, 6)?, @@ -866,14 +867,14 @@ pub fn build( ), ], &mut map, - Country::SG, - "Singapore", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2028, - vec![ + [ (NaiveDate::from_ymd_res(2028, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2028, 1, 26)?, @@ -902,14 +903,14 @@ pub fn build( (NaiveDate::from_ymd_res(2028, 12, 25)?, "Christmas Day"), ], &mut map, - Country::SG, - "Singapore", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2029, - vec![ + [ (NaiveDate::from_ymd_res(2029, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2029, 2, 13)?, @@ -942,14 +943,14 @@ pub fn build( ), ], &mut map, - Country::SG, - "Singapore", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2030, - vec![ + [ (NaiveDate::from_ymd_res(2030, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2030, 2, 3)?, @@ -978,8 +979,8 @@ pub fn build( ), ], &mut map, - Country::SG, - "Singapore", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/si.rs b/src/data/si.rs index 278a205..b42b23c 100644 --- a/src/data/si.rs +++ b/src/data/si.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Slovenia"; +const COUNTY_CODE: Country = Country::SI; + /// Generate holiday map for Slovenia. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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"), @@ -48,14 +49,14 @@ pub fn build( ), ], &mut map, - Country::SI, - "Slovenia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -86,14 +87,14 @@ pub fn build( ), ], &mut map, - Country::SI, - "Slovenia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -124,14 +125,14 @@ pub fn build( ), ], &mut map, - Country::SI, - "Slovenia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -162,14 +163,14 @@ pub fn build( ), ], &mut map, - Country::SI, - "Slovenia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -200,14 +201,14 @@ pub fn build( ), ], &mut map, - Country::SI, - "Slovenia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -238,14 +239,14 @@ pub fn build( ), ], &mut map, - Country::SI, - "Slovenia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -276,14 +277,14 @@ pub fn build( ), ], &mut map, - Country::SI, - "Slovenia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -314,14 +315,14 @@ pub fn build( ), ], &mut map, - Country::SI, - "Slovenia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -352,14 +353,14 @@ pub fn build( ), ], &mut map, - Country::SI, - "Slovenia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -390,14 +391,14 @@ pub fn build( ), ], &mut map, - Country::SI, - "Slovenia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -428,14 +429,14 @@ pub fn build( ), ], &mut map, - Country::SI, - "Slovenia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -466,14 +467,14 @@ pub fn build( ), ], &mut map, - Country::SI, - "Slovenia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -504,14 +505,14 @@ pub fn build( ), ], &mut map, - Country::SI, - "Slovenia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2013, - vec![ + [ (NaiveDate::from_ymd_res(2013, 1, 1)?, "novo leto"), (NaiveDate::from_ymd_res(2013, 2, 8)?, "Prešernov dan"), ( @@ -541,14 +542,14 @@ pub fn build( ), ], &mut map, - Country::SI, - "Slovenia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2014, - vec![ + [ (NaiveDate::from_ymd_res(2014, 1, 1)?, "novo leto"), (NaiveDate::from_ymd_res(2014, 2, 8)?, "Prešernov dan"), ( @@ -578,14 +579,14 @@ pub fn build( ), ], &mut map, - Country::SI, - "Slovenia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2015, - vec![ + [ (NaiveDate::from_ymd_res(2015, 1, 1)?, "novo leto"), (NaiveDate::from_ymd_res(2015, 2, 8)?, "Prešernov dan"), ( @@ -615,14 +616,14 @@ pub fn build( ), ], &mut map, - Country::SI, - "Slovenia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2016, - vec![ + [ (NaiveDate::from_ymd_res(2016, 1, 1)?, "novo leto"), (NaiveDate::from_ymd_res(2016, 2, 8)?, "Prešernov dan"), ( @@ -652,14 +653,14 @@ pub fn build( ), ], &mut map, - Country::SI, - "Slovenia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -690,14 +691,14 @@ pub fn build( ), ], &mut map, - Country::SI, - "Slovenia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -728,14 +729,14 @@ pub fn build( ), ], &mut map, - Country::SI, - "Slovenia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -766,14 +767,14 @@ pub fn build( ), ], &mut map, - Country::SI, - "Slovenia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -804,14 +805,14 @@ pub fn build( ), ], &mut map, - Country::SI, - "Slovenia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -842,14 +843,14 @@ pub fn build( ), ], &mut map, - Country::SI, - "Slovenia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -880,14 +881,14 @@ pub fn build( ), ], &mut map, - Country::SI, - "Slovenia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -919,14 +920,14 @@ pub fn build( (NaiveDate::from_ymd_res(2023, 8, 14)?, "dan solidarnosti"), ], &mut map, - Country::SI, - "Slovenia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -957,14 +958,14 @@ pub fn build( ), ], &mut map, - Country::SI, - "Slovenia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -995,14 +996,14 @@ pub fn build( ), ], &mut map, - Country::SI, - "Slovenia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1033,14 +1034,14 @@ pub fn build( ), ], &mut map, - Country::SI, - "Slovenia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1071,14 +1072,14 @@ pub fn build( ), ], &mut map, - Country::SI, - "Slovenia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1109,14 +1110,14 @@ pub fn build( ), ], &mut map, - Country::SI, - "Slovenia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1147,14 +1148,14 @@ pub fn build( ), ], &mut map, - Country::SI, - "Slovenia", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1185,8 +1186,8 @@ pub fn build( ), ], &mut map, - Country::SI, - "Slovenia", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/sk.rs b/src/data/sk.rs index 46c037c..5e91d2e 100644 --- a/src/data/sk.rs +++ b/src/data/sk.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Slovakia"; +const COUNTY_CODE: Country = Country::SK; + /// Generate holiday map for Slovakia. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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", @@ -64,14 +65,14 @@ pub fn build( ), ], &mut map, - Country::SK, - "Slovakia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2001, - vec![ + [ ( NaiveDate::from_ymd_res(2001, 1, 1)?, "Deň vzniku Slovenskej republiky", @@ -122,14 +123,14 @@ pub fn build( ), ], &mut map, - Country::SK, - "Slovakia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2002, - vec![ + [ ( NaiveDate::from_ymd_res(2002, 1, 1)?, "Deň vzniku Slovenskej republiky", @@ -180,14 +181,14 @@ pub fn build( ), ], &mut map, - Country::SK, - "Slovakia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2003, - vec![ + [ ( NaiveDate::from_ymd_res(2003, 1, 1)?, "Deň vzniku Slovenskej republiky", @@ -238,14 +239,14 @@ pub fn build( ), ], &mut map, - Country::SK, - "Slovakia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2004, - vec![ + [ ( NaiveDate::from_ymd_res(2004, 1, 1)?, "Deň vzniku Slovenskej republiky", @@ -296,14 +297,14 @@ pub fn build( ), ], &mut map, - Country::SK, - "Slovakia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2005, - vec![ + [ ( NaiveDate::from_ymd_res(2005, 1, 1)?, "Deň vzniku Slovenskej republiky", @@ -354,14 +355,14 @@ pub fn build( ), ], &mut map, - Country::SK, - "Slovakia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2006, - vec![ + [ ( NaiveDate::from_ymd_res(2006, 1, 1)?, "Deň vzniku Slovenskej republiky", @@ -412,14 +413,14 @@ pub fn build( ), ], &mut map, - Country::SK, - "Slovakia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2007, - vec![ + [ ( NaiveDate::from_ymd_res(2007, 1, 1)?, "Deň vzniku Slovenskej republiky", @@ -470,14 +471,14 @@ pub fn build( ), ], &mut map, - Country::SK, - "Slovakia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2008, - vec![ + [ ( NaiveDate::from_ymd_res(2008, 1, 1)?, "Deň vzniku Slovenskej republiky", @@ -528,14 +529,14 @@ pub fn build( ), ], &mut map, - Country::SK, - "Slovakia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2009, - vec![ + [ ( NaiveDate::from_ymd_res(2009, 1, 1)?, "Deň vzniku Slovenskej republiky", @@ -586,14 +587,14 @@ pub fn build( ), ], &mut map, - Country::SK, - "Slovakia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2010, - vec![ + [ ( NaiveDate::from_ymd_res(2010, 1, 1)?, "Deň vzniku Slovenskej republiky", @@ -644,14 +645,14 @@ pub fn build( ), ], &mut map, - Country::SK, - "Slovakia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2011, - vec![ + [ ( NaiveDate::from_ymd_res(2011, 1, 1)?, "Deň vzniku Slovenskej republiky", @@ -702,14 +703,14 @@ pub fn build( ), ], &mut map, - Country::SK, - "Slovakia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2012, - vec![ + [ ( NaiveDate::from_ymd_res(2012, 1, 1)?, "Deň vzniku Slovenskej republiky", @@ -760,14 +761,14 @@ pub fn build( ), ], &mut map, - Country::SK, - "Slovakia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2013, - vec![ + [ ( NaiveDate::from_ymd_res(2013, 1, 1)?, "Deň vzniku Slovenskej republiky", @@ -818,14 +819,14 @@ pub fn build( ), ], &mut map, - Country::SK, - "Slovakia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2014, - vec![ + [ ( NaiveDate::from_ymd_res(2014, 1, 1)?, "Deň vzniku Slovenskej republiky", @@ -876,14 +877,14 @@ pub fn build( ), ], &mut map, - Country::SK, - "Slovakia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2015, - vec![ + [ ( NaiveDate::from_ymd_res(2015, 1, 1)?, "Deň vzniku Slovenskej republiky", @@ -934,14 +935,14 @@ pub fn build( ), ], &mut map, - Country::SK, - "Slovakia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2016, - vec![ + [ ( NaiveDate::from_ymd_res(2016, 1, 1)?, "Deň vzniku Slovenskej republiky", @@ -992,14 +993,14 @@ pub fn build( ), ], &mut map, - Country::SK, - "Slovakia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2017, - vec![ + [ ( NaiveDate::from_ymd_res(2017, 1, 1)?, "Deň vzniku Slovenskej republiky", @@ -1050,14 +1051,14 @@ pub fn build( ), ], &mut map, - Country::SK, - "Slovakia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2018, - vec![ + [ ( NaiveDate::from_ymd_res(2018, 1, 1)?, "Deň vzniku Slovenskej republiky", @@ -1112,14 +1113,14 @@ pub fn build( ), ], &mut map, - Country::SK, - "Slovakia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2019, - vec![ + [ ( NaiveDate::from_ymd_res(2019, 1, 1)?, "Deň vzniku Slovenskej republiky", @@ -1170,14 +1171,14 @@ pub fn build( ), ], &mut map, - Country::SK, - "Slovakia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2020, - vec![ + [ ( NaiveDate::from_ymd_res(2020, 1, 1)?, "Deň vzniku Slovenskej republiky", @@ -1228,14 +1229,14 @@ pub fn build( ), ], &mut map, - Country::SK, - "Slovakia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2021, - vec![ + [ ( NaiveDate::from_ymd_res(2021, 1, 1)?, "Deň vzniku Slovenskej republiky", @@ -1286,14 +1287,14 @@ pub fn build( ), ], &mut map, - Country::SK, - "Slovakia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2022, - vec![ + [ ( NaiveDate::from_ymd_res(2022, 1, 1)?, "Deň vzniku Slovenskej republiky", @@ -1344,14 +1345,14 @@ pub fn build( ), ], &mut map, - Country::SK, - "Slovakia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2023, - vec![ + [ ( NaiveDate::from_ymd_res(2023, 1, 1)?, "Deň vzniku Slovenskej republiky", @@ -1402,14 +1403,14 @@ pub fn build( ), ], &mut map, - Country::SK, - "Slovakia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2024, - vec![ + [ ( NaiveDate::from_ymd_res(2024, 1, 1)?, "Deň vzniku Slovenskej republiky", @@ -1460,14 +1461,14 @@ pub fn build( ), ], &mut map, - Country::SK, - "Slovakia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2025, - vec![ + [ ( NaiveDate::from_ymd_res(2025, 1, 1)?, "Deň vzniku Slovenskej republiky", @@ -1518,14 +1519,14 @@ pub fn build( ), ], &mut map, - Country::SK, - "Slovakia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2026, - vec![ + [ ( NaiveDate::from_ymd_res(2026, 1, 1)?, "Deň vzniku Slovenskej republiky", @@ -1576,14 +1577,14 @@ pub fn build( ), ], &mut map, - Country::SK, - "Slovakia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2027, - vec![ + [ ( NaiveDate::from_ymd_res(2027, 1, 1)?, "Deň vzniku Slovenskej republiky", @@ -1634,14 +1635,14 @@ pub fn build( ), ], &mut map, - Country::SK, - "Slovakia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2028, - vec![ + [ ( NaiveDate::from_ymd_res(2028, 1, 1)?, "Deň vzniku Slovenskej republiky", @@ -1692,14 +1693,14 @@ pub fn build( ), ], &mut map, - Country::SK, - "Slovakia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2029, - vec![ + [ ( NaiveDate::from_ymd_res(2029, 1, 1)?, "Deň vzniku Slovenskej republiky", @@ -1750,14 +1751,14 @@ pub fn build( ), ], &mut map, - Country::SK, - "Slovakia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2030, - vec![ + [ ( NaiveDate::from_ymd_res(2030, 1, 1)?, "Deň vzniku Slovenskej republiky", @@ -1808,8 +1809,8 @@ pub fn build( ), ], &mut map, - Country::SK, - "Slovakia", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/sz.rs b/src/data/sz.rs index 13849f6..83dfc14 100644 --- a/src/data/sz.rs +++ b/src/data/sz.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Swaziland"; +const COUNTY_CODE: Country = Country::SZ; + /// Generate holiday map for Swaziland. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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"), @@ -35,14 +36,14 @@ pub fn build( (NaiveDate::from_ymd_res(2000, 1, 3)?, "Y2K changeover"), ], &mut map, - Country::SZ, - "Swaziland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -59,14 +60,14 @@ pub fn build( (NaiveDate::from_ymd_res(2001, 12, 26)?, "Boxing Day"), ], &mut map, - Country::SZ, - "Swaziland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -83,14 +84,14 @@ pub fn build( (NaiveDate::from_ymd_res(2002, 12, 26)?, "Boxing Day"), ], &mut map, - Country::SZ, - "Swaziland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -107,14 +108,14 @@ pub fn build( (NaiveDate::from_ymd_res(2003, 12, 26)?, "Boxing Day"), ], &mut map, - Country::SZ, - "Swaziland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -131,14 +132,14 @@ pub fn build( (NaiveDate::from_ymd_res(2004, 12, 26)?, "Boxing Day"), ], &mut map, - Country::SZ, - "Swaziland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -155,14 +156,14 @@ pub fn build( (NaiveDate::from_ymd_res(2005, 12, 26)?, "Boxing Day"), ], &mut map, - Country::SZ, - "Swaziland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -179,14 +180,14 @@ pub fn build( (NaiveDate::from_ymd_res(2006, 12, 26)?, "Boxing Day"), ], &mut map, - Country::SZ, - "Swaziland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -203,14 +204,14 @@ pub fn build( (NaiveDate::from_ymd_res(2007, 12, 26)?, "Boxing Day"), ], &mut map, - Country::SZ, - "Swaziland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -229,14 +230,14 @@ pub fn build( (NaiveDate::from_ymd_res(2008, 12, 26)?, "Boxing Day"), ], &mut map, - Country::SZ, - "Swaziland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -253,14 +254,14 @@ pub fn build( (NaiveDate::from_ymd_res(2009, 12, 26)?, "Boxing Day"), ], &mut map, - Country::SZ, - "Swaziland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -277,14 +278,14 @@ pub fn build( (NaiveDate::from_ymd_res(2010, 12, 26)?, "Boxing Day"), ], &mut map, - Country::SZ, - "Swaziland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -303,14 +304,14 @@ pub fn build( (NaiveDate::from_ymd_res(2011, 12, 26)?, "Boxing Day"), ], &mut map, - Country::SZ, - "Swaziland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -327,14 +328,14 @@ pub fn build( (NaiveDate::from_ymd_res(2012, 12, 26)?, "Boxing Day"), ], &mut map, - Country::SZ, - "Swaziland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -351,14 +352,14 @@ pub fn build( (NaiveDate::from_ymd_res(2013, 12, 26)?, "Boxing Day"), ], &mut map, - Country::SZ, - "Swaziland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -375,14 +376,14 @@ pub fn build( (NaiveDate::from_ymd_res(2014, 12, 26)?, "Boxing Day"), ], &mut map, - Country::SZ, - "Swaziland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -399,14 +400,14 @@ pub fn build( (NaiveDate::from_ymd_res(2015, 12, 26)?, "Boxing Day"), ], &mut map, - Country::SZ, - "Swaziland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -423,14 +424,14 @@ pub fn build( (NaiveDate::from_ymd_res(2016, 12, 26)?, "Boxing Day"), ], &mut map, - Country::SZ, - "Swaziland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -447,14 +448,14 @@ pub fn build( (NaiveDate::from_ymd_res(2017, 12, 26)?, "Boxing Day"), ], &mut map, - Country::SZ, - "Swaziland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -471,14 +472,14 @@ pub fn build( (NaiveDate::from_ymd_res(2018, 12, 26)?, "Boxing Day"), ], &mut map, - Country::SZ, - "Swaziland", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2019, - vec![ + [ (NaiveDate::from_ymd_res(2019, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2019, 4, 19)?, @@ -497,14 +498,14 @@ pub fn build( (NaiveDate::from_ymd_res(2019, 12, 26)?, "Boxing Day"), ], &mut map, - Country::SZ, - "Swaziland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -521,14 +522,14 @@ pub fn build( (NaiveDate::from_ymd_res(2020, 12, 26)?, "Boxing Day"), ], &mut map, - Country::SZ, - "Swaziland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -553,14 +554,14 @@ pub fn build( ), ], &mut map, - Country::SZ, - "Swaziland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -585,14 +586,14 @@ pub fn build( (NaiveDate::from_ymd_res(2022, 12, 26)?, "Boxing Day"), ], &mut map, - Country::SZ, - "Swaziland", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2023, - vec![ + [ (NaiveDate::from_ymd_res(2023, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2023, 1, 2)?, @@ -613,14 +614,14 @@ pub fn build( (NaiveDate::from_ymd_res(2023, 12, 26)?, "Boxing Day"), ], &mut map, - Country::SZ, - "Swaziland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -637,14 +638,14 @@ pub fn build( (NaiveDate::from_ymd_res(2024, 12, 26)?, "Boxing Day"), ], &mut map, - Country::SZ, - "Swaziland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -661,14 +662,14 @@ pub fn build( (NaiveDate::from_ymd_res(2025, 12, 26)?, "Boxing Day"), ], &mut map, - Country::SZ, - "Swaziland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -693,14 +694,14 @@ pub fn build( (NaiveDate::from_ymd_res(2026, 12, 26)?, "Boxing Day"), ], &mut map, - Country::SZ, - "Swaziland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -725,14 +726,14 @@ pub fn build( ), ], &mut map, - Country::SZ, - "Swaziland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -749,14 +750,14 @@ pub fn build( (NaiveDate::from_ymd_res(2028, 12, 26)?, "Boxing Day"), ], &mut map, - Country::SZ, - "Swaziland", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -777,14 +778,14 @@ pub fn build( (NaiveDate::from_ymd_res(2029, 12, 26)?, "Boxing Day"), ], &mut map, - Country::SZ, - "Swaziland", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2030, - vec![ + [ (NaiveDate::from_ymd_res(2030, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2030, 4, 19)?, @@ -803,8 +804,8 @@ pub fn build( (NaiveDate::from_ymd_res(2030, 12, 26)?, "Boxing Day"), ], &mut map, - Country::SZ, - "Swaziland", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/tn.rs b/src/data/tn.rs index 2f6024d..27e06d8 100644 --- a/src/data/tn.rs +++ b/src/data/tn.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Tunisia"; +const COUNTY_CODE: Country = Country::TN; + /// Generate holiday map for Tunisia. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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)?, "عيد الإستقلال"), @@ -64,14 +65,14 @@ pub fn build( ), ], &mut map, - Country::TN, - "Tunisia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "عيد الإستقلال"), @@ -109,14 +110,14 @@ pub fn build( ), ], &mut map, - Country::TN, - "Tunisia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "عيد الإستقلال"), @@ -154,14 +155,14 @@ pub fn build( ), ], &mut map, - Country::TN, - "Tunisia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "عيد الإستقلال"), @@ -199,14 +200,14 @@ pub fn build( ), ], &mut map, - Country::TN, - "Tunisia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "عيد الإستقلال"), @@ -243,14 +244,14 @@ pub fn build( ), ], &mut map, - Country::TN, - "Tunisia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "عيد الإستقلال"), @@ -288,14 +289,14 @@ pub fn build( ), ], &mut map, - Country::TN, - "Tunisia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "عيد الإستقلال"), @@ -335,14 +336,14 @@ pub fn build( ), ], &mut map, - Country::TN, - "Tunisia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2007, - vec![ + [ ( NaiveDate::from_ymd_res(2007, 1, 1)?, "(تقدير) عطلة عيد الأضحى; رأس السنة الميلادية", @@ -386,14 +387,14 @@ pub fn build( ), ], &mut map, - Country::TN, - "Tunisia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2008, - vec![ + [ (NaiveDate::from_ymd_res(2008, 1, 1)?, "رأس السنة الميلادية"), (NaiveDate::from_ymd_res(2008, 1, 14)?, "عيد الثورة والشباب"), ( @@ -434,14 +435,14 @@ pub fn build( ), ], &mut map, - Country::TN, - "Tunisia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "عيد الإستقلال"), @@ -479,14 +480,14 @@ pub fn build( ), ], &mut map, - Country::TN, - "Tunisia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "عيد الإستقلال"), @@ -524,14 +525,14 @@ pub fn build( ), ], &mut map, - Country::TN, - "Tunisia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "عيد الإستقلال"), @@ -569,14 +570,14 @@ pub fn build( ), ], &mut map, - Country::TN, - "Tunisia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "عيد الإستقلال"), @@ -614,14 +615,14 @@ pub fn build( ), ], &mut map, - Country::TN, - "Tunisia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "عيد الإستقلال"), @@ -661,14 +662,14 @@ pub fn build( ), ], &mut map, - Country::TN, - "Tunisia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "عيد الإستقلال"), @@ -706,14 +707,14 @@ pub fn build( ), ], &mut map, - Country::TN, - "Tunisia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "عيد الإستقلال"), @@ -755,14 +756,14 @@ pub fn build( ), ], &mut map, - Country::TN, - "Tunisia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "عيد الإستقلال"), @@ -800,14 +801,14 @@ pub fn build( ), ], &mut map, - Country::TN, - "Tunisia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "عيد الإستقلال"), @@ -845,14 +846,14 @@ pub fn build( ), ], &mut map, - Country::TN, - "Tunisia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "عيد الإستقلال"), @@ -890,14 +891,14 @@ pub fn build( ), ], &mut map, - Country::TN, - "Tunisia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "عيد الإستقلال"), @@ -934,14 +935,14 @@ pub fn build( ), ], &mut map, - Country::TN, - "Tunisia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "عيد الإستقلال"), @@ -979,14 +980,14 @@ pub fn build( ), ], &mut map, - Country::TN, - "Tunisia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "عيد الإستقلال"), @@ -1024,14 +1025,14 @@ pub fn build( ), ], &mut map, - Country::TN, - "Tunisia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "عيد الإستقلال"), @@ -1069,14 +1070,14 @@ pub fn build( ), ], &mut map, - Country::TN, - "Tunisia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "عيد الإستقلال"), @@ -1114,14 +1115,14 @@ pub fn build( ), ], &mut map, - Country::TN, - "Tunisia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "عيد الإستقلال"), @@ -1159,14 +1160,14 @@ pub fn build( ), ], &mut map, - Country::TN, - "Tunisia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "عيد الإستقلال"), @@ -1204,14 +1205,14 @@ pub fn build( ), ], &mut map, - Country::TN, - "Tunisia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2026, - vec![ + [ (NaiveDate::from_ymd_res(2026, 1, 1)?, "رأس السنة الميلادية"), (NaiveDate::from_ymd_res(2026, 1, 14)?, "عيد الثورة والشباب"), ( @@ -1251,14 +1252,14 @@ pub fn build( ), ], &mut map, - Country::TN, - "Tunisia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "عيد الإستقلال"), @@ -1296,14 +1297,14 @@ pub fn build( ), ], &mut map, - Country::TN, - "Tunisia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "عيد الإستقلال"), @@ -1341,14 +1342,14 @@ pub fn build( ), ], &mut map, - Country::TN, - "Tunisia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "عيد الإستقلال"), @@ -1386,14 +1387,14 @@ pub fn build( ), ], &mut map, - Country::TN, - "Tunisia", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "عيد الإستقلال"), @@ -1431,8 +1432,8 @@ pub fn build( ), ], &mut map, - Country::TN, - "Tunisia", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/tr.rs b/src/data/tr.rs index 136c67c..b1890f5 100644 --- a/src/data/tr.rs +++ b/src/data/tr.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Turkey"; +const COUNTY_CODE: Country = Country::TR; + /// Generate holiday map for Turkey. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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)?, @@ -41,14 +42,14 @@ pub fn build( (NaiveDate::from_ymd_res(2000, 3, 19)?, "Kurban Bayramı"), ], &mut map, - Country::TR, - "Turkey", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2001, - vec![ + [ (NaiveDate::from_ymd_res(2001, 1, 1)?, "Yılbaşı"), ( NaiveDate::from_ymd_res(2001, 4, 23)?, @@ -69,14 +70,14 @@ pub fn build( (NaiveDate::from_ymd_res(2001, 3, 8)?, "Kurban Bayramı"), ], &mut map, - Country::TR, - "Turkey", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2002, - vec![ + [ (NaiveDate::from_ymd_res(2002, 1, 1)?, "Yılbaşı"), ( NaiveDate::from_ymd_res(2002, 4, 23)?, @@ -97,14 +98,14 @@ pub fn build( (NaiveDate::from_ymd_res(2002, 2, 25)?, "Kurban Bayramı"), ], &mut map, - Country::TR, - "Turkey", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2003, - vec![ + [ (NaiveDate::from_ymd_res(2003, 1, 1)?, "Yılbaşı"), ( NaiveDate::from_ymd_res(2003, 4, 23)?, @@ -125,14 +126,14 @@ pub fn build( (NaiveDate::from_ymd_res(2003, 2, 14)?, "Kurban Bayramı"), ], &mut map, - Country::TR, - "Turkey", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2004, - vec![ + [ (NaiveDate::from_ymd_res(2004, 1, 1)?, "Yılbaşı"), ( NaiveDate::from_ymd_res(2004, 4, 23)?, @@ -153,14 +154,14 @@ pub fn build( (NaiveDate::from_ymd_res(2004, 2, 4)?, "Kurban Bayramı"), ], &mut map, - Country::TR, - "Turkey", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2005, - vec![ + [ (NaiveDate::from_ymd_res(2005, 1, 1)?, "Yılbaşı"), ( NaiveDate::from_ymd_res(2005, 4, 23)?, @@ -181,14 +182,14 @@ pub fn build( (NaiveDate::from_ymd_res(2005, 1, 23)?, "Kurban Bayramı"), ], &mut map, - Country::TR, - "Turkey", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2006, - vec![ + [ (NaiveDate::from_ymd_res(2006, 1, 1)?, "Yılbaşı"), ( NaiveDate::from_ymd_res(2006, 4, 23)?, @@ -210,14 +211,14 @@ pub fn build( (NaiveDate::from_ymd_res(2006, 1, 13)?, "Kurban Bayramı"), ], &mut map, - Country::TR, - "Turkey", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2007, - vec![ + [ ( NaiveDate::from_ymd_res(2007, 1, 1)?, "Kurban Bayramı; Yılbaşı", @@ -243,14 +244,14 @@ pub fn build( (NaiveDate::from_ymd_res(2007, 12, 23)?, "Kurban Bayramı"), ], &mut map, - Country::TR, - "Turkey", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2008, - vec![ + [ (NaiveDate::from_ymd_res(2008, 1, 1)?, "Yılbaşı"), ( NaiveDate::from_ymd_res(2008, 4, 23)?, @@ -271,14 +272,14 @@ pub fn build( (NaiveDate::from_ymd_res(2008, 12, 11)?, "Kurban Bayramı"), ], &mut map, - Country::TR, - "Turkey", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2009, - vec![ + [ (NaiveDate::from_ymd_res(2009, 1, 1)?, "Yılbaşı"), ( NaiveDate::from_ymd_res(2009, 4, 23)?, @@ -303,14 +304,14 @@ pub fn build( (NaiveDate::from_ymd_res(2009, 11, 30)?, "Kurban Bayramı"), ], &mut map, - Country::TR, - "Turkey", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2010, - vec![ + [ (NaiveDate::from_ymd_res(2010, 1, 1)?, "Yılbaşı"), ( NaiveDate::from_ymd_res(2010, 4, 23)?, @@ -335,14 +336,14 @@ pub fn build( (NaiveDate::from_ymd_res(2010, 11, 19)?, "Kurban Bayramı"), ], &mut map, - Country::TR, - "Turkey", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2011, - vec![ + [ (NaiveDate::from_ymd_res(2011, 1, 1)?, "Yılbaşı"), ( NaiveDate::from_ymd_res(2011, 4, 23)?, @@ -369,14 +370,14 @@ pub fn build( (NaiveDate::from_ymd_res(2011, 11, 9)?, "Kurban Bayramı"), ], &mut map, - Country::TR, - "Turkey", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2012, - vec![ + [ (NaiveDate::from_ymd_res(2012, 1, 1)?, "Yılbaşı"), ( NaiveDate::from_ymd_res(2012, 4, 23)?, @@ -401,14 +402,14 @@ pub fn build( (NaiveDate::from_ymd_res(2012, 10, 28)?, "Kurban Bayramı"), ], &mut map, - Country::TR, - "Turkey", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2013, - vec![ + [ (NaiveDate::from_ymd_res(2013, 1, 1)?, "Yılbaşı"), ( NaiveDate::from_ymd_res(2013, 4, 23)?, @@ -433,14 +434,14 @@ pub fn build( (NaiveDate::from_ymd_res(2013, 10, 18)?, "Kurban Bayramı"), ], &mut map, - Country::TR, - "Turkey", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2014, - vec![ + [ (NaiveDate::from_ymd_res(2014, 1, 1)?, "Yılbaşı"), ( NaiveDate::from_ymd_res(2014, 4, 23)?, @@ -465,14 +466,14 @@ pub fn build( (NaiveDate::from_ymd_res(2014, 10, 7)?, "Kurban Bayramı"), ], &mut map, - Country::TR, - "Turkey", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2015, - vec![ + [ (NaiveDate::from_ymd_res(2015, 1, 1)?, "Yılbaşı"), ( NaiveDate::from_ymd_res(2015, 4, 23)?, @@ -497,14 +498,14 @@ pub fn build( (NaiveDate::from_ymd_res(2015, 9, 27)?, "Kurban Bayramı"), ], &mut map, - Country::TR, - "Turkey", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2016, - vec![ + [ (NaiveDate::from_ymd_res(2016, 1, 1)?, "Yılbaşı"), ( NaiveDate::from_ymd_res(2016, 4, 23)?, @@ -529,14 +530,14 @@ pub fn build( (NaiveDate::from_ymd_res(2016, 9, 15)?, "Kurban Bayramı"), ], &mut map, - Country::TR, - "Turkey", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2017, - vec![ + [ (NaiveDate::from_ymd_res(2017, 1, 1)?, "Yılbaşı"), ( NaiveDate::from_ymd_res(2017, 4, 23)?, @@ -565,14 +566,14 @@ pub fn build( (NaiveDate::from_ymd_res(2017, 9, 4)?, "Kurban Bayramı"), ], &mut map, - Country::TR, - "Turkey", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2018, - vec![ + [ (NaiveDate::from_ymd_res(2018, 1, 1)?, "Yılbaşı"), ( NaiveDate::from_ymd_res(2018, 4, 23)?, @@ -601,14 +602,14 @@ pub fn build( (NaiveDate::from_ymd_res(2018, 8, 24)?, "Kurban Bayramı"), ], &mut map, - Country::TR, - "Turkey", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2019, - vec![ + [ (NaiveDate::from_ymd_res(2019, 1, 1)?, "Yılbaşı"), ( NaiveDate::from_ymd_res(2019, 4, 23)?, @@ -637,14 +638,14 @@ pub fn build( (NaiveDate::from_ymd_res(2019, 8, 14)?, "Kurban Bayramı"), ], &mut map, - Country::TR, - "Turkey", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2020, - vec![ + [ (NaiveDate::from_ymd_res(2020, 1, 1)?, "Yılbaşı"), ( NaiveDate::from_ymd_res(2020, 4, 23)?, @@ -673,14 +674,14 @@ pub fn build( (NaiveDate::from_ymd_res(2020, 8, 3)?, "Kurban Bayramı"), ], &mut map, - Country::TR, - "Turkey", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2021, - vec![ + [ (NaiveDate::from_ymd_res(2021, 1, 1)?, "Yılbaşı"), ( NaiveDate::from_ymd_res(2021, 4, 23)?, @@ -709,14 +710,14 @@ pub fn build( (NaiveDate::from_ymd_res(2021, 7, 23)?, "Kurban Bayramı"), ], &mut map, - Country::TR, - "Turkey", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2022, - vec![ + [ (NaiveDate::from_ymd_res(2022, 1, 1)?, "Yılbaşı"), ( NaiveDate::from_ymd_res(2022, 4, 23)?, @@ -745,14 +746,14 @@ pub fn build( (NaiveDate::from_ymd_res(2022, 7, 12)?, "Kurban Bayramı"), ], &mut map, - Country::TR, - "Turkey", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2023, - vec![ + [ (NaiveDate::from_ymd_res(2023, 1, 1)?, "Yılbaşı"), ( NaiveDate::from_ymd_res(2023, 4, 23)?, @@ -780,14 +781,14 @@ pub fn build( (NaiveDate::from_ymd_res(2023, 7, 1)?, "Kurban Bayramı"), ], &mut map, - Country::TR, - "Turkey", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2024, - vec![ + [ (NaiveDate::from_ymd_res(2024, 1, 1)?, "Yılbaşı"), ( NaiveDate::from_ymd_res(2024, 4, 23)?, @@ -816,14 +817,14 @@ pub fn build( (NaiveDate::from_ymd_res(2024, 6, 19)?, "Kurban Bayramı"), ], &mut map, - Country::TR, - "Turkey", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2025, - vec![ + [ (NaiveDate::from_ymd_res(2025, 1, 1)?, "Yılbaşı"), ( NaiveDate::from_ymd_res(2025, 4, 23)?, @@ -852,14 +853,14 @@ pub fn build( (NaiveDate::from_ymd_res(2025, 6, 9)?, "Kurban Bayramı"), ], &mut map, - Country::TR, - "Turkey", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2026, - vec![ + [ (NaiveDate::from_ymd_res(2026, 1, 1)?, "Yılbaşı"), ( NaiveDate::from_ymd_res(2026, 4, 23)?, @@ -888,14 +889,14 @@ pub fn build( (NaiveDate::from_ymd_res(2026, 5, 30)?, "Kurban Bayramı"), ], &mut map, - Country::TR, - "Turkey", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2027, - vec![ + [ (NaiveDate::from_ymd_res(2027, 1, 1)?, "Yılbaşı"), ( NaiveDate::from_ymd_res(2027, 4, 23)?, @@ -923,14 +924,14 @@ pub fn build( (NaiveDate::from_ymd_res(2027, 5, 18)?, "Kurban Bayramı"), ], &mut map, - Country::TR, - "Turkey", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2028, - vec![ + [ (NaiveDate::from_ymd_res(2028, 1, 1)?, "Yılbaşı"), ( NaiveDate::from_ymd_res(2028, 4, 23)?, @@ -959,14 +960,14 @@ pub fn build( (NaiveDate::from_ymd_res(2028, 5, 8)?, "Kurban Bayramı"), ], &mut map, - Country::TR, - "Turkey", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2029, - vec![ + [ (NaiveDate::from_ymd_res(2029, 1, 1)?, "Yılbaşı"), ( NaiveDate::from_ymd_res(2029, 4, 23)?, @@ -995,14 +996,14 @@ pub fn build( (NaiveDate::from_ymd_res(2029, 4, 27)?, "Kurban Bayramı"), ], &mut map, - Country::TR, - "Turkey", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2030, - vec![ + [ (NaiveDate::from_ymd_res(2030, 1, 1)?, "Yılbaşı"), ( NaiveDate::from_ymd_res(2030, 4, 23)?, @@ -1031,8 +1032,8 @@ pub fn build( (NaiveDate::from_ymd_res(2030, 4, 16)?, "Kurban Bayramı"), ], &mut map, - Country::TR, - "Turkey", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/tw.rs b/src/data/tw.rs index cb2c940..96f42e7 100644 --- a/src/data/tw.rs +++ b/src/data/tw.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Taiwan"; +const COUNTY_CODE: Country = Country::TW; + /// Generate holiday map for Taiwan. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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)?, "春節"), @@ -30,14 +31,14 @@ pub fn build( (NaiveDate::from_ymd_res(2000, 10, 10)?, "中華民國國慶日"), ], &mut map, - Country::TW, - "Taiwan", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "春節"), @@ -50,14 +51,14 @@ pub fn build( (NaiveDate::from_ymd_res(2001, 10, 10)?, "中華民國國慶日"), ], &mut map, - Country::TW, - "Taiwan", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "春節"), @@ -70,14 +71,14 @@ pub fn build( (NaiveDate::from_ymd_res(2002, 10, 10)?, "中華民國國慶日"), ], &mut map, - Country::TW, - "Taiwan", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "春節"), @@ -90,14 +91,14 @@ pub fn build( (NaiveDate::from_ymd_res(2003, 10, 10)?, "中華民國國慶日"), ], &mut map, - Country::TW, - "Taiwan", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "春節"), @@ -110,14 +111,14 @@ pub fn build( (NaiveDate::from_ymd_res(2004, 10, 10)?, "中華民國國慶日"), ], &mut map, - Country::TW, - "Taiwan", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "春節"), @@ -130,14 +131,14 @@ pub fn build( (NaiveDate::from_ymd_res(2005, 10, 10)?, "中華民國國慶日"), ], &mut map, - Country::TW, - "Taiwan", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "春節"), @@ -150,14 +151,14 @@ pub fn build( (NaiveDate::from_ymd_res(2006, 10, 10)?, "中華民國國慶日"), ], &mut map, - Country::TW, - "Taiwan", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "春節"), @@ -170,14 +171,14 @@ pub fn build( (NaiveDate::from_ymd_res(2007, 10, 10)?, "中華民國國慶日"), ], &mut map, - Country::TW, - "Taiwan", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "春節"), @@ -190,14 +191,14 @@ pub fn build( (NaiveDate::from_ymd_res(2008, 10, 10)?, "中華民國國慶日"), ], &mut map, - Country::TW, - "Taiwan", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "春節"), @@ -210,14 +211,14 @@ pub fn build( (NaiveDate::from_ymd_res(2009, 10, 10)?, "中華民國國慶日"), ], &mut map, - Country::TW, - "Taiwan", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "春節"), @@ -236,14 +237,14 @@ pub fn build( ), ], &mut map, - Country::TW, - "Taiwan", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "春節"), @@ -258,14 +259,14 @@ pub fn build( (NaiveDate::from_ymd_res(2011, 2, 7)?, "春節(慶祝)"), ], &mut map, - Country::TW, - "Taiwan", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "春節"), @@ -291,14 +292,14 @@ pub fn build( ), ], &mut map, - Country::TW, - "Taiwan", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "春節"), @@ -322,14 +323,14 @@ pub fn build( (NaiveDate::from_ymd_res(2013, 4, 5)?, "兒童節(慶祝)"), ], &mut map, - Country::TW, - "Taiwan", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "春節"), @@ -345,14 +346,14 @@ pub fn build( (NaiveDate::from_ymd_res(2014, 2, 4)?, "春節(慶祝)"), ], &mut map, - Country::TW, - "Taiwan", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "春節"), @@ -380,14 +381,14 @@ pub fn build( ), ], &mut map, - Country::TW, - "Taiwan", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "春節"), @@ -415,14 +416,14 @@ pub fn build( (NaiveDate::from_ymd_res(2016, 4, 5)?, "兒童節(慶祝)"), ], &mut map, - Country::TW, - "Taiwan", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "春節"), @@ -454,14 +455,14 @@ pub fn build( (NaiveDate::from_ymd_res(2017, 4, 3)?, "兒童節(慶祝)"), ], &mut map, - Country::TW, - "Taiwan", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "春節"), @@ -485,14 +486,14 @@ pub fn build( ), ], &mut map, - Country::TW, - "Taiwan", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "春節"), @@ -518,14 +519,14 @@ pub fn build( ), ], &mut map, - Country::TW, - "Taiwan", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "春節"), @@ -558,14 +559,14 @@ pub fn build( ), ], &mut map, - Country::TW, - "Taiwan", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2021, - vec![ + [ (NaiveDate::from_ymd_res(2021, 1, 1)?, "中華民國開國紀念日"), ( NaiveDate::from_ymd_res(2021, 12, 31)?, @@ -600,14 +601,14 @@ pub fn build( (NaiveDate::from_ymd_res(2021, 4, 2)?, "兒童節(慶祝)"), ], &mut map, - Country::TW, - "Taiwan", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "春節"), @@ -626,14 +627,14 @@ pub fn build( ), ], &mut map, - Country::TW, - "Taiwan", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "春節"), @@ -677,14 +678,14 @@ pub fn build( ), ], &mut map, - Country::TW, - "Taiwan", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "春節"), @@ -704,14 +705,14 @@ pub fn build( (NaiveDate::from_ymd_res(2024, 4, 5)?, "兒童節(慶祝)"), ], &mut map, - Country::TW, - "Taiwan", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "春節"), @@ -725,14 +726,14 @@ pub fn build( (NaiveDate::from_ymd_res(2025, 5, 30)?, "端午節(慶祝)"), ], &mut map, - Country::TW, - "Taiwan", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "春節"), @@ -753,14 +754,14 @@ pub fn build( ), ], &mut map, - Country::TW, - "Taiwan", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2027, - vec![ + [ (NaiveDate::from_ymd_res(2027, 1, 1)?, "中華民國開國紀念日"), ( NaiveDate::from_ymd_res(2027, 12, 31)?, @@ -786,14 +787,14 @@ pub fn build( (NaiveDate::from_ymd_res(2027, 2, 10)?, "春節(慶祝)"), ], &mut map, - Country::TW, - "Taiwan", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "春節"), @@ -807,14 +808,14 @@ pub fn build( (NaiveDate::from_ymd_res(2028, 5, 29)?, "端午節(慶祝)"), ], &mut map, - Country::TW, - "Taiwan", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "春節"), @@ -829,14 +830,14 @@ pub fn build( (NaiveDate::from_ymd_res(2029, 9, 21)?, "中秋節(慶祝)"), ], &mut map, - Country::TW, - "Taiwan", + COUNTY_CODE, + COUNTY_NAME, ); 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)?, "春節"), @@ -852,8 +853,8 @@ pub fn build( (NaiveDate::from_ymd_res(2030, 2, 7)?, "春節(慶祝)"), ], &mut map, - Country::TW, - "Taiwan", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/ua.rs b/src/data/ua.rs index bc22532..7924953 100644 --- a/src/data/ua.rs +++ b/src/data/ua.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Ukraine"; +const COUNTY_CODE: Country = Country::UA; + /// Generate holiday map for Ukraine. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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)?, @@ -62,14 +63,14 @@ pub fn build( ), ], &mut map, - Country::UA, - "Ukraine", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2001, - vec![ + [ (NaiveDate::from_ymd_res(2001, 1, 1)?, "Новий рік"), ( NaiveDate::from_ymd_res(2001, 1, 7)?, @@ -133,14 +134,14 @@ pub fn build( ), ], &mut map, - Country::UA, - "Ukraine", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2002, - vec![ + [ (NaiveDate::from_ymd_res(2002, 1, 1)?, "Новий рік"), ( NaiveDate::from_ymd_res(2002, 1, 7)?, @@ -192,14 +193,14 @@ pub fn build( ), ], &mut map, - Country::UA, - "Ukraine", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2003, - vec![ + [ (NaiveDate::from_ymd_res(2003, 1, 1)?, "Новий рік"), ( NaiveDate::from_ymd_res(2003, 1, 7)?, @@ -251,14 +252,14 @@ pub fn build( ), ], &mut map, - Country::UA, - "Ukraine", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2004, - vec![ + [ (NaiveDate::from_ymd_res(2004, 1, 1)?, "Новий рік"), ( NaiveDate::from_ymd_res(2004, 1, 7)?, @@ -322,14 +323,14 @@ pub fn build( ), ], &mut map, - Country::UA, - "Ukraine", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2005, - vec![ + [ (NaiveDate::from_ymd_res(2005, 1, 1)?, "Новий рік"), ( NaiveDate::from_ymd_res(2005, 1, 7)?, @@ -377,14 +378,14 @@ pub fn build( ), ], &mut map, - Country::UA, - "Ukraine", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2006, - vec![ + [ (NaiveDate::from_ymd_res(2006, 1, 1)?, "Новий рік"), ( NaiveDate::from_ymd_res(2006, 1, 7)?, @@ -449,14 +450,14 @@ pub fn build( ), ], &mut map, - Country::UA, - "Ukraine", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2007, - vec![ + [ (NaiveDate::from_ymd_res(2007, 1, 1)?, "Новий рік"), ( NaiveDate::from_ymd_res(2007, 1, 7)?, @@ -528,14 +529,14 @@ pub fn build( ), ], &mut map, - Country::UA, - "Ukraine", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2008, - vec![ + [ (NaiveDate::from_ymd_res(2008, 1, 1)?, "Новий рік"), ( NaiveDate::from_ymd_res(2008, 1, 7)?, @@ -603,14 +604,14 @@ pub fn build( ), ], &mut map, - Country::UA, - "Ukraine", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2009, - vec![ + [ (NaiveDate::from_ymd_res(2009, 1, 1)?, "Новий рік"), ( NaiveDate::from_ymd_res(2009, 1, 7)?, @@ -674,14 +675,14 @@ pub fn build( ), ], &mut map, - Country::UA, - "Ukraine", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2010, - vec![ + [ (NaiveDate::from_ymd_res(2010, 1, 1)?, "Новий рік"), ( NaiveDate::from_ymd_res(2010, 1, 7)?, @@ -749,14 +750,14 @@ pub fn build( ), ], &mut map, - Country::UA, - "Ukraine", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2011, - vec![ + [ (NaiveDate::from_ymd_res(2011, 1, 1)?, "Новий рік"), ( NaiveDate::from_ymd_res(2011, 1, 7)?, @@ -805,14 +806,14 @@ pub fn build( ), ], &mut map, - Country::UA, - "Ukraine", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2012, - vec![ + [ (NaiveDate::from_ymd_res(2012, 1, 1)?, "Новий рік"), ( NaiveDate::from_ymd_res(2012, 1, 7)?, @@ -869,14 +870,14 @@ pub fn build( ), ], &mut map, - Country::UA, - "Ukraine", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2013, - vec![ + [ (NaiveDate::from_ymd_res(2013, 1, 1)?, "Новий рік"), ( NaiveDate::from_ymd_res(2013, 1, 7)?, @@ -924,14 +925,14 @@ pub fn build( ), ], &mut map, - Country::UA, - "Ukraine", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2014, - vec![ + [ (NaiveDate::from_ymd_res(2014, 1, 1)?, "Новий рік"), ( NaiveDate::from_ymd_res(2014, 1, 7)?, @@ -991,14 +992,14 @@ pub fn build( ), ], &mut map, - Country::UA, - "Ukraine", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2015, - vec![ + [ (NaiveDate::from_ymd_res(2015, 1, 1)?, "Новий рік"), ( NaiveDate::from_ymd_res(2015, 1, 7)?, @@ -1066,14 +1067,14 @@ pub fn build( ), ], &mut map, - Country::UA, - "Ukraine", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2016, - vec![ + [ (NaiveDate::from_ymd_res(2016, 1, 1)?, "Новий рік"), ( NaiveDate::from_ymd_res(2016, 1, 7)?, @@ -1127,14 +1128,14 @@ pub fn build( ), ], &mut map, - Country::UA, - "Ukraine", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2017, - vec![ + [ (NaiveDate::from_ymd_res(2017, 1, 1)?, "Новий рік"), ( NaiveDate::from_ymd_res(2017, 1, 7)?, @@ -1198,14 +1199,14 @@ pub fn build( ), ], &mut map, - Country::UA, - "Ukraine", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2018, - vec![ + [ (NaiveDate::from_ymd_res(2018, 1, 1)?, "Новий рік"), ( NaiveDate::from_ymd_res(2018, 1, 7)?, @@ -1273,14 +1274,14 @@ pub fn build( ), ], &mut map, - Country::UA, - "Ukraine", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2019, - vec![ + [ (NaiveDate::from_ymd_res(2019, 1, 1)?, "Новий рік"), ( NaiveDate::from_ymd_res(2019, 1, 7)?, @@ -1336,14 +1337,14 @@ pub fn build( ), ], &mut map, - Country::UA, - "Ukraine", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2020, - vec![ + [ (NaiveDate::from_ymd_res(2020, 1, 1)?, "Новий рік"), ( NaiveDate::from_ymd_res(2020, 1, 7)?, @@ -1399,14 +1400,14 @@ pub fn build( ), ], &mut map, - Country::UA, - "Ukraine", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2021, - vec![ + [ (NaiveDate::from_ymd_res(2021, 1, 1)?, "Новий рік"), ( NaiveDate::from_ymd_res(2021, 1, 7)?, @@ -1470,14 +1471,14 @@ pub fn build( ), ], &mut map, - Country::UA, - "Ukraine", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2022, - vec![ + [ (NaiveDate::from_ymd_res(2022, 1, 1)?, "Новий рік"), ( NaiveDate::from_ymd_res(2022, 1, 7)?, @@ -1494,8 +1495,8 @@ pub fn build( ), ], &mut map, - Country::UA, - "Ukraine", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/us.rs b/src/data/us.rs index 15b9048..89e2fec 100644 --- a/src/data/us.rs +++ b/src/data/us.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "United States"; +const COUNTY_CODE: Country = Country::US; + /// Generate holiday map for United States. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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"), @@ -40,14 +41,14 @@ pub fn build( (NaiveDate::from_ymd_res(2000, 10, 9)?, "Columbus Day"), ], &mut map, - Country::US, - "United States", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -70,14 +71,14 @@ pub fn build( (NaiveDate::from_ymd_res(2001, 10, 8)?, "Columbus Day"), ], &mut map, - Country::US, - "United States", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -96,14 +97,14 @@ pub fn build( (NaiveDate::from_ymd_res(2002, 10, 14)?, "Columbus Day"), ], &mut map, - Country::US, - "United States", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -122,14 +123,14 @@ pub fn build( (NaiveDate::from_ymd_res(2003, 10, 13)?, "Columbus Day"), ], &mut map, - Country::US, - "United States", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2004, - vec![ + [ (NaiveDate::from_ymd_res(2004, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2004, 12, 31)?, @@ -160,14 +161,14 @@ pub fn build( (NaiveDate::from_ymd_res(2004, 10, 11)?, "Columbus Day"), ], &mut map, - Country::US, - "United States", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -190,14 +191,14 @@ pub fn build( (NaiveDate::from_ymd_res(2005, 10, 10)?, "Columbus Day"), ], &mut map, - Country::US, - "United States", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2006, - vec![ + [ (NaiveDate::from_ymd_res(2006, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2006, 1, 2)?, @@ -224,14 +225,14 @@ pub fn build( (NaiveDate::from_ymd_res(2006, 10, 9)?, "Columbus Day"), ], &mut map, - Country::US, - "United States", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -254,14 +255,14 @@ pub fn build( (NaiveDate::from_ymd_res(2007, 10, 8)?, "Columbus Day"), ], &mut map, - Country::US, - "United States", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -280,14 +281,14 @@ pub fn build( (NaiveDate::from_ymd_res(2008, 10, 13)?, "Columbus Day"), ], &mut map, - Country::US, - "United States", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -310,14 +311,14 @@ pub fn build( (NaiveDate::from_ymd_res(2009, 10, 12)?, "Columbus Day"), ], &mut map, - Country::US, - "United States", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2010, - vec![ + [ (NaiveDate::from_ymd_res(2010, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2010, 12, 31)?, @@ -348,14 +349,14 @@ pub fn build( (NaiveDate::from_ymd_res(2010, 10, 11)?, "Columbus Day"), ], &mut map, - Country::US, - "United States", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -378,14 +379,14 @@ pub fn build( (NaiveDate::from_ymd_res(2011, 10, 10)?, "Columbus Day"), ], &mut map, - Country::US, - "United States", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2012, - vec![ + [ (NaiveDate::from_ymd_res(2012, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2012, 1, 2)?, @@ -412,14 +413,14 @@ pub fn build( (NaiveDate::from_ymd_res(2012, 10, 8)?, "Columbus Day"), ], &mut map, - Country::US, - "United States", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -438,14 +439,14 @@ pub fn build( (NaiveDate::from_ymd_res(2013, 10, 14)?, "Columbus Day"), ], &mut map, - Country::US, - "United States", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -464,14 +465,14 @@ pub fn build( (NaiveDate::from_ymd_res(2014, 10, 13)?, "Columbus Day"), ], &mut map, - Country::US, - "United States", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -494,14 +495,14 @@ pub fn build( (NaiveDate::from_ymd_res(2015, 10, 12)?, "Columbus Day"), ], &mut map, - Country::US, - "United States", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -524,14 +525,14 @@ pub fn build( (NaiveDate::from_ymd_res(2016, 10, 10)?, "Columbus Day"), ], &mut map, - Country::US, - "United States", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2017, - vec![ + [ (NaiveDate::from_ymd_res(2017, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2017, 1, 2)?, @@ -558,14 +559,14 @@ pub fn build( (NaiveDate::from_ymd_res(2017, 10, 9)?, "Columbus Day"), ], &mut map, - Country::US, - "United States", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -588,14 +589,14 @@ pub fn build( (NaiveDate::from_ymd_res(2018, 10, 8)?, "Columbus Day"), ], &mut map, - Country::US, - "United States", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -614,14 +615,14 @@ pub fn build( (NaiveDate::from_ymd_res(2019, 10, 14)?, "Columbus Day"), ], &mut map, - Country::US, - "United States", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -644,14 +645,14 @@ pub fn build( (NaiveDate::from_ymd_res(2020, 10, 12)?, "Columbus Day"), ], &mut map, - Country::US, - "United States", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2021, - vec![ + [ (NaiveDate::from_ymd_res(2021, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2021, 12, 31)?, @@ -690,14 +691,14 @@ pub fn build( (NaiveDate::from_ymd_res(2021, 10, 11)?, "Columbus Day"), ], &mut map, - Country::US, - "United States", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -728,14 +729,14 @@ pub fn build( (NaiveDate::from_ymd_res(2022, 10, 10)?, "Columbus Day"), ], &mut map, - Country::US, - "United States", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2023, - vec![ + [ (NaiveDate::from_ymd_res(2023, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2023, 1, 2)?, @@ -766,14 +767,14 @@ pub fn build( (NaiveDate::from_ymd_res(2023, 10, 9)?, "Columbus Day"), ], &mut map, - Country::US, - "United States", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -796,14 +797,14 @@ pub fn build( (NaiveDate::from_ymd_res(2024, 10, 14)?, "Columbus Day"), ], &mut map, - Country::US, - "United States", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -826,14 +827,14 @@ pub fn build( (NaiveDate::from_ymd_res(2025, 10, 13)?, "Columbus Day"), ], &mut map, - Country::US, - "United States", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -860,14 +861,14 @@ pub fn build( (NaiveDate::from_ymd_res(2026, 10, 12)?, "Columbus Day"), ], &mut map, - Country::US, - "United States", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2027, - vec![ + [ (NaiveDate::from_ymd_res(2027, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2027, 12, 31)?, @@ -906,14 +907,14 @@ pub fn build( (NaiveDate::from_ymd_res(2027, 10, 11)?, "Columbus Day"), ], &mut map, - Country::US, - "United States", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -940,14 +941,14 @@ pub fn build( (NaiveDate::from_ymd_res(2028, 10, 9)?, "Columbus Day"), ], &mut map, - Country::US, - "United States", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -974,14 +975,14 @@ pub fn build( (NaiveDate::from_ymd_res(2029, 10, 8)?, "Columbus Day"), ], &mut map, - Country::US, - "United States", + COUNTY_CODE, + COUNTY_NAME, ); 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"), ( @@ -1004,8 +1005,8 @@ pub fn build( (NaiveDate::from_ymd_res(2030, 10, 14)?, "Columbus Day"), ], &mut map, - Country::US, - "United States", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/us_ak.rs b/src/data/us_ak.rs index 7508ed6..ecd8a1a 100644 --- a/src/data/us_ak.rs +++ b/src/data/us_ak.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "United States (Alaska)"; +const COUNTY_CODE: Country = Country::US_AK; + /// Generate holiday map for United States (Alaska). #[allow( unused_mut, @@ -9,124 +12,56 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); - build_year( + let mut national_holidays = de::build(years)?; + + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2000, 3, 27)?, "Seward's Day"), - (NaiveDate::from_ymd_res(2000, 10, 9)?, "Columbus Day"), (NaiveDate::from_ymd_res(2000, 10, 18)?, "Alaska Day"), ], &mut map, - Country::US_AK, - "United States (Alaska)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2001, 3, 26)?, "Seward's Day"), - (NaiveDate::from_ymd_res(2001, 10, 8)?, "Columbus Day"), (NaiveDate::from_ymd_res(2001, 10, 18)?, "Alaska Day"), ], &mut map, - Country::US_AK, - "United States (Alaska)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2002, 3, 25)?, "Seward's Day"), - (NaiveDate::from_ymd_res(2002, 10, 14)?, "Columbus Day"), (NaiveDate::from_ymd_res(2002, 10, 18)?, "Alaska Day"), ], &mut map, - Country::US_AK, - "United States (Alaska)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2003, 3, 31)?, "Seward's Day"), - (NaiveDate::from_ymd_res(2003, 10, 13)?, "Columbus Day"), (NaiveDate::from_ymd_res(2003, 10, 18)?, "Alaska Day"), ( NaiveDate::from_ymd_res(2003, 10, 17)?, @@ -134,171 +69,68 @@ pub fn build( ), ], &mut map, - Country::US_AK, - "United States (Alaska)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2004, 3, 29)?, "Seward's Day"), - (NaiveDate::from_ymd_res(2004, 10, 11)?, "Columbus Day"), (NaiveDate::from_ymd_res(2004, 10, 18)?, "Alaska Day"), ], &mut map, - Country::US_AK, - "United States (Alaska)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2005, 3, 28)?, "Seward's Day"), - (NaiveDate::from_ymd_res(2005, 10, 10)?, "Columbus Day"), (NaiveDate::from_ymd_res(2005, 10, 18)?, "Alaska Day"), ], &mut map, - Country::US_AK, - "United States (Alaska)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2006, 3, 27)?, "Seward's Day"), - (NaiveDate::from_ymd_res(2006, 10, 9)?, "Columbus Day"), (NaiveDate::from_ymd_res(2006, 10, 18)?, "Alaska Day"), ], &mut map, - Country::US_AK, - "United States (Alaska)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2007, 3, 26)?, "Seward's Day"), - (NaiveDate::from_ymd_res(2007, 10, 8)?, "Columbus Day"), (NaiveDate::from_ymd_res(2007, 10, 18)?, "Alaska Day"), ], &mut map, - Country::US_AK, - "United States (Alaska)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2008, 3, 31)?, "Seward's Day"), - (NaiveDate::from_ymd_res(2008, 10, 13)?, "Columbus Day"), (NaiveDate::from_ymd_res(2008, 10, 18)?, "Alaska Day"), ( NaiveDate::from_ymd_res(2008, 10, 17)?, @@ -306,35 +138,16 @@ pub fn build( ), ], &mut map, - Country::US_AK, - "United States (Alaska)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2009, 3, 30)?, "Seward's Day"), - (NaiveDate::from_ymd_res(2009, 10, 12)?, "Columbus Day"), (NaiveDate::from_ymd_res(2009, 10, 18)?, "Alaska Day"), ( NaiveDate::from_ymd_res(2009, 10, 19)?, @@ -342,167 +155,68 @@ pub fn build( ), ], &mut map, - Country::US_AK, - "United States (Alaska)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2010, 3, 29)?, "Seward's Day"), - (NaiveDate::from_ymd_res(2010, 10, 11)?, "Columbus Day"), (NaiveDate::from_ymd_res(2010, 10, 18)?, "Alaska Day"), ], &mut map, - Country::US_AK, - "United States (Alaska)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2011, 3, 28)?, "Seward's Day"), - (NaiveDate::from_ymd_res(2011, 10, 10)?, "Columbus Day"), (NaiveDate::from_ymd_res(2011, 10, 18)?, "Alaska Day"), ], &mut map, - Country::US_AK, - "United States (Alaska)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2012, 3, 26)?, "Seward's Day"), - (NaiveDate::from_ymd_res(2012, 10, 8)?, "Columbus Day"), (NaiveDate::from_ymd_res(2012, 10, 18)?, "Alaska Day"), ], &mut map, - Country::US_AK, - "United States (Alaska)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2013, 3, 25)?, "Seward's Day"), - (NaiveDate::from_ymd_res(2013, 10, 14)?, "Columbus Day"), (NaiveDate::from_ymd_res(2013, 10, 18)?, "Alaska Day"), ], &mut map, - Country::US_AK, - "United States (Alaska)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2014, 3, 31)?, "Seward's Day"), - (NaiveDate::from_ymd_res(2014, 10, 13)?, "Columbus Day"), (NaiveDate::from_ymd_res(2014, 10, 18)?, "Alaska Day"), ( NaiveDate::from_ymd_res(2014, 10, 17)?, @@ -510,38 +224,16 @@ pub fn build( ), ], &mut map, - Country::US_AK, - "United States (Alaska)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2015, 3, 30)?, "Seward's Day"), - ( - NaiveDate::from_ymd_res(2015, 10, 12)?, - "Indigenous Peoples' Day", - ), (NaiveDate::from_ymd_res(2015, 10, 18)?, "Alaska Day"), ( NaiveDate::from_ymd_res(2015, 10, 19)?, @@ -549,178 +241,68 @@ pub fn build( ), ], &mut map, - Country::US_AK, - "United States (Alaska)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2016, 3, 28)?, "Seward's Day"), - ( - NaiveDate::from_ymd_res(2016, 10, 10)?, - "Indigenous Peoples' Day", - ), (NaiveDate::from_ymd_res(2016, 10, 18)?, "Alaska Day"), ], &mut map, - Country::US_AK, - "United States (Alaska)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2017, 3, 27)?, "Seward's Day"), - ( - NaiveDate::from_ymd_res(2017, 10, 9)?, - "Indigenous Peoples' Day", - ), (NaiveDate::from_ymd_res(2017, 10, 18)?, "Alaska Day"), ], &mut map, - Country::US_AK, - "United States (Alaska)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2018, 3, 26)?, "Seward's Day"), - ( - NaiveDate::from_ymd_res(2018, 10, 8)?, - "Indigenous Peoples' Day", - ), (NaiveDate::from_ymd_res(2018, 10, 18)?, "Alaska Day"), ], &mut map, - Country::US_AK, - "United States (Alaska)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2019, 3, 25)?, "Seward's Day"), - ( - NaiveDate::from_ymd_res(2019, 10, 14)?, - "Indigenous Peoples' Day", - ), (NaiveDate::from_ymd_res(2019, 10, 18)?, "Alaska Day"), ], &mut map, - Country::US_AK, - "United States (Alaska)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2020, 3, 30)?, "Seward's Day"), - ( - NaiveDate::from_ymd_res(2020, 10, 12)?, - "Indigenous Peoples' Day", - ), (NaiveDate::from_ymd_res(2020, 10, 18)?, "Alaska Day"), ( NaiveDate::from_ymd_res(2020, 10, 19)?, @@ -728,210 +310,68 @@ pub fn build( ), ], &mut map, - Country::US_AK, - "United States (Alaska)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2021, 3, 29)?, "Seward's Day"), - ( - NaiveDate::from_ymd_res(2021, 10, 11)?, - "Indigenous Peoples' Day", - ), (NaiveDate::from_ymd_res(2021, 10, 18)?, "Alaska Day"), ], &mut map, - Country::US_AK, - "United States (Alaska)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2022, 3, 28)?, "Seward's Day"), - ( - NaiveDate::from_ymd_res(2022, 10, 10)?, - "Indigenous Peoples' Day", - ), (NaiveDate::from_ymd_res(2022, 10, 18)?, "Alaska Day"), ], &mut map, - Country::US_AK, - "United States (Alaska)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2023, 3, 27)?, "Seward's Day"), - ( - NaiveDate::from_ymd_res(2023, 10, 9)?, - "Indigenous Peoples' Day", - ), (NaiveDate::from_ymd_res(2023, 10, 18)?, "Alaska Day"), ], &mut map, - Country::US_AK, - "United States (Alaska)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2024, 3, 25)?, "Seward's Day"), - ( - NaiveDate::from_ymd_res(2024, 10, 14)?, - "Indigenous Peoples' Day", - ), (NaiveDate::from_ymd_res(2024, 10, 18)?, "Alaska Day"), ], &mut map, - Country::US_AK, - "United States (Alaska)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2025, 3, 31)?, "Seward's Day"), - ( - NaiveDate::from_ymd_res(2025, 10, 13)?, - "Indigenous Peoples' Day", - ), (NaiveDate::from_ymd_res(2025, 10, 18)?, "Alaska Day"), ( NaiveDate::from_ymd_res(2025, 10, 17)?, @@ -939,42 +379,16 @@ pub fn build( ), ], &mut map, - Country::US_AK, - "United States (Alaska)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2026, 3, 30)?, "Seward's Day"), - ( - NaiveDate::from_ymd_res(2026, 10, 12)?, - "Indigenous Peoples' Day", - ), (NaiveDate::from_ymd_res(2026, 10, 18)?, "Alaska Day"), ( NaiveDate::from_ymd_res(2026, 10, 19)?, @@ -982,172 +396,60 @@ pub fn build( ), ], &mut map, - Country::US_AK, - "United States (Alaska)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2027, 3, 29)?, "Seward's Day"), - ( - NaiveDate::from_ymd_res(2027, 10, 11)?, - "Indigenous Peoples' Day", - ), (NaiveDate::from_ymd_res(2027, 10, 18)?, "Alaska Day"), ], &mut map, - Country::US_AK, - "United States (Alaska)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2028, 3, 27)?, "Seward's Day"), - ( - NaiveDate::from_ymd_res(2028, 10, 9)?, - "Indigenous Peoples' Day", - ), (NaiveDate::from_ymd_res(2028, 10, 18)?, "Alaska Day"), ], &mut map, - Country::US_AK, - "United States (Alaska)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2029, 3, 26)?, "Seward's Day"), - ( - NaiveDate::from_ymd_res(2029, 10, 8)?, - "Indigenous Peoples' Day", - ), (NaiveDate::from_ymd_res(2029, 10, 18)?, "Alaska Day"), ], &mut map, - Country::US_AK, - "United States (Alaska)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2030, 3, 25)?, "Seward's Day"), - ( - NaiveDate::from_ymd_res(2030, 10, 14)?, - "Indigenous Peoples' Day", - ), (NaiveDate::from_ymd_res(2030, 10, 18)?, "Alaska Day"), ], &mut map, - Country::US_AK, - "United States (Alaska)", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/us_al.rs b/src/data/us_al.rs index aca64e5..d0f1427 100644 --- a/src/data/us_al.rs +++ b/src/data/us_al.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "United States (Alabama)"; +const COUNTY_CODE: Country = Country::US_AL; + /// Generate holiday map for United States (Alabama). #[allow( unused_mut, @@ -9,34 +12,16 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); - build_year( + let mut national_holidays = de::build(years)?; + + build_subdivision_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 & Robert E. Lee's Birthday", - ), - ( - NaiveDate::from_ymd_res(2000, 2, 21)?, - "George Washington & Thomas Jefferson's Birthday", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2000, 4, 24)?, "Confederate Memorial Day", @@ -45,39 +30,17 @@ pub fn build( NaiveDate::from_ymd_res(2000, 6, 5)?, "Jefferson Davis Birthday", ), - ( - NaiveDate::from_ymd_res(2000, 10, 9)?, - "Columbus Day / American Indian Heritage Day / Fraternal Day", - ), ], &mut map, - Country::US_AL, - "United States (Alabama)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 & Robert E. Lee's Birthday", - ), - ( - NaiveDate::from_ymd_res(2001, 2, 19)?, - "George Washington & Thomas Jefferson's Birthday", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2001, 4, 23)?, "Confederate Memorial Day", @@ -86,35 +49,17 @@ pub fn build( NaiveDate::from_ymd_res(2001, 6, 4)?, "Jefferson Davis Birthday", ), - ( - NaiveDate::from_ymd_res(2001, 10, 8)?, - "Columbus Day / American Indian Heritage Day / Fraternal Day", - ), ], &mut map, - Country::US_AL, - "United States (Alabama)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 & Robert E. Lee's Birthday", - ), - ( - NaiveDate::from_ymd_res(2002, 2, 18)?, - "George Washington & Thomas Jefferson's Birthday", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2002, 4, 22)?, "Confederate Memorial Day", @@ -123,35 +68,17 @@ pub fn build( NaiveDate::from_ymd_res(2002, 6, 3)?, "Jefferson Davis Birthday", ), - ( - NaiveDate::from_ymd_res(2002, 10, 14)?, - "Columbus Day / American Indian Heritage Day / Fraternal Day", - ), ], &mut map, - Country::US_AL, - "United States (Alabama)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 & Robert E. Lee's Birthday", - ), - ( - NaiveDate::from_ymd_res(2003, 2, 17)?, - "George Washington & Thomas Jefferson's Birthday", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2003, 4, 28)?, "Confederate Memorial Day", @@ -160,47 +87,17 @@ pub fn build( NaiveDate::from_ymd_res(2003, 6, 2)?, "Jefferson Davis Birthday", ), - ( - NaiveDate::from_ymd_res(2003, 10, 13)?, - "Columbus Day / American Indian Heritage Day / Fraternal Day", - ), ], &mut map, - Country::US_AL, - "United States (Alabama)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 & Robert E. Lee's Birthday", - ), - ( - NaiveDate::from_ymd_res(2004, 2, 16)?, - "George Washington & Thomas Jefferson's Birthday", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2004, 4, 26)?, "Confederate Memorial Day", @@ -209,39 +106,17 @@ pub fn build( NaiveDate::from_ymd_res(2004, 6, 7)?, "Jefferson Davis Birthday", ), - ( - NaiveDate::from_ymd_res(2004, 10, 11)?, - "Columbus Day / American Indian Heritage Day / Fraternal Day", - ), ], &mut map, - Country::US_AL, - "United States (Alabama)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 & Robert E. Lee's Birthday", - ), - ( - NaiveDate::from_ymd_res(2005, 2, 21)?, - "George Washington & Thomas Jefferson's Birthday", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2005, 4, 25)?, "Confederate Memorial Day", @@ -250,43 +125,17 @@ pub fn build( NaiveDate::from_ymd_res(2005, 6, 6)?, "Jefferson Davis Birthday", ), - ( - NaiveDate::from_ymd_res(2005, 10, 10)?, - "Columbus Day / American Indian Heritage Day / Fraternal Day", - ), ], &mut map, - Country::US_AL, - "United States (Alabama)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 & Robert E. Lee's Birthday", - ), - ( - NaiveDate::from_ymd_res(2006, 2, 20)?, - "George Washington & Thomas Jefferson's Birthday", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2006, 4, 24)?, "Confederate Memorial Day", @@ -295,39 +144,17 @@ pub fn build( NaiveDate::from_ymd_res(2006, 6, 5)?, "Jefferson Davis Birthday", ), - ( - NaiveDate::from_ymd_res(2006, 10, 9)?, - "Columbus Day / American Indian Heritage Day / Fraternal Day", - ), ], &mut map, - Country::US_AL, - "United States (Alabama)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 & Robert E. Lee's Birthday", - ), - ( - NaiveDate::from_ymd_res(2007, 2, 19)?, - "George Washington & Thomas Jefferson's Birthday", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2007, 4, 23)?, "Confederate Memorial Day", @@ -336,35 +163,17 @@ pub fn build( NaiveDate::from_ymd_res(2007, 6, 4)?, "Jefferson Davis Birthday", ), - ( - NaiveDate::from_ymd_res(2007, 10, 8)?, - "Columbus Day / American Indian Heritage Day / Fraternal Day", - ), ], &mut map, - Country::US_AL, - "United States (Alabama)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 & Robert E. Lee's Birthday", - ), - ( - NaiveDate::from_ymd_res(2008, 2, 18)?, - "George Washington & Thomas Jefferson's Birthday", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2008, 4, 28)?, "Confederate Memorial Day", @@ -373,39 +182,17 @@ pub fn build( NaiveDate::from_ymd_res(2008, 6, 2)?, "Jefferson Davis Birthday", ), - ( - NaiveDate::from_ymd_res(2008, 10, 13)?, - "Columbus Day / American Indian Heritage Day / Fraternal Day", - ), ], &mut map, - Country::US_AL, - "United States (Alabama)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 & Robert E. Lee's Birthday", - ), - ( - NaiveDate::from_ymd_res(2009, 2, 16)?, - "George Washington & Thomas Jefferson's Birthday", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2009, 4, 27)?, "Confederate Memorial Day", @@ -414,47 +201,17 @@ pub fn build( NaiveDate::from_ymd_res(2009, 6, 1)?, "Jefferson Davis Birthday", ), - ( - NaiveDate::from_ymd_res(2009, 10, 12)?, - "Columbus Day / American Indian Heritage Day / Fraternal Day", - ), ], &mut map, - Country::US_AL, - "United States (Alabama)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 & Robert E. Lee's Birthday", - ), - ( - NaiveDate::from_ymd_res(2010, 2, 15)?, - "George Washington & Thomas Jefferson's Birthday", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2010, 4, 26)?, "Confederate Memorial Day", @@ -463,39 +220,17 @@ pub fn build( NaiveDate::from_ymd_res(2010, 6, 7)?, "Jefferson Davis Birthday", ), - ( - NaiveDate::from_ymd_res(2010, 10, 11)?, - "Columbus Day / American Indian Heritage Day / Fraternal Day", - ), ], &mut map, - Country::US_AL, - "United States (Alabama)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 & Robert E. Lee's Birthday", - ), - ( - NaiveDate::from_ymd_res(2011, 2, 21)?, - "George Washington & Thomas Jefferson's Birthday", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2011, 4, 25)?, "Confederate Memorial Day", @@ -504,43 +239,17 @@ pub fn build( NaiveDate::from_ymd_res(2011, 6, 6)?, "Jefferson Davis Birthday", ), - ( - NaiveDate::from_ymd_res(2011, 10, 10)?, - "Columbus Day / American Indian Heritage Day / Fraternal Day", - ), ], &mut map, - Country::US_AL, - "United States (Alabama)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 & Robert E. Lee's Birthday", - ), - ( - NaiveDate::from_ymd_res(2012, 2, 20)?, - "George Washington & Thomas Jefferson's Birthday", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2012, 4, 23)?, "Confederate Memorial Day", @@ -549,35 +258,17 @@ pub fn build( NaiveDate::from_ymd_res(2012, 6, 4)?, "Jefferson Davis Birthday", ), - ( - NaiveDate::from_ymd_res(2012, 10, 8)?, - "Columbus Day / American Indian Heritage Day / Fraternal Day", - ), ], &mut map, - Country::US_AL, - "United States (Alabama)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 & Robert E. Lee's Birthday", - ), - ( - NaiveDate::from_ymd_res(2013, 2, 18)?, - "George Washington & Thomas Jefferson's Birthday", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2013, 4, 22)?, "Confederate Memorial Day", @@ -586,35 +277,17 @@ pub fn build( NaiveDate::from_ymd_res(2013, 6, 3)?, "Jefferson Davis Birthday", ), - ( - NaiveDate::from_ymd_res(2013, 10, 14)?, - "Columbus Day / American Indian Heritage Day / Fraternal Day", - ), ], &mut map, - Country::US_AL, - "United States (Alabama)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 & Robert E. Lee's Birthday", - ), - ( - NaiveDate::from_ymd_res(2014, 2, 17)?, - "George Washington & Thomas Jefferson's Birthday", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2014, 4, 28)?, "Confederate Memorial Day", @@ -623,39 +296,17 @@ pub fn build( NaiveDate::from_ymd_res(2014, 6, 2)?, "Jefferson Davis Birthday", ), - ( - NaiveDate::from_ymd_res(2014, 10, 13)?, - "Columbus Day / American Indian Heritage Day / Fraternal Day", - ), ], &mut map, - Country::US_AL, - "United States (Alabama)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 & Robert E. Lee's Birthday", - ), - ( - NaiveDate::from_ymd_res(2015, 2, 16)?, - "George Washington & Thomas Jefferson's Birthday", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2015, 4, 27)?, "Confederate Memorial Day", @@ -664,39 +315,17 @@ pub fn build( NaiveDate::from_ymd_res(2015, 6, 1)?, "Jefferson Davis Birthday", ), - ( - NaiveDate::from_ymd_res(2015, 10, 12)?, - "Columbus Day / American Indian Heritage Day / Fraternal Day", - ), ], &mut map, - Country::US_AL, - "United States (Alabama)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 & Robert E. Lee's Birthday", - ), - ( - NaiveDate::from_ymd_res(2016, 2, 15)?, - "George Washington & Thomas Jefferson's Birthday", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2016, 4, 25)?, "Confederate Memorial Day", @@ -705,43 +334,17 @@ pub fn build( NaiveDate::from_ymd_res(2016, 6, 6)?, "Jefferson Davis Birthday", ), - ( - NaiveDate::from_ymd_res(2016, 10, 10)?, - "Columbus Day / American Indian Heritage Day / Fraternal Day", - ), ], &mut map, - Country::US_AL, - "United States (Alabama)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 & Robert E. Lee's Birthday", - ), - ( - NaiveDate::from_ymd_res(2017, 2, 20)?, - "George Washington & Thomas Jefferson's Birthday", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2017, 4, 24)?, "Confederate Memorial Day", @@ -750,39 +353,17 @@ pub fn build( NaiveDate::from_ymd_res(2017, 6, 5)?, "Jefferson Davis Birthday", ), - ( - NaiveDate::from_ymd_res(2017, 10, 9)?, - "Columbus Day / American Indian Heritage Day / Fraternal Day", - ), ], &mut map, - Country::US_AL, - "United States (Alabama)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 & Robert E. Lee's Birthday", - ), - ( - NaiveDate::from_ymd_res(2018, 2, 19)?, - "George Washington & Thomas Jefferson's Birthday", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2018, 4, 23)?, "Confederate Memorial Day", @@ -791,35 +372,17 @@ pub fn build( NaiveDate::from_ymd_res(2018, 6, 4)?, "Jefferson Davis Birthday", ), - ( - NaiveDate::from_ymd_res(2018, 10, 8)?, - "Columbus Day / American Indian Heritage Day / Fraternal Day", - ), ], &mut map, - Country::US_AL, - "United States (Alabama)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 & Robert E. Lee's Birthday", - ), - ( - NaiveDate::from_ymd_res(2019, 2, 18)?, - "George Washington & Thomas Jefferson's Birthday", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2019, 4, 22)?, "Confederate Memorial Day", @@ -828,39 +391,17 @@ pub fn build( NaiveDate::from_ymd_res(2019, 6, 3)?, "Jefferson Davis Birthday", ), - ( - NaiveDate::from_ymd_res(2019, 10, 14)?, - "Columbus Day / American Indian Heritage Day / Fraternal Day", - ), ], &mut map, - Country::US_AL, - "United States (Alabama)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 & Robert E. Lee's Birthday", - ), - ( - NaiveDate::from_ymd_res(2020, 2, 17)?, - "George Washington & Thomas Jefferson's Birthday", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2020, 4, 27)?, "Confederate Memorial Day", @@ -869,55 +410,17 @@ pub fn build( NaiveDate::from_ymd_res(2020, 6, 1)?, "Jefferson Davis Birthday", ), - ( - NaiveDate::from_ymd_res(2020, 10, 12)?, - "Columbus Day / American Indian Heritage Day / Fraternal Day", - ), ], &mut map, - Country::US_AL, - "United States (Alabama)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 & Robert E. Lee's Birthday", - ), - ( - NaiveDate::from_ymd_res(2021, 2, 15)?, - "George Washington & Thomas Jefferson's Birthday", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2021, 4, 26)?, "Confederate Memorial Day", @@ -926,47 +429,17 @@ pub fn build( NaiveDate::from_ymd_res(2021, 6, 7)?, "Jefferson Davis Birthday", ), - ( - NaiveDate::from_ymd_res(2021, 10, 11)?, - "Columbus Day / American Indian Heritage Day / Fraternal Day", - ), ], &mut map, - Country::US_AL, - "United States (Alabama)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 & Robert E. Lee's Birthday", - ), - ( - NaiveDate::from_ymd_res(2022, 2, 21)?, - "George Washington & Thomas Jefferson's Birthday", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2022, 4, 25)?, "Confederate Memorial Day", @@ -975,47 +448,17 @@ pub fn build( NaiveDate::from_ymd_res(2022, 6, 6)?, "Jefferson Davis Birthday", ), - ( - NaiveDate::from_ymd_res(2022, 10, 10)?, - "Columbus Day / American Indian Heritage Day / Fraternal Day", - ), ], &mut map, - Country::US_AL, - "United States (Alabama)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 & Robert E. Lee's Birthday", - ), - ( - NaiveDate::from_ymd_res(2023, 2, 20)?, - "George Washington & Thomas Jefferson's Birthday", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2023, 4, 24)?, "Confederate Memorial Day", @@ -1024,39 +467,17 @@ pub fn build( NaiveDate::from_ymd_res(2023, 6, 5)?, "Jefferson Davis Birthday", ), - ( - NaiveDate::from_ymd_res(2023, 10, 9)?, - "Columbus Day / American Indian Heritage Day / Fraternal Day", - ), ], &mut map, - Country::US_AL, - "United States (Alabama)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 & Robert E. Lee's Birthday", - ), - ( - NaiveDate::from_ymd_res(2024, 2, 19)?, - "George Washington & Thomas Jefferson's Birthday", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2024, 4, 22)?, "Confederate Memorial Day", @@ -1065,39 +486,17 @@ pub fn build( NaiveDate::from_ymd_res(2024, 6, 3)?, "Jefferson Davis Birthday", ), - ( - NaiveDate::from_ymd_res(2024, 10, 14)?, - "Columbus Day / American Indian Heritage Day / Fraternal Day", - ), ], &mut map, - Country::US_AL, - "United States (Alabama)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 & Robert E. Lee's Birthday", - ), - ( - NaiveDate::from_ymd_res(2025, 2, 17)?, - "George Washington & Thomas Jefferson's Birthday", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2025, 4, 28)?, "Confederate Memorial Day", @@ -1106,43 +505,17 @@ pub fn build( NaiveDate::from_ymd_res(2025, 6, 2)?, "Jefferson Davis Birthday", ), - ( - NaiveDate::from_ymd_res(2025, 10, 13)?, - "Columbus Day / American Indian Heritage Day / Fraternal Day", - ), ], &mut map, - Country::US_AL, - "United States (Alabama)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 & Robert E. Lee's Birthday", - ), - ( - NaiveDate::from_ymd_res(2026, 2, 16)?, - "George Washington & Thomas Jefferson's Birthday", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2026, 4, 27)?, "Confederate Memorial Day", @@ -1151,55 +524,17 @@ pub fn build( NaiveDate::from_ymd_res(2026, 6, 1)?, "Jefferson Davis Birthday", ), - ( - NaiveDate::from_ymd_res(2026, 10, 12)?, - "Columbus Day / American Indian Heritage Day / Fraternal Day", - ), ], &mut map, - Country::US_AL, - "United States (Alabama)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 & Robert E. Lee's Birthday", - ), - ( - NaiveDate::from_ymd_res(2027, 2, 15)?, - "George Washington & Thomas Jefferson's Birthday", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2027, 4, 26)?, "Confederate Memorial Day", @@ -1208,43 +543,17 @@ pub fn build( NaiveDate::from_ymd_res(2027, 6, 7)?, "Jefferson Davis Birthday", ), - ( - NaiveDate::from_ymd_res(2027, 10, 11)?, - "Columbus Day / American Indian Heritage Day / Fraternal Day", - ), ], &mut map, - Country::US_AL, - "United States (Alabama)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 & Robert E. Lee's Birthday", - ), - ( - NaiveDate::from_ymd_res(2028, 2, 21)?, - "George Washington & Thomas Jefferson's Birthday", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2028, 4, 24)?, "Confederate Memorial Day", @@ -1253,43 +562,17 @@ pub fn build( NaiveDate::from_ymd_res(2028, 6, 5)?, "Jefferson Davis Birthday", ), - ( - NaiveDate::from_ymd_res(2028, 10, 9)?, - "Columbus Day / American Indian Heritage Day / Fraternal Day", - ), ], &mut map, - Country::US_AL, - "United States (Alabama)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 & Robert E. Lee's Birthday", - ), - ( - NaiveDate::from_ymd_res(2029, 2, 19)?, - "George Washington & Thomas Jefferson's Birthday", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2029, 4, 23)?, "Confederate Memorial Day", @@ -1298,39 +581,17 @@ pub fn build( NaiveDate::from_ymd_res(2029, 6, 4)?, "Jefferson Davis Birthday", ), - ( - NaiveDate::from_ymd_res(2029, 10, 8)?, - "Columbus Day / American Indian Heritage Day / Fraternal Day", - ), ], &mut map, - Country::US_AL, - "United States (Alabama)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 & Robert E. Lee's Birthday", - ), - ( - NaiveDate::from_ymd_res(2030, 2, 18)?, - "George Washington & Thomas Jefferson's Birthday", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2030, 4, 22)?, "Confederate Memorial Day", @@ -1339,14 +600,10 @@ pub fn build( NaiveDate::from_ymd_res(2030, 6, 3)?, "Jefferson Davis Birthday", ), - ( - NaiveDate::from_ymd_res(2030, 10, 14)?, - "Columbus Day / American Indian Heritage Day / Fraternal Day", - ), ], &mut map, - Country::US_AL, - "United States (Alabama)", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/us_ar.rs b/src/data/us_ar.rs index ff40524..50388de 100644 --- a/src/data/us_ar.rs +++ b/src/data/us_ar.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "United States (Arkansas)"; +const COUNTY_CODE: Country = Country::US_AR; + /// Generate holiday map for United States (Arkansas). #[allow( unused_mut, @@ -9,972 +12,319 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); - build_year( + let mut national_holidays = de::build(years)?; + + build_subdivision_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)?, - "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", - ), - ( - NaiveDate::from_ymd_res(2000, 2, 21)?, - "George Washington's Birthday and Daisy Gatson Bates Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_AR, - "United States (Arkansas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", - ), - ( - NaiveDate::from_ymd_res(2001, 2, 19)?, - "George Washington's Birthday and Daisy Gatson Bates Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_AR, - "United States (Arkansas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", - ), - ( - NaiveDate::from_ymd_res(2002, 2, 18)?, - "George Washington's Birthday and Daisy Gatson Bates Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_AR, - "United States (Arkansas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", - ), - ( - NaiveDate::from_ymd_res(2003, 2, 17)?, - "George Washington's Birthday and Daisy Gatson Bates Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_AR, - "United States (Arkansas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", - ), - ( - NaiveDate::from_ymd_res(2004, 2, 16)?, - "George Washington's Birthday and Daisy Gatson Bates Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_AR, - "United States (Arkansas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", - ), - ( - NaiveDate::from_ymd_res(2005, 2, 21)?, - "George Washington's Birthday and Daisy Gatson Bates Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_AR, - "United States (Arkansas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", - ), - ( - NaiveDate::from_ymd_res(2006, 2, 20)?, - "George Washington's Birthday and Daisy Gatson Bates Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_AR, - "United States (Arkansas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", - ), - ( - NaiveDate::from_ymd_res(2007, 2, 19)?, - "George Washington's Birthday and Daisy Gatson Bates Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_AR, - "United States (Arkansas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", - ), - ( - NaiveDate::from_ymd_res(2008, 2, 18)?, - "George Washington's Birthday and Daisy Gatson Bates Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_AR, - "United States (Arkansas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", - ), - ( - NaiveDate::from_ymd_res(2009, 2, 16)?, - "George Washington's Birthday and Daisy Gatson Bates Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_AR, - "United States (Arkansas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", - ), - ( - NaiveDate::from_ymd_res(2010, 2, 15)?, - "George Washington's Birthday and Daisy Gatson Bates Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_AR, - "United States (Arkansas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", - ), - ( - NaiveDate::from_ymd_res(2011, 2, 21)?, - "George Washington's Birthday and Daisy Gatson Bates Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_AR, - "United States (Arkansas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", - ), - ( - NaiveDate::from_ymd_res(2012, 2, 20)?, - "George Washington's Birthday and Daisy Gatson Bates Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_AR, - "United States (Arkansas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", - ), - ( - NaiveDate::from_ymd_res(2013, 2, 18)?, - "George Washington's Birthday and Daisy Gatson Bates Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_AR, - "United States (Arkansas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", - ), - ( - NaiveDate::from_ymd_res(2014, 2, 17)?, - "George Washington's Birthday and Daisy Gatson Bates Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_AR, - "United States (Arkansas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", - ), - ( - NaiveDate::from_ymd_res(2015, 2, 16)?, - "George Washington's Birthday and Daisy Gatson Bates Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_AR, - "United States (Arkansas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", - ), - ( - NaiveDate::from_ymd_res(2016, 2, 15)?, - "George Washington's Birthday and Daisy Gatson Bates Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_AR, - "United States (Arkansas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", - ), - ( - NaiveDate::from_ymd_res(2017, 2, 20)?, - "George Washington's Birthday and Daisy Gatson Bates Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_AR, - "United States (Arkansas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "George Washington's Birthday and Daisy Gatson Bates Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_AR, - "United States (Arkansas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "George Washington's Birthday and Daisy Gatson Bates Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_AR, - "United States (Arkansas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "George Washington's Birthday and Daisy Gatson Bates Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_AR, - "United States (Arkansas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "George Washington's Birthday and Daisy Gatson Bates Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_AR, - "United States (Arkansas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "George Washington's Birthday and Daisy Gatson Bates Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_AR, - "United States (Arkansas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "George Washington's Birthday and Daisy Gatson Bates Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_AR, - "United States (Arkansas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "George Washington's Birthday and Daisy Gatson Bates Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_AR, - "United States (Arkansas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "George Washington's Birthday and Daisy Gatson Bates Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_AR, - "United States (Arkansas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "George Washington's Birthday and Daisy Gatson Bates Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_AR, - "United States (Arkansas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "George Washington's Birthday and Daisy Gatson Bates Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_AR, - "United States (Arkansas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "George Washington's Birthday and Daisy Gatson Bates Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_AR, - "United States (Arkansas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "George Washington's Birthday and Daisy Gatson Bates Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_AR, - "United States (Arkansas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "George Washington's Birthday and Daisy Gatson Bates Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_AR, - "United States (Arkansas)", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/us_as.rs b/src/data/us_as.rs index 6610d0d..1ac2a8e 100644 --- a/src/data/us_as.rs +++ b/src/data/us_as.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "United States (American Samoa)"; +const COUNTY_CODE: Country = Country::US_AS; + /// Generate holiday map for United States (American Samoa). #[allow( unused_mut, @@ -9,35 +12,16 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); - build_year( + let mut national_holidays = de::build(years)?; + + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2000, 12, 24)?, "Christmas Eve"), ( NaiveDate::from_ymd_res(2000, 12, 22)?, @@ -45,161 +29,58 @@ pub fn build( ), ], &mut map, - Country::US_AS, - "United States (American Samoa)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2001, 12, 24)?, "Christmas Eve"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2001, 12, 24)?, "Christmas Eve")], &mut map, - Country::US_AS, - "United States (American Samoa)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2002, 12, 24)?, "Christmas Eve"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2002, 12, 24)?, "Christmas Eve")], &mut map, - Country::US_AS, - "United States (American Samoa)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2003, 12, 24)?, "Christmas Eve"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2003, 12, 24)?, "Christmas Eve")], &mut map, - Country::US_AS, - "United States (American Samoa)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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); Christmas Eve", - ), - ( - 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"), - ( - NaiveDate::from_ymd_res(2004, 12, 23)?, - "Christmas Eve (observed)", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2004, 12, 23)?, + "Christmas Eve (observed)", + )], &mut map, - Country::US_AS, - "United States (American Samoa)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2005, 12, 24)?, "Christmas Eve"), ( NaiveDate::from_ymd_res(2005, 12, 23)?, @@ -207,38 +88,15 @@ pub fn build( ), ], &mut map, - Country::US_AS, - "United States (American Samoa)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2006, 12, 24)?, "Christmas Eve"), ( NaiveDate::from_ymd_res(2006, 12, 22)?, @@ -246,165 +104,58 @@ pub fn build( ), ], &mut map, - Country::US_AS, - "United States (American Samoa)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2007, 12, 24)?, "Christmas Eve"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2007, 12, 24)?, "Christmas Eve")], &mut map, - Country::US_AS, - "United States (American Samoa)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2008, 12, 24)?, "Christmas Eve"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2008, 12, 24)?, "Christmas Eve")], &mut map, - Country::US_AS, - "United States (American Samoa)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2009, 12, 24)?, "Christmas Eve"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2009, 12, 24)?, "Christmas Eve")], &mut map, - Country::US_AS, - "United States (American Samoa)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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); Christmas Eve", - ), - ( - 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"), - ( - NaiveDate::from_ymd_res(2010, 12, 23)?, - "Christmas Eve (observed)", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2010, 12, 23)?, + "Christmas Eve (observed)", + )], &mut map, - Country::US_AS, - "United States (American Samoa)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2011, 12, 24)?, "Christmas Eve"), ( NaiveDate::from_ymd_res(2011, 12, 23)?, @@ -412,154 +163,55 @@ pub fn build( ), ], &mut map, - Country::US_AS, - "United States (American Samoa)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2012, 12, 24)?, "Christmas Eve"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2012, 12, 24)?, "Christmas Eve")], &mut map, - Country::US_AS, - "United States (American Samoa)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2013, 12, 24)?, "Christmas Eve"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2013, 12, 24)?, "Christmas Eve")], &mut map, - Country::US_AS, - "United States (American Samoa)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2014, 12, 24)?, "Christmas Eve"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2014, 12, 24)?, "Christmas Eve")], &mut map, - Country::US_AS, - "United States (American Samoa)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2015, 12, 24)?, "Christmas Eve"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2015, 12, 24)?, "Christmas Eve")], &mut map, - Country::US_AS, - "United States (American Samoa)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2016, 12, 24)?, "Christmas Eve"), ( NaiveDate::from_ymd_res(2016, 12, 23)?, @@ -567,38 +219,15 @@ pub fn build( ), ], &mut map, - Country::US_AS, - "United States (American Samoa)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2017, 12, 24)?, "Christmas Eve"), ( NaiveDate::from_ymd_res(2017, 12, 22)?, @@ -606,181 +235,58 @@ pub fn build( ), ], &mut map, - Country::US_AS, - "United States (American Samoa)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2018, 12, 24)?, "Christmas Eve"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2018, 12, 24)?, "Christmas Eve")], &mut map, - Country::US_AS, - "United States (American Samoa)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2019, 12, 24)?, "Christmas Eve"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2019, 12, 24)?, "Christmas Eve")], &mut map, - Country::US_AS, - "United States (American Samoa)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2020, 12, 24)?, "Christmas Eve"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2020, 12, 24)?, "Christmas Eve")], &mut map, - Country::US_AS, - "United States (American Samoa)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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); Christmas Eve", - ), - ( - 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"), - ( - NaiveDate::from_ymd_res(2021, 12, 23)?, - "Christmas Eve (observed)", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2021, 12, 23)?, + "Christmas Eve (observed)", + )], &mut map, - Country::US_AS, - "United States (American Samoa)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2022, 12, 24)?, "Christmas Eve"), ( NaiveDate::from_ymd_res(2022, 12, 23)?, @@ -788,42 +294,15 @@ pub fn build( ), ], &mut map, - Country::US_AS, - "United States (American Samoa)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2023, 12, 24)?, "Christmas Eve"), ( NaiveDate::from_ymd_res(2023, 12, 22)?, @@ -831,185 +310,58 @@ pub fn build( ), ], &mut map, - Country::US_AS, - "United States (American Samoa)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2024, 12, 24)?, "Christmas Eve"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2024, 12, 24)?, "Christmas Eve")], &mut map, - Country::US_AS, - "United States (American Samoa)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2025, 12, 24)?, "Christmas Eve"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2025, 12, 24)?, "Christmas Eve")], &mut map, - Country::US_AS, - "United States (American Samoa)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2026, 12, 24)?, "Christmas Eve"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2026, 12, 24)?, "Christmas Eve")], &mut map, - Country::US_AS, - "United States (American Samoa)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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); Christmas Eve", - ), - ( - 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"), - ( - NaiveDate::from_ymd_res(2027, 12, 23)?, - "Christmas Eve (observed)", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2027, 12, 23)?, + "Christmas Eve (observed)", + )], &mut map, - Country::US_AS, - "United States (American Samoa)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2028, 12, 24)?, "Christmas Eve"), ( NaiveDate::from_ymd_res(2028, 12, 22)?, @@ -1017,74 +369,28 @@ pub fn build( ), ], &mut map, - Country::US_AS, - "United States (American Samoa)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2029, 12, 24)?, "Christmas Eve"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2029, 12, 24)?, "Christmas Eve")], &mut map, - Country::US_AS, - "United States (American Samoa)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2030, 12, 24)?, "Christmas Eve"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2030, 12, 24)?, "Christmas Eve")], &mut map, - Country::US_AS, - "United States (American Samoa)", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/us_az.rs b/src/data/us_az.rs index 8658706..c989a81 100644 --- a/src/data/us_az.rs +++ b/src/data/us_az.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "United States (Arizona)"; +const COUNTY_CODE: Country = Country::US_AZ; + /// Generate holiday map for United States (Arizona). #[allow( unused_mut, @@ -9,1003 +12,319 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); - build_year( + let mut national_holidays = de::build(years)?; + + build_subdivision_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, 2, 21)?, - "Washington's Birthday", - ), - (NaiveDate::from_ymd_res(2000, 10, 9)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2000, 1, 17)?, - "Dr. Martin Luther King Jr. / Civil Rights Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_AZ, - "United States (Arizona)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 19)?, - "Washington's Birthday", - ), - (NaiveDate::from_ymd_res(2001, 10, 8)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2001, 1, 15)?, - "Dr. Martin Luther King Jr. / Civil Rights Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_AZ, - "United States (Arizona)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 18)?, - "Washington's Birthday", - ), - (NaiveDate::from_ymd_res(2002, 10, 14)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2002, 1, 21)?, - "Dr. Martin Luther King Jr. / Civil Rights Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_AZ, - "United States (Arizona)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 17)?, - "Washington's Birthday", - ), - (NaiveDate::from_ymd_res(2003, 10, 13)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2003, 1, 20)?, - "Dr. Martin Luther King Jr. / Civil Rights Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_AZ, - "United States (Arizona)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 16)?, - "Washington's Birthday", - ), - (NaiveDate::from_ymd_res(2004, 10, 11)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2004, 1, 19)?, - "Dr. Martin Luther King Jr. / Civil Rights Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_AZ, - "United States (Arizona)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 21)?, - "Washington's Birthday", - ), - (NaiveDate::from_ymd_res(2005, 10, 10)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2005, 1, 17)?, - "Dr. Martin Luther King Jr. / Civil Rights Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_AZ, - "United States (Arizona)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 20)?, - "Washington's Birthday", - ), - (NaiveDate::from_ymd_res(2006, 10, 9)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2006, 1, 16)?, - "Dr. Martin Luther King Jr. / Civil Rights Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_AZ, - "United States (Arizona)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 19)?, - "Washington's Birthday", - ), - (NaiveDate::from_ymd_res(2007, 10, 8)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2007, 1, 15)?, - "Dr. Martin Luther King Jr. / Civil Rights Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_AZ, - "United States (Arizona)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 18)?, - "Washington's Birthday", - ), - (NaiveDate::from_ymd_res(2008, 10, 13)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2008, 1, 21)?, - "Dr. Martin Luther King Jr. / Civil Rights Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_AZ, - "United States (Arizona)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 16)?, - "Washington's Birthday", - ), - (NaiveDate::from_ymd_res(2009, 10, 12)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2009, 1, 19)?, - "Dr. Martin Luther King Jr. / Civil Rights Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_AZ, - "United States (Arizona)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 15)?, - "Washington's Birthday", - ), - (NaiveDate::from_ymd_res(2010, 10, 11)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2010, 1, 18)?, - "Dr. Martin Luther King Jr. / Civil Rights Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_AZ, - "United States (Arizona)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 21)?, - "Washington's Birthday", - ), - (NaiveDate::from_ymd_res(2011, 10, 10)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2011, 1, 17)?, - "Dr. Martin Luther King Jr. / Civil Rights Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_AZ, - "United States (Arizona)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 20)?, - "Washington's Birthday", - ), - (NaiveDate::from_ymd_res(2012, 10, 8)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2012, 1, 16)?, - "Dr. Martin Luther King Jr. / Civil Rights Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_AZ, - "United States (Arizona)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 18)?, - "Washington's Birthday", - ), - (NaiveDate::from_ymd_res(2013, 10, 14)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2013, 1, 21)?, - "Dr. Martin Luther King Jr. / Civil Rights Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_AZ, - "United States (Arizona)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 17)?, - "Washington's Birthday", - ), - (NaiveDate::from_ymd_res(2014, 10, 13)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2014, 1, 20)?, - "Dr. Martin Luther King Jr. / Civil Rights Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_AZ, - "United States (Arizona)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 16)?, - "Washington's Birthday", - ), - (NaiveDate::from_ymd_res(2015, 10, 12)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2015, 1, 19)?, - "Dr. Martin Luther King Jr. / Civil Rights Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_AZ, - "United States (Arizona)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 15)?, - "Washington's Birthday", - ), - (NaiveDate::from_ymd_res(2016, 10, 10)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2016, 1, 18)?, - "Dr. Martin Luther King Jr. / Civil Rights Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_AZ, - "United States (Arizona)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 20)?, - "Washington's Birthday", - ), - (NaiveDate::from_ymd_res(2017, 10, 9)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2017, 1, 16)?, - "Dr. Martin Luther King Jr. / Civil Rights Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_AZ, - "United States (Arizona)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 19)?, - "Washington's Birthday", - ), - (NaiveDate::from_ymd_res(2018, 10, 8)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2018, 1, 15)?, - "Dr. Martin Luther King Jr. / Civil Rights Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_AZ, - "United States (Arizona)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 18)?, - "Washington's Birthday", - ), - (NaiveDate::from_ymd_res(2019, 10, 14)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2019, 1, 21)?, - "Dr. Martin Luther King Jr. / Civil Rights Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_AZ, - "United States (Arizona)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 17)?, - "Washington's Birthday", - ), - (NaiveDate::from_ymd_res(2020, 10, 12)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2020, 1, 20)?, - "Dr. Martin Luther King Jr. / Civil Rights Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_AZ, - "United States (Arizona)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 15)?, - "Washington's Birthday", - ), - (NaiveDate::from_ymd_res(2021, 10, 11)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2021, 1, 18)?, - "Dr. Martin Luther King Jr. / Civil Rights Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_AZ, - "United States (Arizona)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 21)?, - "Washington's Birthday", - ), - (NaiveDate::from_ymd_res(2022, 10, 10)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2022, 1, 17)?, - "Dr. Martin Luther King Jr. / Civil Rights Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_AZ, - "United States (Arizona)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 20)?, - "Washington's Birthday", - ), - (NaiveDate::from_ymd_res(2023, 10, 9)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2023, 1, 16)?, - "Dr. Martin Luther King Jr. / Civil Rights Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_AZ, - "United States (Arizona)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 19)?, - "Washington's Birthday", - ), - (NaiveDate::from_ymd_res(2024, 10, 14)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2024, 1, 15)?, - "Dr. Martin Luther King Jr. / Civil Rights Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_AZ, - "United States (Arizona)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 17)?, - "Washington's Birthday", - ), - (NaiveDate::from_ymd_res(2025, 10, 13)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2025, 1, 20)?, - "Dr. Martin Luther King Jr. / Civil Rights Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_AZ, - "United States (Arizona)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 16)?, - "Washington's Birthday", - ), - (NaiveDate::from_ymd_res(2026, 10, 12)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2026, 1, 19)?, - "Dr. Martin Luther King Jr. / Civil Rights Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_AZ, - "United States (Arizona)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 15)?, - "Washington's Birthday", - ), - (NaiveDate::from_ymd_res(2027, 10, 11)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2027, 1, 18)?, - "Dr. Martin Luther King Jr. / Civil Rights Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_AZ, - "United States (Arizona)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 21)?, - "Washington's Birthday", - ), - (NaiveDate::from_ymd_res(2028, 10, 9)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2028, 1, 17)?, - "Dr. Martin Luther King Jr. / Civil Rights Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_AZ, - "United States (Arizona)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 19)?, - "Washington's Birthday", - ), - (NaiveDate::from_ymd_res(2029, 10, 8)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2029, 1, 15)?, - "Dr. Martin Luther King Jr. / Civil Rights Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_AZ, - "United States (Arizona)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 18)?, - "Washington's Birthday", - ), - (NaiveDate::from_ymd_res(2030, 10, 14)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2030, 1, 21)?, - "Dr. Martin Luther King Jr. / Civil Rights Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_AZ, - "United States (Arizona)", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/us_ca.rs b/src/data/us_ca.rs index 0b429c7..715d2c5 100644 --- a/src/data/us_ca.rs +++ b/src/data/us_ca.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "United States (California)"; +const COUNTY_CODE: Country = Country::US_CA; + /// Generate holiday map for United States (California). #[allow( unused_mut, @@ -9,374 +12,185 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); - build_year( + let mut national_holidays = de::build(years)?; + + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2000, 2, 12)?, "Lincoln's Birthday"), ( NaiveDate::from_ymd_res(2000, 2, 11)?, "Lincoln's Birthday (observed)", ), (NaiveDate::from_ymd_res(2000, 3, 31)?, "Cesar Chavez Day"), - (NaiveDate::from_ymd_res(2000, 10, 9)?, "Columbus Day"), ( NaiveDate::from_ymd_res(2000, 11, 24)?, "Day After Thanksgiving", ), ], &mut map, - Country::US_CA, - "United States (California)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2001, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2001, 3, 31)?, "Cesar Chavez Day"), - (NaiveDate::from_ymd_res(2001, 10, 8)?, "Columbus Day"), ( NaiveDate::from_ymd_res(2001, 11, 23)?, "Day After Thanksgiving", ), ], &mut map, - Country::US_CA, - "United States (California)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2002, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2002, 3, 31)?, "Cesar Chavez Day"), ( NaiveDate::from_ymd_res(2002, 4, 1)?, "Cesar Chavez Day (observed)", ), - (NaiveDate::from_ymd_res(2002, 10, 14)?, "Columbus Day"), ( NaiveDate::from_ymd_res(2002, 11, 29)?, "Day After Thanksgiving", ), ], &mut map, - Country::US_CA, - "United States (California)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2003, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2003, 3, 31)?, "Cesar Chavez Day"), - (NaiveDate::from_ymd_res(2003, 10, 13)?, "Columbus Day"), ( NaiveDate::from_ymd_res(2003, 11, 28)?, "Day After Thanksgiving", ), ], &mut map, - Country::US_CA, - "United States (California)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2004, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2004, 3, 31)?, "Cesar Chavez Day"), - (NaiveDate::from_ymd_res(2004, 10, 11)?, "Columbus Day"), ( NaiveDate::from_ymd_res(2004, 11, 26)?, "Day After Thanksgiving", ), ], &mut map, - Country::US_CA, - "United States (California)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2005, 2, 12)?, "Lincoln's Birthday"), ( NaiveDate::from_ymd_res(2005, 2, 11)?, "Lincoln's Birthday (observed)", ), (NaiveDate::from_ymd_res(2005, 3, 31)?, "Cesar Chavez Day"), - (NaiveDate::from_ymd_res(2005, 10, 10)?, "Columbus Day"), ( NaiveDate::from_ymd_res(2005, 11, 25)?, "Day After Thanksgiving", ), ], &mut map, - Country::US_CA, - "United States (California)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2006, 2, 12)?, "Lincoln's Birthday"), ( NaiveDate::from_ymd_res(2006, 2, 13)?, "Lincoln's Birthday (observed)", ), (NaiveDate::from_ymd_res(2006, 3, 31)?, "Cesar Chavez Day"), - (NaiveDate::from_ymd_res(2006, 10, 9)?, "Columbus Day"), ( NaiveDate::from_ymd_res(2006, 11, 24)?, "Day After Thanksgiving", ), ], &mut map, - Country::US_CA, - "United States (California)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2007, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2007, 3, 31)?, "Cesar Chavez Day"), - (NaiveDate::from_ymd_res(2007, 10, 8)?, "Columbus Day"), ( NaiveDate::from_ymd_res(2007, 11, 23)?, "Day After Thanksgiving", ), ], &mut map, - Country::US_CA, - "United States (California)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2008, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2008, 3, 31)?, "Cesar Chavez Day"), - (NaiveDate::from_ymd_res(2008, 10, 13)?, "Columbus Day"), ( NaiveDate::from_ymd_res(2008, 11, 28)?, "Day After Thanksgiving", ), ], &mut map, - Country::US_CA, - "United States (California)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2009, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2009, 3, 31)?, "Cesar Chavez Day"), ( @@ -385,41 +199,15 @@ pub fn build( ), ], &mut map, - Country::US_CA, - "United States (California)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2010, 3, 31)?, "Cesar Chavez Day"), ( NaiveDate::from_ymd_res(2010, 11, 26)?, @@ -427,33 +215,15 @@ pub fn build( ), ], &mut map, - Country::US_CA, - "United States (California)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2011, 3, 31)?, "Cesar Chavez Day"), ( NaiveDate::from_ymd_res(2011, 11, 25)?, @@ -461,37 +231,15 @@ pub fn build( ), ], &mut map, - Country::US_CA, - "United States (California)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2012, 3, 31)?, "Cesar Chavez Day"), ( NaiveDate::from_ymd_res(2012, 11, 23)?, @@ -499,29 +247,15 @@ pub fn build( ), ], &mut map, - Country::US_CA, - "United States (California)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2013, 3, 31)?, "Cesar Chavez Day"), ( NaiveDate::from_ymd_res(2013, 4, 1)?, @@ -533,29 +267,15 @@ pub fn build( ), ], &mut map, - Country::US_CA, - "United States (California)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2014, 2, 15)?, "Susan B. Anthony Day", @@ -567,33 +287,15 @@ pub fn build( ), ], &mut map, - Country::US_CA, - "United States (California)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2015, 2, 15)?, "Susan B. Anthony Day", @@ -605,33 +307,15 @@ pub fn build( ), ], &mut map, - Country::US_CA, - "United States (California)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Susan B. Anthony Day; Washington's Birthday", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2016, 3, 31)?, "Cesar Chavez Day"), ( NaiveDate::from_ymd_res(2016, 11, 25)?, @@ -639,37 +323,15 @@ pub fn build( ), ], &mut map, - Country::US_CA, - "United States (California)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2017, 2, 15)?, "Susan B. Anthony Day", @@ -681,33 +343,15 @@ pub fn build( ), ], &mut map, - Country::US_CA, - "United States (California)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2018, 2, 15)?, "Susan B. Anthony Day", @@ -719,29 +363,15 @@ pub fn build( ), ], &mut map, - Country::US_CA, - "United States (California)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2019, 2, 15)?, "Susan B. Anthony Day", @@ -757,33 +387,15 @@ pub fn build( ), ], &mut map, - Country::US_CA, - "United States (California)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2020, 2, 15)?, "Susan B. Anthony Day", @@ -795,49 +407,15 @@ pub fn build( ), ], &mut map, - Country::US_CA, - "United States (California)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Susan B. Anthony Day; Washington's Birthday", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2021, 3, 31)?, "Cesar Chavez Day"), ( NaiveDate::from_ymd_res(2021, 11, 26)?, @@ -845,41 +423,15 @@ pub fn build( ), ], &mut map, - Country::US_CA, - "United States (California)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2022, 2, 15)?, "Susan B. Anthony Day", @@ -891,41 +443,15 @@ pub fn build( ), ], &mut map, - Country::US_CA, - "United States (California)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2023, 2, 15)?, "Susan B. Anthony Day", @@ -937,33 +463,15 @@ pub fn build( ), ], &mut map, - Country::US_CA, - "United States (California)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2024, 2, 15)?, "Susan B. Anthony Day", @@ -979,33 +487,15 @@ pub fn build( ), ], &mut map, - Country::US_CA, - "United States (California)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2025, 2, 15)?, "Susan B. Anthony Day", @@ -1017,37 +507,15 @@ pub fn build( ), ], &mut map, - Country::US_CA, - "United States (California)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2026, 2, 15)?, "Susan B. Anthony Day", @@ -1059,49 +527,15 @@ pub fn build( ), ], &mut map, - Country::US_CA, - "United States (California)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Susan B. Anthony Day; Washington's Birthday", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2027, 3, 31)?, "Cesar Chavez Day"), ( NaiveDate::from_ymd_res(2027, 11, 26)?, @@ -1109,37 +543,15 @@ pub fn build( ), ], &mut map, - Country::US_CA, - "United States (California)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2028, 2, 15)?, "Susan B. Anthony Day", @@ -1151,37 +563,15 @@ pub fn build( ), ], &mut map, - Country::US_CA, - "United States (California)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2029, 2, 15)?, "Susan B. Anthony Day", @@ -1193,33 +583,15 @@ pub fn build( ), ], &mut map, - Country::US_CA, - "United States (California)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2030, 2, 15)?, "Susan B. Anthony Day", @@ -1235,8 +607,8 @@ pub fn build( ), ], &mut map, - Country::US_CA, - "United States (California)", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/us_co.rs b/src/data/us_co.rs index 856248a..b227e3d 100644 --- a/src/data/us_co.rs +++ b/src/data/us_co.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "United States (Colorado)"; +const COUNTY_CODE: Country = Country::US_CO; + /// Generate holiday map for United States (Colorado). #[allow( unused_mut, @@ -9,1002 +12,319 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); - build_year( + let mut national_holidays = de::build(years)?; + + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_CO, - "United States (Colorado)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 3, 31)?, "Cesar Chavez Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2001, 3, 31)?, "Cesar Chavez Day")], &mut map, - Country::US_CO, - "United States (Colorado)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 3, 31)?, "Cesar Chavez Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2002, 3, 31)?, "Cesar Chavez Day")], &mut map, - Country::US_CO, - "United States (Colorado)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 3, 31)?, "Cesar Chavez Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2003, 3, 31)?, "Cesar Chavez Day")], &mut map, - Country::US_CO, - "United States (Colorado)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 3, 31)?, "Cesar Chavez Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2004, 3, 31)?, "Cesar Chavez Day")], &mut map, - Country::US_CO, - "United States (Colorado)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 3, 31)?, "Cesar Chavez Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2005, 3, 31)?, "Cesar Chavez Day")], &mut map, - Country::US_CO, - "United States (Colorado)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 3, 31)?, "Cesar Chavez Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2006, 3, 31)?, "Cesar Chavez Day")], &mut map, - Country::US_CO, - "United States (Colorado)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 3, 31)?, "Cesar Chavez Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2007, 3, 31)?, "Cesar Chavez Day")], &mut map, - Country::US_CO, - "United States (Colorado)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 3, 31)?, "Cesar Chavez Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2008, 3, 31)?, "Cesar Chavez Day")], &mut map, - Country::US_CO, - "United States (Colorado)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 3, 31)?, "Cesar Chavez Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2009, 3, 31)?, "Cesar Chavez Day")], &mut map, - Country::US_CO, - "United States (Colorado)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 3, 31)?, "Cesar Chavez Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2010, 3, 31)?, "Cesar Chavez Day")], &mut map, - Country::US_CO, - "United States (Colorado)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 3, 31)?, "Cesar Chavez Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2011, 3, 31)?, "Cesar Chavez Day")], &mut map, - Country::US_CO, - "United States (Colorado)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 3, 31)?, "Cesar Chavez Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2012, 3, 31)?, "Cesar Chavez Day")], &mut map, - Country::US_CO, - "United States (Colorado)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 3, 31)?, "Cesar Chavez Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2013, 3, 31)?, "Cesar Chavez Day")], &mut map, - Country::US_CO, - "United States (Colorado)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 3, 31)?, "Cesar Chavez Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2014, 3, 31)?, "Cesar Chavez Day")], &mut map, - Country::US_CO, - "United States (Colorado)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 3, 31)?, "Cesar Chavez Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2015, 3, 31)?, "Cesar Chavez Day")], &mut map, - Country::US_CO, - "United States (Colorado)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 3, 31)?, "Cesar Chavez Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2016, 3, 31)?, "Cesar Chavez Day")], &mut map, - Country::US_CO, - "United States (Colorado)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 3, 31)?, "Cesar Chavez Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2017, 3, 31)?, "Cesar Chavez Day")], &mut map, - Country::US_CO, - "United States (Colorado)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 3, 31)?, "Cesar Chavez Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2018, 3, 31)?, "Cesar Chavez Day")], &mut map, - Country::US_CO, - "United States (Colorado)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 3, 31)?, "Cesar Chavez Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2019, 3, 31)?, "Cesar Chavez Day")], &mut map, - Country::US_CO, - "United States (Colorado)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 3, 31)?, "Cesar Chavez Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2020, 3, 31)?, "Cesar Chavez Day")], &mut map, - Country::US_CO, - "United States (Colorado)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 3, 31)?, "Cesar Chavez Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2021, 3, 31)?, "Cesar Chavez Day")], &mut map, - Country::US_CO, - "United States (Colorado)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 3, 31)?, "Cesar Chavez Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2022, 3, 31)?, "Cesar Chavez Day")], &mut map, - Country::US_CO, - "United States (Colorado)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 3, 31)?, "Cesar Chavez Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2023, 3, 31)?, "Cesar Chavez Day")], &mut map, - Country::US_CO, - "United States (Colorado)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 3, 31)?, "Cesar Chavez Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2024, 3, 31)?, "Cesar Chavez Day")], &mut map, - Country::US_CO, - "United States (Colorado)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 3, 31)?, "Cesar Chavez Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2025, 3, 31)?, "Cesar Chavez Day")], &mut map, - Country::US_CO, - "United States (Colorado)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 3, 31)?, "Cesar Chavez Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2026, 3, 31)?, "Cesar Chavez Day")], &mut map, - Country::US_CO, - "United States (Colorado)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 3, 31)?, "Cesar Chavez Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2027, 3, 31)?, "Cesar Chavez Day")], &mut map, - Country::US_CO, - "United States (Colorado)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 3, 31)?, "Cesar Chavez Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2028, 3, 31)?, "Cesar Chavez Day")], &mut map, - Country::US_CO, - "United States (Colorado)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 3, 31)?, "Cesar Chavez Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2029, 3, 31)?, "Cesar Chavez Day")], &mut map, - Country::US_CO, - "United States (Colorado)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 3, 31)?, "Cesar Chavez Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2030, 3, 31)?, "Cesar Chavez Day")], &mut map, - Country::US_CO, - "United States (Colorado)", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/us_ct.rs b/src/data/us_ct.rs index 613002f..624c4b2 100644 --- a/src/data/us_ct.rs +++ b/src/data/us_ct.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "United States (Connecticut)"; +const COUNTY_CODE: Country = Country::US_CT; + /// Generate holiday map for United States (Connecticut). #[allow( unused_mut, @@ -9,35 +12,16 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); - build_year( + let mut national_holidays = de::build(years)?; + + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2000, 2, 12)?, "Lincoln's Birthday"), ( NaiveDate::from_ymd_res(2000, 2, 11)?, @@ -46,162 +30,67 @@ pub fn build( (NaiveDate::from_ymd_res(2000, 4, 21)?, "Good Friday"), ], &mut map, - Country::US_CT, - "United States (Connecticut)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2001, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2001, 4, 13)?, "Good Friday"), ], &mut map, - Country::US_CT, - "United States (Connecticut)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2002, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2002, 3, 29)?, "Good Friday"), ], &mut map, - Country::US_CT, - "United States (Connecticut)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2003, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2003, 4, 18)?, "Good Friday"), ], &mut map, - Country::US_CT, - "United States (Connecticut)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2004, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2004, 4, 9)?, "Good Friday"), ], &mut map, - Country::US_CT, - "United States (Connecticut)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2005, 2, 12)?, "Lincoln's Birthday"), ( NaiveDate::from_ymd_res(2005, 2, 11)?, @@ -210,38 +99,15 @@ pub fn build( (NaiveDate::from_ymd_res(2005, 3, 25)?, "Good Friday"), ], &mut map, - Country::US_CT, - "United States (Connecticut)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2006, 2, 12)?, "Lincoln's Birthday"), ( NaiveDate::from_ymd_res(2006, 2, 13)?, @@ -250,166 +116,67 @@ pub fn build( (NaiveDate::from_ymd_res(2006, 4, 14)?, "Good Friday"), ], &mut map, - Country::US_CT, - "United States (Connecticut)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2007, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2007, 4, 6)?, "Good Friday"), ], &mut map, - Country::US_CT, - "United States (Connecticut)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2008, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2008, 3, 21)?, "Good Friday"), ], &mut map, - Country::US_CT, - "United States (Connecticut)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2009, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2009, 4, 10)?, "Good Friday"), ], &mut map, - Country::US_CT, - "United States (Connecticut)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2010, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2010, 4, 2)?, "Good Friday"), ], &mut map, - Country::US_CT, - "United States (Connecticut)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2011, 2, 12)?, "Lincoln's Birthday"), ( NaiveDate::from_ymd_res(2011, 2, 11)?, @@ -418,38 +185,15 @@ pub fn build( (NaiveDate::from_ymd_res(2011, 4, 22)?, "Good Friday"), ], &mut map, - Country::US_CT, - "United States (Connecticut)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2012, 2, 12)?, "Lincoln's Birthday"), ( NaiveDate::from_ymd_res(2012, 2, 13)?, @@ -458,158 +202,67 @@ pub fn build( (NaiveDate::from_ymd_res(2012, 4, 6)?, "Good Friday"), ], &mut map, - Country::US_CT, - "United States (Connecticut)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2013, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2013, 3, 29)?, "Good Friday"), ], &mut map, - Country::US_CT, - "United States (Connecticut)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2014, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2014, 4, 18)?, "Good Friday"), ], &mut map, - Country::US_CT, - "United States (Connecticut)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2015, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2015, 4, 3)?, "Good Friday"), ], &mut map, - Country::US_CT, - "United States (Connecticut)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2016, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2016, 3, 25)?, "Good Friday"), ], &mut map, - Country::US_CT, - "United States (Connecticut)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2017, 2, 12)?, "Lincoln's Birthday"), ( NaiveDate::from_ymd_res(2017, 2, 13)?, @@ -618,182 +271,67 @@ pub fn build( (NaiveDate::from_ymd_res(2017, 4, 14)?, "Good Friday"), ], &mut map, - Country::US_CT, - "United States (Connecticut)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2018, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2018, 3, 30)?, "Good Friday"), ], &mut map, - Country::US_CT, - "United States (Connecticut)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2019, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2019, 4, 19)?, "Good Friday"), ], &mut map, - Country::US_CT, - "United States (Connecticut)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2020, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2020, 4, 10)?, "Good Friday"), ], &mut map, - Country::US_CT, - "United States (Connecticut)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2021, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2021, 4, 2)?, "Good Friday"), ], &mut map, - Country::US_CT, - "United States (Connecticut)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2022, 2, 12)?, "Lincoln's Birthday"), ( NaiveDate::from_ymd_res(2022, 2, 11)?, @@ -802,42 +340,15 @@ pub fn build( (NaiveDate::from_ymd_res(2022, 4, 15)?, "Good Friday"), ], &mut map, - Country::US_CT, - "United States (Connecticut)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2023, 2, 12)?, "Lincoln's Birthday"), ( NaiveDate::from_ymd_res(2023, 2, 13)?, @@ -846,186 +357,67 @@ pub fn build( (NaiveDate::from_ymd_res(2023, 4, 7)?, "Good Friday"), ], &mut map, - Country::US_CT, - "United States (Connecticut)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2024, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2024, 3, 29)?, "Good Friday"), ], &mut map, - Country::US_CT, - "United States (Connecticut)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2025, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2025, 4, 18)?, "Good Friday"), ], &mut map, - Country::US_CT, - "United States (Connecticut)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2026, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2026, 4, 3)?, "Good Friday"), ], &mut map, - Country::US_CT, - "United States (Connecticut)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2027, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2027, 3, 26)?, "Good Friday"), ], &mut map, - Country::US_CT, - "United States (Connecticut)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2028, 2, 12)?, "Lincoln's Birthday"), ( NaiveDate::from_ymd_res(2028, 2, 11)?, @@ -1034,76 +426,34 @@ pub fn build( (NaiveDate::from_ymd_res(2028, 4, 14)?, "Good Friday"), ], &mut map, - Country::US_CT, - "United States (Connecticut)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2029, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2029, 3, 30)?, "Good Friday"), ], &mut map, - Country::US_CT, - "United States (Connecticut)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2030, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2030, 4, 19)?, "Good Friday"), ], &mut map, - Country::US_CT, - "United States (Connecticut)", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/us_dc.rs b/src/data/us_dc.rs index 95da2f0..ff98f72 100644 --- a/src/data/us_dc.rs +++ b/src/data/us_dc.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "United States (District of Columbia)"; +const COUNTY_CODE: Country = Country::US_DC; + /// Generate holiday map for United States (District of Columbia). #[allow( unused_mut, @@ -9,1104 +12,381 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); - build_year( + let mut national_holidays = de::build(years)?; + + build_subdivision_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 national_holidays, + [], &mut map, - Country::US_DC, - "United States (District of Columbia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 1, 20)?, "Inauguration Day"), - (NaiveDate::from_ymd_res(2001, 10, 8)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2001, 1, 20)?, "Inauguration Day")], &mut map, - Country::US_DC, - "United States (District of Columbia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::US_DC, - "United States (District of Columbia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::US_DC, - "United States (District of Columbia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::US_DC, - "United States (District of Columbia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2005, 1, 20)?, "Inauguration Day"), (NaiveDate::from_ymd_res(2005, 4, 16)?, "Emancipation Day"), ( NaiveDate::from_ymd_res(2005, 4, 15)?, "Emancipation Day (observed)", ), - (NaiveDate::from_ymd_res(2005, 10, 10)?, "Columbus Day"), ], &mut map, - Country::US_DC, - "United States (District of Columbia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2006, 4, 16)?, "Emancipation Day"), ( NaiveDate::from_ymd_res(2006, 4, 17)?, "Emancipation Day (observed)", ), - (NaiveDate::from_ymd_res(2006, 10, 9)?, "Columbus Day"), ], &mut map, - Country::US_DC, - "United States (District of Columbia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 16)?, "Emancipation Day"), - (NaiveDate::from_ymd_res(2007, 10, 8)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2007, 4, 16)?, "Emancipation Day")], &mut map, - Country::US_DC, - "United States (District of Columbia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 16)?, "Emancipation Day"), - (NaiveDate::from_ymd_res(2008, 10, 13)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2008, 4, 16)?, "Emancipation Day")], &mut map, - Country::US_DC, - "United States (District of Columbia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2009, 1, 20)?, "Inauguration Day"), (NaiveDate::from_ymd_res(2009, 4, 16)?, "Emancipation Day"), - (NaiveDate::from_ymd_res(2009, 10, 12)?, "Columbus Day"), ], &mut map, - Country::US_DC, - "United States (District of Columbia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 16)?, "Emancipation Day"), - (NaiveDate::from_ymd_res(2010, 10, 11)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2010, 4, 16)?, "Emancipation Day")], &mut map, - Country::US_DC, - "United States (District of Columbia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2011, 4, 16)?, "Emancipation Day"), ( NaiveDate::from_ymd_res(2011, 4, 15)?, "Emancipation Day (observed)", ), - (NaiveDate::from_ymd_res(2011, 10, 10)?, "Columbus Day"), ], &mut map, - Country::US_DC, - "United States (District of Columbia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 16)?, "Emancipation Day"), - (NaiveDate::from_ymd_res(2012, 10, 8)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2012, 4, 16)?, "Emancipation Day")], &mut map, - Country::US_DC, - "United States (District of Columbia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Inauguration Day (observed); Martin Luther King Jr. Day", - ), - ( - NaiveDate::from_ymd_res(2013, 2, 18)?, - "Washington's Birthday", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2013, 1, 20)?, "Inauguration Day"), (NaiveDate::from_ymd_res(2013, 4, 16)?, "Emancipation Day"), - (NaiveDate::from_ymd_res(2013, 10, 14)?, "Columbus Day"), ], &mut map, - Country::US_DC, - "United States (District of Columbia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 16)?, "Emancipation Day"), - (NaiveDate::from_ymd_res(2014, 10, 13)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2014, 4, 16)?, "Emancipation Day")], &mut map, - Country::US_DC, - "United States (District of Columbia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 16)?, "Emancipation Day"), - (NaiveDate::from_ymd_res(2015, 10, 12)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2015, 4, 16)?, "Emancipation Day")], &mut map, - Country::US_DC, - "United States (District of Columbia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2016, 4, 16)?, "Emancipation Day"), ( NaiveDate::from_ymd_res(2016, 4, 15)?, "Emancipation Day (observed)", ), - (NaiveDate::from_ymd_res(2016, 10, 10)?, "Columbus Day"), ], &mut map, - Country::US_DC, - "United States (District of Columbia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2017, 1, 20)?, "Inauguration Day"), (NaiveDate::from_ymd_res(2017, 4, 16)?, "Emancipation Day"), ( NaiveDate::from_ymd_res(2017, 4, 17)?, "Emancipation Day (observed)", ), - (NaiveDate::from_ymd_res(2017, 10, 9)?, "Columbus Day"), ], &mut map, - Country::US_DC, - "United States (District of Columbia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 16)?, "Emancipation Day"), - (NaiveDate::from_ymd_res(2018, 10, 8)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2018, 4, 16)?, "Emancipation Day")], &mut map, - Country::US_DC, - "United States (District of Columbia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 16)?, "Emancipation Day"), - ( - NaiveDate::from_ymd_res(2019, 10, 14)?, - "Indigenous Peoples' Day", - ), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2019, 4, 16)?, "Emancipation Day")], &mut map, - Country::US_DC, - "United States (District of Columbia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 16)?, "Emancipation Day"), - ( - NaiveDate::from_ymd_res(2020, 10, 12)?, - "Indigenous Peoples' Day", - ), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2020, 4, 16)?, "Emancipation Day")], &mut map, - Country::US_DC, - "United States (District of Columbia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2021, 1, 20)?, "Inauguration Day"), (NaiveDate::from_ymd_res(2021, 4, 16)?, "Emancipation Day"), - ( - NaiveDate::from_ymd_res(2021, 10, 11)?, - "Indigenous Peoples' Day", - ), ], &mut map, - Country::US_DC, - "United States (District of Columbia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2022, 4, 16)?, "Emancipation Day"), ( NaiveDate::from_ymd_res(2022, 4, 15)?, "Emancipation Day (observed)", ), - ( - NaiveDate::from_ymd_res(2022, 10, 10)?, - "Indigenous Peoples' Day", - ), ], &mut map, - Country::US_DC, - "United States (District of Columbia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2023, 4, 16)?, "Emancipation Day"), ( NaiveDate::from_ymd_res(2023, 4, 17)?, "Emancipation Day (observed)", ), - ( - NaiveDate::from_ymd_res(2023, 10, 9)?, - "Indigenous Peoples' Day", - ), ], &mut map, - Country::US_DC, - "United States (District of Columbia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 16)?, "Emancipation Day"), - ( - NaiveDate::from_ymd_res(2024, 10, 14)?, - "Indigenous Peoples' Day", - ), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2024, 4, 16)?, "Emancipation Day")], &mut map, - Country::US_DC, - "United States (District of Columbia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Inauguration Day; Martin Luther King Jr. Day", - ), - ( - NaiveDate::from_ymd_res(2025, 2, 17)?, - "Washington's Birthday", - ), - (NaiveDate::from_ymd_res(2025, 4, 16)?, "Emancipation Day"), - ( - NaiveDate::from_ymd_res(2025, 10, 13)?, - "Indigenous Peoples' Day", - ), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2025, 4, 16)?, "Emancipation Day")], &mut map, - Country::US_DC, - "United States (District of Columbia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 16)?, "Emancipation Day"), - ( - NaiveDate::from_ymd_res(2026, 10, 12)?, - "Indigenous Peoples' Day", - ), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2026, 4, 16)?, "Emancipation Day")], &mut map, - Country::US_DC, - "United States (District of Columbia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 16)?, "Emancipation Day"), - ( - NaiveDate::from_ymd_res(2027, 10, 11)?, - "Indigenous Peoples' Day", - ), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2027, 4, 16)?, "Emancipation Day")], &mut map, - Country::US_DC, - "United States (District of Columbia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2028, 4, 16)?, "Emancipation Day"), ( NaiveDate::from_ymd_res(2028, 4, 17)?, "Emancipation Day (observed)", ), - ( - NaiveDate::from_ymd_res(2028, 10, 9)?, - "Indigenous Peoples' Day", - ), ], &mut map, - Country::US_DC, - "United States (District of Columbia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2029, 1, 20)?, "Inauguration Day"), (NaiveDate::from_ymd_res(2029, 4, 16)?, "Emancipation Day"), - ( - NaiveDate::from_ymd_res(2029, 10, 8)?, - "Indigenous Peoples' Day", - ), ], &mut map, - Country::US_DC, - "United States (District of Columbia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 16)?, "Emancipation Day"), - ( - NaiveDate::from_ymd_res(2030, 10, 14)?, - "Indigenous Peoples' Day", - ), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2030, 4, 16)?, "Emancipation Day")], &mut map, - Country::US_DC, - "United States (District of Columbia)", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/us_de.rs b/src/data/us_de.rs index c2aa81c..4a5aa1a 100644 --- a/src/data/us_de.rs +++ b/src/data/us_de.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "United States (Delaware)"; +const COUNTY_CODE: Country = Country::US_DE; + /// Generate holiday map for United States (Delaware). #[allow( unused_mut, @@ -9,30 +12,16 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); - build_year( + let mut national_holidays = de::build(years)?; + + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2000, 4, 21)?, "Good Friday"), ( NaiveDate::from_ymd_res(2000, 11, 24)?, @@ -40,29 +29,15 @@ pub fn build( ), ], &mut map, - Country::US_DE, - "United States (Delaware)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2001, 4, 13)?, "Good Friday"), ( NaiveDate::from_ymd_res(2001, 11, 23)?, @@ -70,25 +45,15 @@ pub fn build( ), ], &mut map, - Country::US_DE, - "United States (Delaware)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2002, 3, 29)?, "Good Friday"), ( NaiveDate::from_ymd_res(2002, 11, 29)?, @@ -96,25 +61,15 @@ pub fn build( ), ], &mut map, - Country::US_DE, - "United States (Delaware)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2003, 4, 18)?, "Good Friday"), ( NaiveDate::from_ymd_res(2003, 11, 28)?, @@ -122,37 +77,15 @@ pub fn build( ), ], &mut map, - Country::US_DE, - "United States (Delaware)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2004, 4, 9)?, "Good Friday"), ( NaiveDate::from_ymd_res(2004, 11, 26)?, @@ -160,29 +93,15 @@ pub fn build( ), ], &mut map, - Country::US_DE, - "United States (Delaware)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2005, 3, 25)?, "Good Friday"), ( NaiveDate::from_ymd_res(2005, 11, 25)?, @@ -190,33 +109,15 @@ pub fn build( ), ], &mut map, - Country::US_DE, - "United States (Delaware)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2006, 4, 14)?, "Good Friday"), ( NaiveDate::from_ymd_res(2006, 11, 24)?, @@ -224,29 +125,15 @@ pub fn build( ), ], &mut map, - Country::US_DE, - "United States (Delaware)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2007, 4, 6)?, "Good Friday"), ( NaiveDate::from_ymd_res(2007, 11, 23)?, @@ -254,25 +141,15 @@ pub fn build( ), ], &mut map, - Country::US_DE, - "United States (Delaware)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2008, 3, 21)?, "Good Friday"), (NaiveDate::from_ymd_res(2008, 11, 4)?, "Election Day"), ( @@ -281,29 +158,15 @@ pub fn build( ), ], &mut map, - Country::US_DE, - "United States (Delaware)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2009, 4, 10)?, "Good Friday"), ( NaiveDate::from_ymd_res(2009, 11, 27)?, @@ -311,37 +174,15 @@ pub fn build( ), ], &mut map, - Country::US_DE, - "United States (Delaware)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2010, 4, 2)?, "Good Friday"), (NaiveDate::from_ymd_res(2010, 11, 2)?, "Election Day"), ( @@ -350,29 +191,15 @@ pub fn build( ), ], &mut map, - Country::US_DE, - "United States (Delaware)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2011, 4, 22)?, "Good Friday"), ( NaiveDate::from_ymd_res(2011, 11, 25)?, @@ -380,33 +207,15 @@ pub fn build( ), ], &mut map, - Country::US_DE, - "United States (Delaware)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2012, 4, 6)?, "Good Friday"), (NaiveDate::from_ymd_res(2012, 11, 6)?, "Election Day"), ( @@ -415,25 +224,15 @@ pub fn build( ), ], &mut map, - Country::US_DE, - "United States (Delaware)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2013, 3, 29)?, "Good Friday"), ( NaiveDate::from_ymd_res(2013, 11, 29)?, @@ -441,25 +240,15 @@ pub fn build( ), ], &mut map, - Country::US_DE, - "United States (Delaware)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2014, 4, 18)?, "Good Friday"), (NaiveDate::from_ymd_res(2014, 11, 4)?, "Election Day"), ( @@ -468,29 +257,15 @@ pub fn build( ), ], &mut map, - Country::US_DE, - "United States (Delaware)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2015, 4, 3)?, "Good Friday"), ( NaiveDate::from_ymd_res(2015, 11, 27)?, @@ -498,29 +273,15 @@ pub fn build( ), ], &mut map, - Country::US_DE, - "United States (Delaware)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2016, 3, 25)?, "Good Friday"), (NaiveDate::from_ymd_res(2016, 11, 8)?, "Election Day"), ( @@ -529,33 +290,15 @@ pub fn build( ), ], &mut map, - Country::US_DE, - "United States (Delaware)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2017, 4, 14)?, "Good Friday"), ( NaiveDate::from_ymd_res(2017, 11, 24)?, @@ -563,29 +306,15 @@ pub fn build( ), ], &mut map, - Country::US_DE, - "United States (Delaware)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2018, 3, 30)?, "Good Friday"), (NaiveDate::from_ymd_res(2018, 11, 6)?, "Election Day"), ( @@ -594,25 +323,15 @@ pub fn build( ), ], &mut map, - Country::US_DE, - "United States (Delaware)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2019, 4, 19)?, "Good Friday"), ( NaiveDate::from_ymd_res(2019, 11, 29)?, @@ -620,29 +339,15 @@ pub fn build( ), ], &mut map, - Country::US_DE, - "United States (Delaware)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2020, 4, 10)?, "Good Friday"), (NaiveDate::from_ymd_res(2020, 11, 3)?, "Election Day"), ( @@ -651,45 +356,15 @@ pub fn build( ), ], &mut map, - Country::US_DE, - "United States (Delaware)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2021, 4, 2)?, "Good Friday"), ( NaiveDate::from_ymd_res(2021, 11, 26)?, @@ -697,37 +372,15 @@ pub fn build( ), ], &mut map, - Country::US_DE, - "United States (Delaware)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2022, 4, 15)?, "Good Friday"), (NaiveDate::from_ymd_res(2022, 11, 8)?, "Election Day"), ( @@ -736,37 +389,15 @@ pub fn build( ), ], &mut map, - Country::US_DE, - "United States (Delaware)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2023, 4, 7)?, "Good Friday"), ( NaiveDate::from_ymd_res(2023, 11, 24)?, @@ -774,29 +405,15 @@ pub fn build( ), ], &mut map, - Country::US_DE, - "United States (Delaware)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2024, 3, 29)?, "Good Friday"), (NaiveDate::from_ymd_res(2024, 11, 5)?, "Election Day"), ( @@ -805,29 +422,15 @@ pub fn build( ), ], &mut map, - Country::US_DE, - "United States (Delaware)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2025, 4, 18)?, "Good Friday"), ( NaiveDate::from_ymd_res(2025, 11, 28)?, @@ -835,33 +438,15 @@ pub fn build( ), ], &mut map, - Country::US_DE, - "United States (Delaware)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2026, 4, 3)?, "Good Friday"), (NaiveDate::from_ymd_res(2026, 11, 3)?, "Election Day"), ( @@ -870,45 +455,15 @@ pub fn build( ), ], &mut map, - Country::US_DE, - "United States (Delaware)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2027, 3, 26)?, "Good Friday"), ( NaiveDate::from_ymd_res(2027, 11, 26)?, @@ -916,33 +471,15 @@ pub fn build( ), ], &mut map, - Country::US_DE, - "United States (Delaware)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2028, 4, 14)?, "Good Friday"), (NaiveDate::from_ymd_res(2028, 11, 7)?, "Election Day"), ( @@ -951,33 +488,15 @@ pub fn build( ), ], &mut map, - Country::US_DE, - "United States (Delaware)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2029, 3, 30)?, "Good Friday"), ( NaiveDate::from_ymd_res(2029, 11, 23)?, @@ -985,29 +504,15 @@ pub fn build( ), ], &mut map, - Country::US_DE, - "United States (Delaware)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2030, 4, 19)?, "Good Friday"), (NaiveDate::from_ymd_res(2030, 11, 5)?, "Election Day"), ( @@ -1016,8 +521,8 @@ pub fn build( ), ], &mut map, - Country::US_DE, - "United States (Delaware)", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/us_fl.rs b/src/data/us_fl.rs index 95f3a91..1872f41 100644 --- a/src/data/us_fl.rs +++ b/src/data/us_fl.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "United States (Florida)"; +const COUNTY_CODE: Country = Country::US_FL; + /// Generate holiday map for United States (Florida). #[allow( unused_mut, @@ -9,357 +12,159 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); - build_year( + let mut national_holidays = de::build(years)?; + + build_subdivision_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, 11, 24)?, - "Friday After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2000, 11, 24)?, + "Friday After Thanksgiving", + )], &mut map, - Country::US_FL, - "United States (Florida)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 11, 23)?, - "Friday After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2001, 11, 23)?, + "Friday After Thanksgiving", + )], &mut map, - Country::US_FL, - "United States (Florida)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 11, 29)?, - "Friday After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2002, 11, 29)?, + "Friday After Thanksgiving", + )], &mut map, - Country::US_FL, - "United States (Florida)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 11, 28)?, - "Friday After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2003, 11, 28)?, + "Friday After Thanksgiving", + )], &mut map, - Country::US_FL, - "United States (Florida)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 11, 26)?, - "Friday After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2004, 11, 26)?, + "Friday After Thanksgiving", + )], &mut map, - Country::US_FL, - "United States (Florida)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 11, 25)?, - "Friday After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2005, 11, 25)?, + "Friday After Thanksgiving", + )], &mut map, - Country::US_FL, - "United States (Florida)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 11, 24)?, - "Friday After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2006, 11, 24)?, + "Friday After Thanksgiving", + )], &mut map, - Country::US_FL, - "United States (Florida)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 11, 23)?, - "Friday After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2007, 11, 23)?, + "Friday After Thanksgiving", + )], &mut map, - Country::US_FL, - "United States (Florida)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 11, 28)?, - "Friday After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2008, 11, 28)?, + "Friday After Thanksgiving", + )], &mut map, - Country::US_FL, - "United States (Florida)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 11, 27)?, - "Friday After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2009, 11, 27)?, + "Friday After Thanksgiving", + )], &mut map, - Country::US_FL, - "United States (Florida)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 11, 26)?, - "Friday After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2010, 11, 26)?, + "Friday After Thanksgiving", + )], &mut map, - Country::US_FL, - "United States (Florida)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2011, 2, 15)?, "Susan B. Anthony Day", @@ -370,33 +175,15 @@ pub fn build( ), ], &mut map, - Country::US_FL, - "United States (Florida)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2012, 2, 15)?, "Susan B. Anthony Day", @@ -407,25 +194,15 @@ pub fn build( ), ], &mut map, - Country::US_FL, - "United States (Florida)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2013, 2, 15)?, "Susan B. Anthony Day", @@ -436,25 +213,15 @@ pub fn build( ), ], &mut map, - Country::US_FL, - "United States (Florida)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2014, 2, 15)?, "Susan B. Anthony Day", @@ -465,29 +232,15 @@ pub fn build( ), ], &mut map, - Country::US_FL, - "United States (Florida)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2015, 2, 15)?, "Susan B. Anthony Day", @@ -498,66 +251,28 @@ pub fn build( ), ], &mut map, - Country::US_FL, - "United States (Florida)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Susan B. Anthony Day", - ), - ( - NaiveDate::from_ymd_res(2016, 11, 25)?, - "Friday After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2016, 11, 25)?, + "Friday After Thanksgiving", + )], &mut map, - Country::US_FL, - "United States (Florida)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2017, 2, 15)?, "Susan B. Anthony Day", @@ -568,29 +283,15 @@ pub fn build( ), ], &mut map, - Country::US_FL, - "United States (Florida)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2018, 2, 15)?, "Susan B. Anthony Day", @@ -601,25 +302,15 @@ pub fn build( ), ], &mut map, - Country::US_FL, - "United States (Florida)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2019, 2, 15)?, "Susan B. Anthony Day", @@ -630,29 +321,15 @@ pub fn build( ), ], &mut map, - Country::US_FL, - "United States (Florida)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2020, 2, 15)?, "Susan B. Anthony Day", @@ -663,86 +340,28 @@ pub fn build( ), ], &mut map, - Country::US_FL, - "United States (Florida)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Susan B. Anthony Day", - ), - ( - NaiveDate::from_ymd_res(2021, 11, 26)?, - "Friday After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2021, 11, 26)?, + "Friday After Thanksgiving", + )], &mut map, - Country::US_FL, - "United States (Florida)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2022, 2, 15)?, "Susan B. Anthony Day", @@ -753,37 +372,15 @@ pub fn build( ), ], &mut map, - Country::US_FL, - "United States (Florida)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2023, 2, 15)?, "Susan B. Anthony Day", @@ -794,29 +391,15 @@ pub fn build( ), ], &mut map, - Country::US_FL, - "United States (Florida)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2024, 2, 15)?, "Susan B. Anthony Day", @@ -827,29 +410,15 @@ pub fn build( ), ], &mut map, - Country::US_FL, - "United States (Florida)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2025, 2, 15)?, "Susan B. Anthony Day", @@ -860,33 +429,15 @@ pub fn build( ), ], &mut map, - Country::US_FL, - "United States (Florida)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2026, 2, 15)?, "Susan B. Anthony Day", @@ -897,82 +448,28 @@ pub fn build( ), ], &mut map, - Country::US_FL, - "United States (Florida)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Susan B. Anthony Day", - ), - ( - NaiveDate::from_ymd_res(2027, 11, 26)?, - "Friday After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2027, 11, 26)?, + "Friday After Thanksgiving", + )], &mut map, - Country::US_FL, - "United States (Florida)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2028, 2, 15)?, "Susan B. Anthony Day", @@ -983,33 +480,15 @@ pub fn build( ), ], &mut map, - Country::US_FL, - "United States (Florida)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2029, 2, 15)?, "Susan B. Anthony Day", @@ -1020,29 +499,15 @@ pub fn build( ), ], &mut map, - Country::US_FL, - "United States (Florida)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2030, 2, 15)?, "Susan B. Anthony Day", @@ -1053,8 +518,8 @@ pub fn build( ), ], &mut map, - Country::US_FL, - "United States (Florida)", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/us_ga.rs b/src/data/us_ga.rs index bf135dc..85b2369 100644 --- a/src/data/us_ga.rs +++ b/src/data/us_ga.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "United States (Georgia)"; +const COUNTY_CODE: Country = Country::US_GA; + /// Generate holiday map for United States (Georgia). #[allow( unused_mut, @@ -9,31 +12,16 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); - build_year( + let mut national_holidays = de::build(years)?; + + build_subdivision_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, 10, 9)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2000, 1, 17)?, - "Robert E. Lee's Birthday", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2000, 4, 24)?, "Confederate Memorial Day", @@ -48,30 +36,15 @@ pub fn build( ), ], &mut map, - Country::US_GA, - "United States (Georgia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 10, 8)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2001, 1, 15)?, - "Robert E. Lee's Birthday", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2001, 4, 23)?, "Confederate Memorial Day", @@ -86,26 +59,15 @@ pub fn build( ), ], &mut map, - Country::US_GA, - "United States (Georgia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 10, 14)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2002, 1, 21)?, - "Robert E. Lee's Birthday", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2002, 4, 22)?, "Confederate Memorial Day", @@ -120,26 +82,15 @@ pub fn build( ), ], &mut map, - Country::US_GA, - "United States (Georgia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 10, 13)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2003, 1, 20)?, - "Robert E. Lee's Birthday", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2003, 4, 28)?, "Confederate Memorial Day", @@ -154,38 +105,15 @@ pub fn build( ), ], &mut map, - Country::US_GA, - "United States (Georgia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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); Washington's Birthday", - ), - (NaiveDate::from_ymd_res(2004, 10, 11)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2004, 1, 19)?, - "Robert E. Lee's Birthday", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2004, 4, 26)?, "Confederate Memorial Day", @@ -196,30 +124,15 @@ pub fn build( ), ], &mut map, - Country::US_GA, - "United States (Georgia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 10, 10)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2005, 1, 17)?, - "Robert E. Lee's Birthday", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2005, 4, 25)?, "Confederate Memorial Day", @@ -234,34 +147,15 @@ pub fn build( ), ], &mut map, - Country::US_GA, - "United States (Georgia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 10, 9)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2006, 1, 16)?, - "Robert E. Lee's Birthday", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2006, 4, 24)?, "Confederate Memorial Day", @@ -276,30 +170,15 @@ pub fn build( ), ], &mut map, - Country::US_GA, - "United States (Georgia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 10, 8)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2007, 1, 15)?, - "Robert E. Lee's Birthday", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2007, 4, 23)?, "Confederate Memorial Day", @@ -314,26 +193,15 @@ pub fn build( ), ], &mut map, - Country::US_GA, - "United States (Georgia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 10, 13)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2008, 1, 21)?, - "Robert E. Lee's Birthday", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2008, 4, 28)?, "Confederate Memorial Day", @@ -348,30 +216,15 @@ pub fn build( ), ], &mut map, - Country::US_GA, - "United States (Georgia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 10, 12)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2009, 1, 19)?, - "Robert E. Lee's Birthday", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2009, 4, 27)?, "Confederate Memorial Day", @@ -386,38 +239,15 @@ pub fn build( ), ], &mut map, - Country::US_GA, - "United States (Georgia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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); Washington's Birthday", - ), - (NaiveDate::from_ymd_res(2010, 10, 11)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2010, 1, 18)?, - "Robert E. Lee's Birthday", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2010, 4, 26)?, "Confederate Memorial Day", @@ -428,30 +258,15 @@ pub fn build( ), ], &mut map, - Country::US_GA, - "United States (Georgia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 10, 10)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2011, 1, 17)?, - "Robert E. Lee's Birthday", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2011, 4, 25)?, "Confederate Memorial Day", @@ -466,34 +281,15 @@ pub fn build( ), ], &mut map, - Country::US_GA, - "United States (Georgia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 10, 8)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2012, 1, 16)?, - "Martin Luther King Jr. Day", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2012, 4, 23)?, "Confederate Memorial Day", @@ -508,26 +304,15 @@ pub fn build( ), ], &mut map, - Country::US_GA, - "United States (Georgia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 10, 14)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2013, 1, 21)?, - "Martin Luther King Jr. Day", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2013, 4, 22)?, "Confederate Memorial Day", @@ -542,26 +327,15 @@ pub fn build( ), ], &mut map, - Country::US_GA, - "United States (Georgia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 10, 13)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2014, 1, 20)?, - "Martin Luther King Jr. Day", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2014, 4, 28)?, "Confederate Memorial Day", @@ -576,30 +350,15 @@ pub fn build( ), ], &mut map, - Country::US_GA, - "United States (Georgia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 10, 12)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2015, 1, 19)?, - "Martin Luther King Jr. Day", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2015, 4, 27)?, "Confederate Memorial Day", @@ -614,30 +373,15 @@ pub fn build( ), ], &mut map, - Country::US_GA, - "United States (Georgia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 10, 10)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2016, 1, 18)?, - "Martin Luther King Jr. Day", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2016, 4, 25)?, "State Holiday"), (NaiveDate::from_ymd_res(2016, 11, 25)?, "State Holiday"), ( @@ -646,34 +390,15 @@ pub fn build( ), ], &mut map, - Country::US_GA, - "United States (Georgia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 10, 9)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2017, 1, 16)?, - "Martin Luther King Jr. Day", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2017, 4, 24)?, "State Holiday"), (NaiveDate::from_ymd_res(2017, 11, 24)?, "State Holiday"), ( @@ -682,30 +407,15 @@ pub fn build( ), ], &mut map, - Country::US_GA, - "United States (Georgia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 10, 8)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2018, 1, 15)?, - "Martin Luther King Jr. Day", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2018, 4, 23)?, "State Holiday"), (NaiveDate::from_ymd_res(2018, 11, 23)?, "State Holiday"), ( @@ -714,26 +424,15 @@ pub fn build( ), ], &mut map, - Country::US_GA, - "United States (Georgia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 10, 14)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2019, 1, 21)?, - "Martin Luther King Jr. Day", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2019, 4, 22)?, "State Holiday"), (NaiveDate::from_ymd_res(2019, 11, 29)?, "State Holiday"), ( @@ -742,30 +441,15 @@ pub fn build( ), ], &mut map, - Country::US_GA, - "United States (Georgia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 10, 12)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2020, 1, 20)?, - "Martin Luther King Jr. Day", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2020, 4, 10)?, "State Holiday"), (NaiveDate::from_ymd_res(2020, 11, 27)?, "State Holiday"), ( @@ -774,82 +458,28 @@ pub fn build( ), ], &mut map, - Country::US_GA, - "United States (Georgia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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); Washington's Birthday", - ), - (NaiveDate::from_ymd_res(2021, 10, 11)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2021, 1, 18)?, - "Martin Luther King Jr. Day", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2021, 4, 26)?, "State Holiday"), (NaiveDate::from_ymd_res(2021, 11, 26)?, "State Holiday"), ], &mut map, - Country::US_GA, - "United States (Georgia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 10, 10)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2022, 1, 17)?, - "Martin Luther King Jr. Day", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2022, 4, 25)?, "State Holiday"), (NaiveDate::from_ymd_res(2022, 11, 25)?, "State Holiday"), ( @@ -858,38 +488,15 @@ pub fn build( ), ], &mut map, - Country::US_GA, - "United States (Georgia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 10, 9)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2023, 1, 16)?, - "Martin Luther King Jr. Day", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2023, 4, 24)?, "State Holiday"), (NaiveDate::from_ymd_res(2023, 11, 24)?, "State Holiday"), ( @@ -898,30 +505,15 @@ pub fn build( ), ], &mut map, - Country::US_GA, - "United States (Georgia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 10, 14)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2024, 1, 15)?, - "Martin Luther King Jr. Day", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2024, 4, 22)?, "State Holiday"), (NaiveDate::from_ymd_res(2024, 11, 29)?, "State Holiday"), ( @@ -930,30 +522,15 @@ pub fn build( ), ], &mut map, - Country::US_GA, - "United States (Georgia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 10, 13)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2025, 1, 20)?, - "Martin Luther King Jr. Day", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2025, 4, 28)?, "State Holiday"), (NaiveDate::from_ymd_res(2025, 11, 28)?, "State Holiday"), ( @@ -962,34 +539,15 @@ pub fn build( ), ], &mut map, - Country::US_GA, - "United States (Georgia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 10, 12)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2026, 1, 19)?, - "Martin Luther King Jr. Day", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2026, 4, 27)?, "State Holiday"), (NaiveDate::from_ymd_res(2026, 11, 27)?, "State Holiday"), ( @@ -998,78 +556,28 @@ pub fn build( ), ], &mut map, - Country::US_GA, - "United States (Georgia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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); Washington's Birthday", - ), - (NaiveDate::from_ymd_res(2027, 10, 11)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2027, 1, 18)?, - "Martin Luther King Jr. Day", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2027, 4, 26)?, "State Holiday"), (NaiveDate::from_ymd_res(2027, 11, 26)?, "State Holiday"), ], &mut map, - Country::US_GA, - "United States (Georgia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 10, 9)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2028, 1, 17)?, - "Martin Luther King Jr. Day", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2028, 4, 24)?, "State Holiday"), (NaiveDate::from_ymd_res(2028, 11, 24)?, "State Holiday"), ( @@ -1078,34 +586,15 @@ pub fn build( ), ], &mut map, - Country::US_GA, - "United States (Georgia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 10, 8)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2029, 1, 15)?, - "Martin Luther King Jr. Day", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2029, 4, 23)?, "State Holiday"), (NaiveDate::from_ymd_res(2029, 11, 23)?, "State Holiday"), ( @@ -1114,30 +603,15 @@ pub fn build( ), ], &mut map, - Country::US_GA, - "United States (Georgia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 10, 14)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2030, 1, 21)?, - "Martin Luther King Jr. Day", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2030, 4, 22)?, "State Holiday"), (NaiveDate::from_ymd_res(2030, 11, 29)?, "State Holiday"), ( @@ -1146,8 +620,8 @@ pub fn build( ), ], &mut map, - Country::US_GA, - "United States (Georgia)", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/us_gu.rs b/src/data/us_gu.rs index 2958fb1..9e40520 100644 --- a/src/data/us_gu.rs +++ b/src/data/us_gu.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "United States (Guam)"; +const COUNTY_CODE: Country = Country::US_GU; + /// Generate holiday map for United States (Guam). #[allow( unused_mut, @@ -9,34 +12,16 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); - build_year( + let mut national_holidays = de::build(years)?; + + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2000, 3, 6)?, "Guam Discovery Day"), (NaiveDate::from_ymd_res(2000, 4, 21)?, "Good Friday"), ( @@ -47,33 +32,15 @@ pub fn build( (NaiveDate::from_ymd_res(2000, 12, 8)?, "Lady of Camarin Day"), ], &mut map, - Country::US_GU, - "United States (Guam)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2001, 3, 5)?, "Guam Discovery Day"), (NaiveDate::from_ymd_res(2001, 4, 13)?, "Good Friday"), ( @@ -84,29 +51,15 @@ pub fn build( (NaiveDate::from_ymd_res(2001, 12, 8)?, "Lady of Camarin Day"), ], &mut map, - Country::US_GU, - "United States (Guam)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2002, 3, 4)?, "Guam Discovery Day"), (NaiveDate::from_ymd_res(2002, 3, 29)?, "Good Friday"), ( @@ -117,29 +70,15 @@ pub fn build( (NaiveDate::from_ymd_res(2002, 12, 8)?, "Lady of Camarin Day"), ], &mut map, - Country::US_GU, - "United States (Guam)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2003, 3, 3)?, "Guam Discovery Day"), (NaiveDate::from_ymd_res(2003, 4, 18)?, "Good Friday"), ( @@ -150,41 +89,15 @@ pub fn build( (NaiveDate::from_ymd_res(2003, 12, 8)?, "Lady of Camarin Day"), ], &mut map, - Country::US_GU, - "United States (Guam)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2004, 3, 1)?, "Guam Discovery Day"), (NaiveDate::from_ymd_res(2004, 4, 9)?, "Good Friday"), ( @@ -195,33 +108,15 @@ pub fn build( (NaiveDate::from_ymd_res(2004, 12, 8)?, "Lady of Camarin Day"), ], &mut map, - Country::US_GU, - "United States (Guam)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2005, 3, 7)?, "Guam Discovery Day"), (NaiveDate::from_ymd_res(2005, 3, 25)?, "Good Friday"), ( @@ -232,37 +127,15 @@ pub fn build( (NaiveDate::from_ymd_res(2005, 12, 8)?, "Lady of Camarin Day"), ], &mut map, - Country::US_GU, - "United States (Guam)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2006, 3, 6)?, "Guam Discovery Day"), (NaiveDate::from_ymd_res(2006, 4, 14)?, "Good Friday"), ( @@ -273,33 +146,15 @@ pub fn build( (NaiveDate::from_ymd_res(2006, 12, 8)?, "Lady of Camarin Day"), ], &mut map, - Country::US_GU, - "United States (Guam)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2007, 3, 5)?, "Guam Discovery Day"), (NaiveDate::from_ymd_res(2007, 4, 6)?, "Good Friday"), ( @@ -310,29 +165,15 @@ pub fn build( (NaiveDate::from_ymd_res(2007, 12, 8)?, "Lady of Camarin Day"), ], &mut map, - Country::US_GU, - "United States (Guam)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2008, 3, 3)?, "Guam Discovery Day"), (NaiveDate::from_ymd_res(2008, 3, 21)?, "Good Friday"), ( @@ -343,33 +184,15 @@ pub fn build( (NaiveDate::from_ymd_res(2008, 12, 8)?, "Lady of Camarin Day"), ], &mut map, - Country::US_GU, - "United States (Guam)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2009, 3, 2)?, "Guam Discovery Day"), (NaiveDate::from_ymd_res(2009, 4, 10)?, "Good Friday"), ( @@ -380,41 +203,15 @@ pub fn build( (NaiveDate::from_ymd_res(2009, 12, 8)?, "Lady of Camarin Day"), ], &mut map, - Country::US_GU, - "United States (Guam)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2010, 3, 1)?, "Guam Discovery Day"), (NaiveDate::from_ymd_res(2010, 4, 2)?, "Good Friday"), ( @@ -425,33 +222,15 @@ pub fn build( (NaiveDate::from_ymd_res(2010, 12, 8)?, "Lady of Camarin Day"), ], &mut map, - Country::US_GU, - "United States (Guam)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2011, 3, 7)?, "Guam Discovery Day"), (NaiveDate::from_ymd_res(2011, 4, 22)?, "Good Friday"), ( @@ -462,37 +241,15 @@ pub fn build( (NaiveDate::from_ymd_res(2011, 12, 8)?, "Lady of Camarin Day"), ], &mut map, - Country::US_GU, - "United States (Guam)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2012, 3, 5)?, "Guam Discovery Day"), (NaiveDate::from_ymd_res(2012, 4, 6)?, "Good Friday"), ( @@ -503,29 +260,15 @@ pub fn build( (NaiveDate::from_ymd_res(2012, 12, 8)?, "Lady of Camarin Day"), ], &mut map, - Country::US_GU, - "United States (Guam)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2013, 3, 4)?, "Guam Discovery Day"), (NaiveDate::from_ymd_res(2013, 3, 29)?, "Good Friday"), ( @@ -536,29 +279,15 @@ pub fn build( (NaiveDate::from_ymd_res(2013, 12, 8)?, "Lady of Camarin Day"), ], &mut map, - Country::US_GU, - "United States (Guam)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2014, 3, 3)?, "Guam Discovery Day"), (NaiveDate::from_ymd_res(2014, 4, 18)?, "Good Friday"), ( @@ -569,33 +298,15 @@ pub fn build( (NaiveDate::from_ymd_res(2014, 12, 8)?, "Lady of Camarin Day"), ], &mut map, - Country::US_GU, - "United States (Guam)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2015, 3, 2)?, "Guam Discovery Day"), (NaiveDate::from_ymd_res(2015, 4, 3)?, "Good Friday"), ( @@ -606,33 +317,15 @@ pub fn build( (NaiveDate::from_ymd_res(2015, 12, 8)?, "Lady of Camarin Day"), ], &mut map, - Country::US_GU, - "United States (Guam)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2016, 3, 7)?, "Guam Discovery Day"), (NaiveDate::from_ymd_res(2016, 3, 25)?, "Good Friday"), ( @@ -643,37 +336,15 @@ pub fn build( (NaiveDate::from_ymd_res(2016, 12, 8)?, "Lady of Camarin Day"), ], &mut map, - Country::US_GU, - "United States (Guam)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2017, 3, 6)?, "Guam Discovery Day"), (NaiveDate::from_ymd_res(2017, 4, 14)?, "Good Friday"), ( @@ -684,33 +355,15 @@ pub fn build( (NaiveDate::from_ymd_res(2017, 12, 8)?, "Lady of Camarin Day"), ], &mut map, - Country::US_GU, - "United States (Guam)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2018, 3, 5)?, "Guam Discovery Day"), (NaiveDate::from_ymd_res(2018, 3, 30)?, "Good Friday"), ( @@ -721,29 +374,15 @@ pub fn build( (NaiveDate::from_ymd_res(2018, 12, 8)?, "Lady of Camarin Day"), ], &mut map, - Country::US_GU, - "United States (Guam)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2019, 3, 4)?, "Guam Discovery Day"), (NaiveDate::from_ymd_res(2019, 4, 19)?, "Good Friday"), ( @@ -754,33 +393,15 @@ pub fn build( (NaiveDate::from_ymd_res(2019, 12, 8)?, "Lady of Camarin Day"), ], &mut map, - Country::US_GU, - "United States (Guam)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2020, 3, 2)?, "Guam Discovery Day"), (NaiveDate::from_ymd_res(2020, 4, 10)?, "Good Friday"), ( @@ -791,49 +412,15 @@ pub fn build( (NaiveDate::from_ymd_res(2020, 12, 8)?, "Lady of Camarin Day"), ], &mut map, - Country::US_GU, - "United States (Guam)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2021, 3, 1)?, "Guam Discovery Day"), (NaiveDate::from_ymd_res(2021, 4, 2)?, "Good Friday"), ( @@ -844,41 +431,15 @@ pub fn build( (NaiveDate::from_ymd_res(2021, 12, 8)?, "Lady of Camarin Day"), ], &mut map, - Country::US_GU, - "United States (Guam)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2022, 3, 7)?, "Guam Discovery Day"), (NaiveDate::from_ymd_res(2022, 4, 15)?, "Good Friday"), ( @@ -889,41 +450,15 @@ pub fn build( (NaiveDate::from_ymd_res(2022, 12, 8)?, "Lady of Camarin Day"), ], &mut map, - Country::US_GU, - "United States (Guam)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2023, 3, 6)?, "Guam Discovery Day"), (NaiveDate::from_ymd_res(2023, 4, 7)?, "Good Friday"), ( @@ -934,33 +469,15 @@ pub fn build( (NaiveDate::from_ymd_res(2023, 12, 8)?, "Lady of Camarin Day"), ], &mut map, - Country::US_GU, - "United States (Guam)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2024, 3, 4)?, "Guam Discovery Day"), (NaiveDate::from_ymd_res(2024, 3, 29)?, "Good Friday"), ( @@ -971,33 +488,15 @@ pub fn build( (NaiveDate::from_ymd_res(2024, 12, 8)?, "Lady of Camarin Day"), ], &mut map, - Country::US_GU, - "United States (Guam)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2025, 3, 3)?, "Guam Discovery Day"), (NaiveDate::from_ymd_res(2025, 4, 18)?, "Good Friday"), ( @@ -1008,37 +507,15 @@ pub fn build( (NaiveDate::from_ymd_res(2025, 12, 8)?, "Lady of Camarin Day"), ], &mut map, - Country::US_GU, - "United States (Guam)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2026, 3, 2)?, "Guam Discovery Day"), (NaiveDate::from_ymd_res(2026, 4, 3)?, "Good Friday"), ( @@ -1049,49 +526,15 @@ pub fn build( (NaiveDate::from_ymd_res(2026, 12, 8)?, "Lady of Camarin Day"), ], &mut map, - Country::US_GU, - "United States (Guam)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2027, 3, 1)?, "Guam Discovery Day"), (NaiveDate::from_ymd_res(2027, 3, 26)?, "Good Friday"), ( @@ -1102,37 +545,15 @@ pub fn build( (NaiveDate::from_ymd_res(2027, 12, 8)?, "Lady of Camarin Day"), ], &mut map, - Country::US_GU, - "United States (Guam)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2028, 3, 6)?, "Guam Discovery Day"), (NaiveDate::from_ymd_res(2028, 4, 14)?, "Good Friday"), ( @@ -1143,37 +564,15 @@ pub fn build( (NaiveDate::from_ymd_res(2028, 12, 8)?, "Lady of Camarin Day"), ], &mut map, - Country::US_GU, - "United States (Guam)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2029, 3, 5)?, "Guam Discovery Day"), (NaiveDate::from_ymd_res(2029, 3, 30)?, "Good Friday"), ( @@ -1184,33 +583,15 @@ pub fn build( (NaiveDate::from_ymd_res(2029, 12, 8)?, "Lady of Camarin Day"), ], &mut map, - Country::US_GU, - "United States (Guam)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2030, 3, 4)?, "Guam Discovery Day"), (NaiveDate::from_ymd_res(2030, 4, 19)?, "Good Friday"), ( @@ -1221,8 +602,8 @@ pub fn build( (NaiveDate::from_ymd_res(2030, 12, 8)?, "Lady of Camarin Day"), ], &mut map, - Country::US_GU, - "United States (Guam)", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/us_hi.rs b/src/data/us_hi.rs index 7d6ab29..52fb646 100644 --- a/src/data/us_hi.rs +++ b/src/data/us_hi.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "United States (Hawaii)"; +const COUNTY_CODE: Country = Country::US_HI; + /// Generate holiday map for United States (Hawaii). #[allow( unused_mut, @@ -9,34 +12,16 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); - build_year( + let mut national_holidays = de::build(years)?; + + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2000, 3, 26)?, "Prince Jonah Kuhio Kalanianaole Day", @@ -49,33 +34,15 @@ pub fn build( (NaiveDate::from_ymd_res(2000, 8, 18)?, "Statehood Day"), ], &mut map, - Country::US_HI, - "United States (Hawaii)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2001, 3, 26)?, "Prince Jonah Kuhio Kalanianaole Day", @@ -84,29 +51,15 @@ pub fn build( (NaiveDate::from_ymd_res(2001, 8, 17)?, "Statehood Day"), ], &mut map, - Country::US_HI, - "United States (Hawaii)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2002, 3, 26)?, "Prince Jonah Kuhio Kalanianaole Day", @@ -115,29 +68,15 @@ pub fn build( (NaiveDate::from_ymd_res(2002, 8, 16)?, "Statehood Day"), ], &mut map, - Country::US_HI, - "United States (Hawaii)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2003, 3, 26)?, "Prince Jonah Kuhio Kalanianaole Day", @@ -146,41 +85,15 @@ pub fn build( (NaiveDate::from_ymd_res(2003, 8, 15)?, "Statehood Day"), ], &mut map, - Country::US_HI, - "United States (Hawaii)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2004, 3, 26)?, "Prince Jonah Kuhio Kalanianaole Day", @@ -189,33 +102,15 @@ pub fn build( (NaiveDate::from_ymd_res(2004, 8, 20)?, "Statehood Day"), ], &mut map, - Country::US_HI, - "United States (Hawaii)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2005, 3, 26)?, "Prince Jonah Kuhio Kalanianaole Day", @@ -228,37 +123,15 @@ pub fn build( (NaiveDate::from_ymd_res(2005, 8, 19)?, "Statehood Day"), ], &mut map, - Country::US_HI, - "United States (Hawaii)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2006, 3, 26)?, "Prince Jonah Kuhio Kalanianaole Day", @@ -271,33 +144,15 @@ pub fn build( (NaiveDate::from_ymd_res(2006, 8, 18)?, "Statehood Day"), ], &mut map, - Country::US_HI, - "United States (Hawaii)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2007, 3, 26)?, "Prince Jonah Kuhio Kalanianaole Day", @@ -306,29 +161,15 @@ pub fn build( (NaiveDate::from_ymd_res(2007, 8, 17)?, "Statehood Day"), ], &mut map, - Country::US_HI, - "United States (Hawaii)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2008, 3, 26)?, "Prince Jonah Kuhio Kalanianaole Day", @@ -338,33 +179,15 @@ pub fn build( (NaiveDate::from_ymd_res(2008, 11, 4)?, "Election Day"), ], &mut map, - Country::US_HI, - "United States (Hawaii)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2009, 3, 26)?, "Prince Jonah Kuhio Kalanianaole Day", @@ -373,41 +196,15 @@ pub fn build( (NaiveDate::from_ymd_res(2009, 8, 21)?, "Statehood Day"), ], &mut map, - Country::US_HI, - "United States (Hawaii)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2010, 3, 26)?, "Prince Jonah Kuhio Kalanianaole Day", @@ -417,33 +214,15 @@ pub fn build( (NaiveDate::from_ymd_res(2010, 11, 2)?, "Election Day"), ], &mut map, - Country::US_HI, - "United States (Hawaii)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2011, 3, 26)?, "Prince Jonah Kuhio Kalanianaole Day", @@ -460,37 +239,15 @@ pub fn build( (NaiveDate::from_ymd_res(2011, 8, 19)?, "Statehood Day"), ], &mut map, - Country::US_HI, - "United States (Hawaii)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2012, 3, 26)?, "Prince Jonah Kuhio Kalanianaole Day", @@ -500,29 +257,15 @@ pub fn build( (NaiveDate::from_ymd_res(2012, 11, 6)?, "Election Day"), ], &mut map, - Country::US_HI, - "United States (Hawaii)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2013, 3, 26)?, "Prince Jonah Kuhio Kalanianaole Day", @@ -531,29 +274,15 @@ pub fn build( (NaiveDate::from_ymd_res(2013, 8, 16)?, "Statehood Day"), ], &mut map, - Country::US_HI, - "United States (Hawaii)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2014, 3, 26)?, "Prince Jonah Kuhio Kalanianaole Day", @@ -563,33 +292,15 @@ pub fn build( (NaiveDate::from_ymd_res(2014, 11, 4)?, "Election Day"), ], &mut map, - Country::US_HI, - "United States (Hawaii)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2015, 3, 26)?, "Prince Jonah Kuhio Kalanianaole Day", @@ -598,33 +309,15 @@ pub fn build( (NaiveDate::from_ymd_res(2015, 8, 21)?, "Statehood Day"), ], &mut map, - Country::US_HI, - "United States (Hawaii)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2016, 3, 26)?, "Prince Jonah Kuhio Kalanianaole Day", @@ -642,37 +335,15 @@ pub fn build( (NaiveDate::from_ymd_res(2016, 11, 8)?, "Election Day"), ], &mut map, - Country::US_HI, - "United States (Hawaii)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2017, 3, 26)?, "Prince Jonah Kuhio Kalanianaole Day", @@ -689,33 +360,15 @@ pub fn build( (NaiveDate::from_ymd_res(2017, 8, 18)?, "Statehood Day"), ], &mut map, - Country::US_HI, - "United States (Hawaii)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2018, 3, 26)?, "Prince Jonah Kuhio Kalanianaole Day", @@ -725,29 +378,15 @@ pub fn build( (NaiveDate::from_ymd_res(2018, 11, 6)?, "Election Day"), ], &mut map, - Country::US_HI, - "United States (Hawaii)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2019, 3, 26)?, "Prince Jonah Kuhio Kalanianaole Day", @@ -756,33 +395,15 @@ pub fn build( (NaiveDate::from_ymd_res(2019, 8, 16)?, "Statehood Day"), ], &mut map, - Country::US_HI, - "United States (Hawaii)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2020, 3, 26)?, "Prince Jonah Kuhio Kalanianaole Day", @@ -792,49 +413,15 @@ pub fn build( (NaiveDate::from_ymd_res(2020, 11, 3)?, "Election Day"), ], &mut map, - Country::US_HI, - "United States (Hawaii)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2021, 3, 26)?, "Prince Jonah Kuhio Kalanianaole Day", @@ -843,41 +430,15 @@ pub fn build( (NaiveDate::from_ymd_res(2021, 8, 20)?, "Statehood Day"), ], &mut map, - Country::US_HI, - "United States (Hawaii)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2022, 3, 26)?, "Prince Jonah Kuhio Kalanianaole Day", @@ -895,41 +456,15 @@ pub fn build( (NaiveDate::from_ymd_res(2022, 11, 8)?, "Election Day"), ], &mut map, - Country::US_HI, - "United States (Hawaii)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2023, 3, 26)?, "Prince Jonah Kuhio Kalanianaole Day", @@ -946,33 +481,15 @@ pub fn build( (NaiveDate::from_ymd_res(2023, 8, 18)?, "Statehood Day"), ], &mut map, - Country::US_HI, - "United States (Hawaii)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2024, 3, 26)?, "Prince Jonah Kuhio Kalanianaole Day", @@ -982,33 +499,15 @@ pub fn build( (NaiveDate::from_ymd_res(2024, 11, 5)?, "Election Day"), ], &mut map, - Country::US_HI, - "United States (Hawaii)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2025, 3, 26)?, "Prince Jonah Kuhio Kalanianaole Day", @@ -1017,37 +516,15 @@ pub fn build( (NaiveDate::from_ymd_res(2025, 8, 15)?, "Statehood Day"), ], &mut map, - Country::US_HI, - "United States (Hawaii)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2026, 3, 26)?, "Prince Jonah Kuhio Kalanianaole Day", @@ -1057,49 +534,15 @@ pub fn build( (NaiveDate::from_ymd_res(2026, 11, 3)?, "Election Day"), ], &mut map, - Country::US_HI, - "United States (Hawaii)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2027, 3, 26)?, "Prince Jonah Kuhio Kalanianaole Day", @@ -1108,37 +551,15 @@ pub fn build( (NaiveDate::from_ymd_res(2027, 8, 20)?, "Statehood Day"), ], &mut map, - Country::US_HI, - "United States (Hawaii)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2028, 3, 26)?, "Prince Jonah Kuhio Kalanianaole Day", @@ -1156,37 +577,15 @@ pub fn build( (NaiveDate::from_ymd_res(2028, 11, 7)?, "Election Day"), ], &mut map, - Country::US_HI, - "United States (Hawaii)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2029, 3, 26)?, "Prince Jonah Kuhio Kalanianaole Day", @@ -1195,33 +594,15 @@ pub fn build( (NaiveDate::from_ymd_res(2029, 8, 17)?, "Statehood Day"), ], &mut map, - Country::US_HI, - "United States (Hawaii)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2030, 3, 26)?, "Prince Jonah Kuhio Kalanianaole Day", @@ -1231,8 +612,8 @@ pub fn build( (NaiveDate::from_ymd_res(2030, 11, 5)?, "Election Day"), ], &mut map, - Country::US_HI, - "United States (Hawaii)", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/us_ia.rs b/src/data/us_ia.rs index 7f5c884..d2bd063 100644 --- a/src/data/us_ia.rs +++ b/src/data/us_ia.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "United States (Iowa)"; +const COUNTY_CODE: Country = Country::US_IA; + /// Generate holiday map for United States (Iowa). #[allow( unused_mut, @@ -9,34 +12,16 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); - build_year( + let mut national_holidays = de::build(years)?; + + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2000, 2, 12)?, "Lincoln's Birthday"), ( NaiveDate::from_ymd_res(2000, 2, 11)?, @@ -44,153 +29,55 @@ pub fn build( ), ], &mut map, - Country::US_IA, - "United States (Iowa)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 12)?, "Lincoln's Birthday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2001, 2, 12)?, "Lincoln's Birthday")], &mut map, - Country::US_IA, - "United States (Iowa)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 12)?, "Lincoln's Birthday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2002, 2, 12)?, "Lincoln's Birthday")], &mut map, - Country::US_IA, - "United States (Iowa)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 12)?, "Lincoln's Birthday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2003, 2, 12)?, "Lincoln's Birthday")], &mut map, - Country::US_IA, - "United States (Iowa)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 12)?, "Lincoln's Birthday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2004, 2, 12)?, "Lincoln's Birthday")], &mut map, - Country::US_IA, - "United States (Iowa)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2005, 2, 12)?, "Lincoln's Birthday"), ( NaiveDate::from_ymd_res(2005, 2, 11)?, @@ -198,37 +85,15 @@ pub fn build( ), ], &mut map, - Country::US_IA, - "United States (Iowa)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2006, 2, 12)?, "Lincoln's Birthday"), ( NaiveDate::from_ymd_res(2006, 2, 13)?, @@ -236,157 +101,55 @@ pub fn build( ), ], &mut map, - Country::US_IA, - "United States (Iowa)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 12)?, "Lincoln's Birthday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2007, 2, 12)?, "Lincoln's Birthday")], &mut map, - Country::US_IA, - "United States (Iowa)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 12)?, "Lincoln's Birthday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2008, 2, 12)?, "Lincoln's Birthday")], &mut map, - Country::US_IA, - "United States (Iowa)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 12)?, "Lincoln's Birthday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2009, 2, 12)?, "Lincoln's Birthday")], &mut map, - Country::US_IA, - "United States (Iowa)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 12)?, "Lincoln's Birthday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2010, 2, 12)?, "Lincoln's Birthday")], &mut map, - Country::US_IA, - "United States (Iowa)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2011, 2, 12)?, "Lincoln's Birthday"), ( NaiveDate::from_ymd_res(2011, 2, 11)?, @@ -394,37 +157,15 @@ pub fn build( ), ], &mut map, - Country::US_IA, - "United States (Iowa)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2012, 2, 12)?, "Lincoln's Birthday"), ( NaiveDate::from_ymd_res(2012, 2, 13)?, @@ -432,149 +173,55 @@ pub fn build( ), ], &mut map, - Country::US_IA, - "United States (Iowa)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 12)?, "Lincoln's Birthday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2013, 2, 12)?, "Lincoln's Birthday")], &mut map, - Country::US_IA, - "United States (Iowa)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 12)?, "Lincoln's Birthday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2014, 2, 12)?, "Lincoln's Birthday")], &mut map, - Country::US_IA, - "United States (Iowa)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 12)?, "Lincoln's Birthday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2015, 2, 12)?, "Lincoln's Birthday")], &mut map, - Country::US_IA, - "United States (Iowa)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 12)?, "Lincoln's Birthday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2016, 2, 12)?, "Lincoln's Birthday")], &mut map, - Country::US_IA, - "United States (Iowa)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2017, 2, 12)?, "Lincoln's Birthday"), ( NaiveDate::from_ymd_res(2017, 2, 13)?, @@ -582,173 +229,55 @@ pub fn build( ), ], &mut map, - Country::US_IA, - "United States (Iowa)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 12)?, "Lincoln's Birthday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2018, 2, 12)?, "Lincoln's Birthday")], &mut map, - Country::US_IA, - "United States (Iowa)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 12)?, "Lincoln's Birthday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2019, 2, 12)?, "Lincoln's Birthday")], &mut map, - Country::US_IA, - "United States (Iowa)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 12)?, "Lincoln's Birthday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2020, 2, 12)?, "Lincoln's Birthday")], &mut map, - Country::US_IA, - "United States (Iowa)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 12)?, "Lincoln's Birthday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2021, 2, 12)?, "Lincoln's Birthday")], &mut map, - Country::US_IA, - "United States (Iowa)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2022, 2, 12)?, "Lincoln's Birthday"), ( NaiveDate::from_ymd_res(2022, 2, 11)?, @@ -756,41 +285,15 @@ pub fn build( ), ], &mut map, - Country::US_IA, - "United States (Iowa)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2023, 2, 12)?, "Lincoln's Birthday"), ( NaiveDate::from_ymd_res(2023, 2, 13)?, @@ -798,177 +301,55 @@ pub fn build( ), ], &mut map, - Country::US_IA, - "United States (Iowa)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 12)?, "Lincoln's Birthday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2024, 2, 12)?, "Lincoln's Birthday")], &mut map, - Country::US_IA, - "United States (Iowa)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 12)?, "Lincoln's Birthday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2025, 2, 12)?, "Lincoln's Birthday")], &mut map, - Country::US_IA, - "United States (Iowa)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 12)?, "Lincoln's Birthday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2026, 2, 12)?, "Lincoln's Birthday")], &mut map, - Country::US_IA, - "United States (Iowa)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 12)?, "Lincoln's Birthday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2027, 2, 12)?, "Lincoln's Birthday")], &mut map, - Country::US_IA, - "United States (Iowa)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2028, 2, 12)?, "Lincoln's Birthday"), ( NaiveDate::from_ymd_res(2028, 2, 11)?, @@ -976,72 +357,28 @@ pub fn build( ), ], &mut map, - Country::US_IA, - "United States (Iowa)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 12)?, "Lincoln's Birthday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2029, 2, 12)?, "Lincoln's Birthday")], &mut map, - Country::US_IA, - "United States (Iowa)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 12)?, "Lincoln's Birthday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2030, 2, 12)?, "Lincoln's Birthday")], &mut map, - Country::US_IA, - "United States (Iowa)", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/us_id.rs b/src/data/us_id.rs index 2fcddf7..9e884ae 100644 --- a/src/data/us_id.rs +++ b/src/data/us_id.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "United States (Idaho)"; +const COUNTY_CODE: Country = Country::US_ID; + /// Generate holiday map for United States (Idaho). #[allow( unused_mut, @@ -9,1003 +12,319 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); - build_year( + let mut national_holidays = de::build(years)?; + + build_subdivision_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, 2, 21)?, - "Washington's Birthday", - ), - (NaiveDate::from_ymd_res(2000, 10, 9)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2000, 1, 17)?, - "Martin Luther King Jr. Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_ID, - "United States (Idaho)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 19)?, - "Washington's Birthday", - ), - (NaiveDate::from_ymd_res(2001, 10, 8)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2001, 1, 15)?, - "Martin Luther King Jr. Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_ID, - "United States (Idaho)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 18)?, - "Washington's Birthday", - ), - (NaiveDate::from_ymd_res(2002, 10, 14)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2002, 1, 21)?, - "Martin Luther King Jr. Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_ID, - "United States (Idaho)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 17)?, - "Washington's Birthday", - ), - (NaiveDate::from_ymd_res(2003, 10, 13)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2003, 1, 20)?, - "Martin Luther King Jr. Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_ID, - "United States (Idaho)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 16)?, - "Washington's Birthday", - ), - (NaiveDate::from_ymd_res(2004, 10, 11)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2004, 1, 19)?, - "Martin Luther King Jr. Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_ID, - "United States (Idaho)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 21)?, - "Washington's Birthday", - ), - (NaiveDate::from_ymd_res(2005, 10, 10)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2005, 1, 17)?, - "Martin Luther King Jr. Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_ID, - "United States (Idaho)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 20)?, - "Washington's Birthday", - ), - (NaiveDate::from_ymd_res(2006, 10, 9)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2006, 1, 16)?, - "Martin Luther King Jr. / Idaho Human Rights Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_ID, - "United States (Idaho)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 19)?, - "Washington's Birthday", - ), - (NaiveDate::from_ymd_res(2007, 10, 8)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2007, 1, 15)?, - "Martin Luther King Jr. / Idaho Human Rights Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_ID, - "United States (Idaho)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 18)?, - "Washington's Birthday", - ), - (NaiveDate::from_ymd_res(2008, 10, 13)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2008, 1, 21)?, - "Martin Luther King Jr. / Idaho Human Rights Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_ID, - "United States (Idaho)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 16)?, - "Washington's Birthday", - ), - (NaiveDate::from_ymd_res(2009, 10, 12)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2009, 1, 19)?, - "Martin Luther King Jr. / Idaho Human Rights Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_ID, - "United States (Idaho)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 15)?, - "Washington's Birthday", - ), - (NaiveDate::from_ymd_res(2010, 10, 11)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2010, 1, 18)?, - "Martin Luther King Jr. / Idaho Human Rights Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_ID, - "United States (Idaho)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 21)?, - "Washington's Birthday", - ), - (NaiveDate::from_ymd_res(2011, 10, 10)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2011, 1, 17)?, - "Martin Luther King Jr. / Idaho Human Rights Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_ID, - "United States (Idaho)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 20)?, - "Washington's Birthday", - ), - (NaiveDate::from_ymd_res(2012, 10, 8)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2012, 1, 16)?, - "Martin Luther King Jr. / Idaho Human Rights Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_ID, - "United States (Idaho)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 18)?, - "Washington's Birthday", - ), - (NaiveDate::from_ymd_res(2013, 10, 14)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2013, 1, 21)?, - "Martin Luther King Jr. / Idaho Human Rights Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_ID, - "United States (Idaho)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 17)?, - "Washington's Birthday", - ), - (NaiveDate::from_ymd_res(2014, 10, 13)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2014, 1, 20)?, - "Martin Luther King Jr. / Idaho Human Rights Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_ID, - "United States (Idaho)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 16)?, - "Washington's Birthday", - ), - (NaiveDate::from_ymd_res(2015, 10, 12)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2015, 1, 19)?, - "Martin Luther King Jr. / Idaho Human Rights Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_ID, - "United States (Idaho)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 15)?, - "Washington's Birthday", - ), - (NaiveDate::from_ymd_res(2016, 10, 10)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2016, 1, 18)?, - "Martin Luther King Jr. / Idaho Human Rights Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_ID, - "United States (Idaho)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 20)?, - "Washington's Birthday", - ), - (NaiveDate::from_ymd_res(2017, 10, 9)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2017, 1, 16)?, - "Martin Luther King Jr. / Idaho Human Rights Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_ID, - "United States (Idaho)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 19)?, - "Washington's Birthday", - ), - (NaiveDate::from_ymd_res(2018, 10, 8)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2018, 1, 15)?, - "Martin Luther King Jr. / Idaho Human Rights Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_ID, - "United States (Idaho)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 18)?, - "Washington's Birthday", - ), - (NaiveDate::from_ymd_res(2019, 10, 14)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2019, 1, 21)?, - "Martin Luther King Jr. / Idaho Human Rights Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_ID, - "United States (Idaho)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 17)?, - "Washington's Birthday", - ), - (NaiveDate::from_ymd_res(2020, 10, 12)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2020, 1, 20)?, - "Martin Luther King Jr. / Idaho Human Rights Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_ID, - "United States (Idaho)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 15)?, - "Washington's Birthday", - ), - (NaiveDate::from_ymd_res(2021, 10, 11)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2021, 1, 18)?, - "Martin Luther King Jr. / Idaho Human Rights Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_ID, - "United States (Idaho)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 21)?, - "Washington's Birthday", - ), - (NaiveDate::from_ymd_res(2022, 10, 10)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2022, 1, 17)?, - "Martin Luther King Jr. / Idaho Human Rights Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_ID, - "United States (Idaho)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 20)?, - "Washington's Birthday", - ), - (NaiveDate::from_ymd_res(2023, 10, 9)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2023, 1, 16)?, - "Martin Luther King Jr. / Idaho Human Rights Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_ID, - "United States (Idaho)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 19)?, - "Washington's Birthday", - ), - (NaiveDate::from_ymd_res(2024, 10, 14)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2024, 1, 15)?, - "Martin Luther King Jr. / Idaho Human Rights Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_ID, - "United States (Idaho)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 17)?, - "Washington's Birthday", - ), - (NaiveDate::from_ymd_res(2025, 10, 13)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2025, 1, 20)?, - "Martin Luther King Jr. / Idaho Human Rights Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_ID, - "United States (Idaho)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 16)?, - "Washington's Birthday", - ), - (NaiveDate::from_ymd_res(2026, 10, 12)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2026, 1, 19)?, - "Martin Luther King Jr. / Idaho Human Rights Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_ID, - "United States (Idaho)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 15)?, - "Washington's Birthday", - ), - (NaiveDate::from_ymd_res(2027, 10, 11)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2027, 1, 18)?, - "Martin Luther King Jr. / Idaho Human Rights Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_ID, - "United States (Idaho)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 21)?, - "Washington's Birthday", - ), - (NaiveDate::from_ymd_res(2028, 10, 9)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2028, 1, 17)?, - "Martin Luther King Jr. / Idaho Human Rights Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_ID, - "United States (Idaho)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 19)?, - "Washington's Birthday", - ), - (NaiveDate::from_ymd_res(2029, 10, 8)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2029, 1, 15)?, - "Martin Luther King Jr. / Idaho Human Rights Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_ID, - "United States (Idaho)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 18)?, - "Washington's Birthday", - ), - (NaiveDate::from_ymd_res(2030, 10, 14)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2030, 1, 21)?, - "Martin Luther King Jr. / Idaho Human Rights Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_ID, - "United States (Idaho)", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/us_il.rs b/src/data/us_il.rs index cb3631b..a664d1f 100644 --- a/src/data/us_il.rs +++ b/src/data/us_il.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "United States (Illinois)"; +const COUNTY_CODE: Country = Country::US_IL; + /// Generate holiday map for United States (Illinois). #[allow( unused_mut, @@ -9,35 +12,16 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); - build_year( + let mut national_holidays = de::build(years)?; + + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2000, 2, 12)?, "Lincoln's Birthday"), ( NaiveDate::from_ymd_res(2000, 2, 11)?, @@ -46,162 +30,67 @@ pub fn build( (NaiveDate::from_ymd_res(2000, 3, 6)?, "Casimir Pulaski Day"), ], &mut map, - Country::US_IL, - "United States (Illinois)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2001, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2001, 3, 5)?, "Casimir Pulaski Day"), ], &mut map, - Country::US_IL, - "United States (Illinois)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2002, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2002, 3, 4)?, "Casimir Pulaski Day"), ], &mut map, - Country::US_IL, - "United States (Illinois)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2003, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2003, 3, 3)?, "Casimir Pulaski Day"), ], &mut map, - Country::US_IL, - "United States (Illinois)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2004, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2004, 3, 1)?, "Casimir Pulaski Day"), ], &mut map, - Country::US_IL, - "United States (Illinois)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2005, 2, 12)?, "Lincoln's Birthday"), ( NaiveDate::from_ymd_res(2005, 2, 11)?, @@ -210,38 +99,15 @@ pub fn build( (NaiveDate::from_ymd_res(2005, 3, 7)?, "Casimir Pulaski Day"), ], &mut map, - Country::US_IL, - "United States (Illinois)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2006, 2, 12)?, "Lincoln's Birthday"), ( NaiveDate::from_ymd_res(2006, 2, 13)?, @@ -250,168 +116,69 @@ pub fn build( (NaiveDate::from_ymd_res(2006, 3, 6)?, "Casimir Pulaski Day"), ], &mut map, - Country::US_IL, - "United States (Illinois)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2007, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2007, 3, 5)?, "Casimir Pulaski Day"), ], &mut map, - Country::US_IL, - "United States (Illinois)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2008, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2008, 3, 3)?, "Casimir Pulaski Day"), (NaiveDate::from_ymd_res(2008, 11, 4)?, "Election Day"), ], &mut map, - Country::US_IL, - "United States (Illinois)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2009, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2009, 3, 2)?, "Casimir Pulaski Day"), ], &mut map, - Country::US_IL, - "United States (Illinois)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2010, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2010, 3, 1)?, "Casimir Pulaski Day"), (NaiveDate::from_ymd_res(2010, 11, 2)?, "Election Day"), ], &mut map, - Country::US_IL, - "United States (Illinois)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2011, 2, 12)?, "Lincoln's Birthday"), ( NaiveDate::from_ymd_res(2011, 2, 11)?, @@ -420,38 +187,15 @@ pub fn build( (NaiveDate::from_ymd_res(2011, 3, 7)?, "Casimir Pulaski Day"), ], &mut map, - Country::US_IL, - "United States (Illinois)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2012, 2, 12)?, "Lincoln's Birthday"), ( NaiveDate::from_ymd_res(2012, 2, 13)?, @@ -461,160 +205,69 @@ pub fn build( (NaiveDate::from_ymd_res(2012, 11, 6)?, "Election Day"), ], &mut map, - Country::US_IL, - "United States (Illinois)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2013, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2013, 3, 4)?, "Casimir Pulaski Day"), ], &mut map, - Country::US_IL, - "United States (Illinois)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2014, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2014, 3, 3)?, "Casimir Pulaski Day"), (NaiveDate::from_ymd_res(2014, 11, 4)?, "Election Day"), ], &mut map, - Country::US_IL, - "United States (Illinois)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2015, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2015, 3, 2)?, "Casimir Pulaski Day"), ], &mut map, - Country::US_IL, - "United States (Illinois)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2016, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2016, 3, 7)?, "Casimir Pulaski Day"), (NaiveDate::from_ymd_res(2016, 11, 8)?, "Election Day"), ], &mut map, - Country::US_IL, - "United States (Illinois)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2017, 2, 12)?, "Lincoln's Birthday"), ( NaiveDate::from_ymd_res(2017, 2, 13)?, @@ -623,184 +276,69 @@ pub fn build( (NaiveDate::from_ymd_res(2017, 3, 6)?, "Casimir Pulaski Day"), ], &mut map, - Country::US_IL, - "United States (Illinois)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2018, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2018, 3, 5)?, "Casimir Pulaski Day"), (NaiveDate::from_ymd_res(2018, 11, 6)?, "Election Day"), ], &mut map, - Country::US_IL, - "United States (Illinois)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2019, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2019, 3, 4)?, "Casimir Pulaski Day"), ], &mut map, - Country::US_IL, - "United States (Illinois)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2020, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2020, 3, 2)?, "Casimir Pulaski Day"), (NaiveDate::from_ymd_res(2020, 11, 3)?, "Election Day"), ], &mut map, - Country::US_IL, - "United States (Illinois)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2021, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2021, 3, 1)?, "Casimir Pulaski Day"), ], &mut map, - Country::US_IL, - "United States (Illinois)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2022, 2, 12)?, "Lincoln's Birthday"), ( NaiveDate::from_ymd_res(2022, 2, 11)?, @@ -810,42 +348,15 @@ pub fn build( (NaiveDate::from_ymd_res(2022, 11, 8)?, "Election Day"), ], &mut map, - Country::US_IL, - "United States (Illinois)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2023, 2, 12)?, "Lincoln's Birthday"), ( NaiveDate::from_ymd_res(2023, 2, 13)?, @@ -854,188 +365,69 @@ pub fn build( (NaiveDate::from_ymd_res(2023, 3, 6)?, "Casimir Pulaski Day"), ], &mut map, - Country::US_IL, - "United States (Illinois)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2024, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2024, 3, 4)?, "Casimir Pulaski Day"), (NaiveDate::from_ymd_res(2024, 11, 5)?, "Election Day"), ], &mut map, - Country::US_IL, - "United States (Illinois)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2025, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2025, 3, 3)?, "Casimir Pulaski Day"), ], &mut map, - Country::US_IL, - "United States (Illinois)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2026, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2026, 3, 2)?, "Casimir Pulaski Day"), (NaiveDate::from_ymd_res(2026, 11, 3)?, "Election Day"), ], &mut map, - Country::US_IL, - "United States (Illinois)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2027, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2027, 3, 1)?, "Casimir Pulaski Day"), ], &mut map, - Country::US_IL, - "United States (Illinois)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2028, 2, 12)?, "Lincoln's Birthday"), ( NaiveDate::from_ymd_res(2028, 2, 11)?, @@ -1045,77 +437,35 @@ pub fn build( (NaiveDate::from_ymd_res(2028, 11, 7)?, "Election Day"), ], &mut map, - Country::US_IL, - "United States (Illinois)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2029, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2029, 3, 5)?, "Casimir Pulaski Day"), ], &mut map, - Country::US_IL, - "United States (Illinois)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2030, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2030, 3, 4)?, "Casimir Pulaski Day"), (NaiveDate::from_ymd_res(2030, 11, 5)?, "Election Day"), ], &mut map, - Country::US_IL, - "United States (Illinois)", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/us_in.rs b/src/data/us_in.rs index 3a3636a..96407ac 100644 --- a/src/data/us_in.rs +++ b/src/data/us_in.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "United States (Indiana)"; +const COUNTY_CODE: Country = Country::US_IN; + /// Generate holiday map for United States (Indiana). #[allow( unused_mut, @@ -9,1096 +12,427 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); - build_year( + let mut national_holidays = de::build(years)?; + + build_subdivision_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"), - (NaiveDate::from_ymd_res(2000, 4, 21)?, "Good Friday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2000, 4, 21)?, "Good Friday")], &mut map, - Country::US_IN, - "United States (Indiana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2001, 4, 13)?, "Good Friday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2001, 4, 13)?, "Good Friday")], &mut map, - Country::US_IN, - "United States (Indiana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2002, 3, 29)?, "Good Friday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2002, 3, 29)?, "Good Friday")], &mut map, - Country::US_IN, - "United States (Indiana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2003, 4, 18)?, "Good Friday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2003, 4, 18)?, "Good Friday")], &mut map, - Country::US_IN, - "United States (Indiana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2004, 4, 9)?, "Good Friday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2004, 4, 9)?, "Good Friday")], &mut map, - Country::US_IN, - "United States (Indiana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2005, 3, 25)?, "Good Friday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2005, 3, 25)?, "Good Friday")], &mut map, - Country::US_IN, - "United States (Indiana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2006, 4, 14)?, "Good Friday"), (NaiveDate::from_ymd_res(2006, 5, 2)?, "Primary Election Day"), ], &mut map, - Country::US_IN, - "United States (Indiana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2007, 4, 6)?, "Good Friday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2007, 4, 6)?, "Good Friday")], &mut map, - Country::US_IN, - "United States (Indiana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2008, 3, 21)?, "Good Friday"), (NaiveDate::from_ymd_res(2008, 5, 6)?, "Primary Election Day"), (NaiveDate::from_ymd_res(2008, 11, 4)?, "Election Day"), ], &mut map, - Country::US_IN, - "United States (Indiana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2009, 4, 10)?, "Good Friday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2009, 4, 10)?, "Good Friday")], &mut map, - Country::US_IN, - "United States (Indiana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2010, 4, 2)?, "Good Friday"), (NaiveDate::from_ymd_res(2010, 5, 4)?, "Primary Election Day"), (NaiveDate::from_ymd_res(2010, 11, 2)?, "Election Day"), (NaiveDate::from_ymd_res(2010, 11, 26)?, "Lincoln's Birthday"), ], &mut map, - Country::US_IN, - "United States (Indiana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2011, 4, 22)?, "Good Friday"), (NaiveDate::from_ymd_res(2011, 11, 25)?, "Lincoln's Birthday"), ], &mut map, - Country::US_IN, - "United States (Indiana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2012, 4, 6)?, "Good Friday"), (NaiveDate::from_ymd_res(2012, 5, 8)?, "Primary Election Day"), (NaiveDate::from_ymd_res(2012, 11, 6)?, "Election Day"), (NaiveDate::from_ymd_res(2012, 11, 23)?, "Lincoln's Birthday"), ], &mut map, - Country::US_IN, - "United States (Indiana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2013, 3, 29)?, "Good Friday"), (NaiveDate::from_ymd_res(2013, 11, 29)?, "Lincoln's Birthday"), ], &mut map, - Country::US_IN, - "United States (Indiana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2014, 4, 18)?, "Good Friday"), (NaiveDate::from_ymd_res(2014, 5, 6)?, "Primary Election Day"), (NaiveDate::from_ymd_res(2014, 11, 4)?, "Election Day"), (NaiveDate::from_ymd_res(2014, 11, 28)?, "Lincoln's Birthday"), ], &mut map, - Country::US_IN, - "United States (Indiana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2015, 4, 3)?, "Good Friday"), (NaiveDate::from_ymd_res(2015, 5, 5)?, "Primary Election Day"), (NaiveDate::from_ymd_res(2015, 11, 3)?, "Election Day"), (NaiveDate::from_ymd_res(2015, 11, 27)?, "Lincoln's Birthday"), ], &mut map, - Country::US_IN, - "United States (Indiana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2016, 3, 25)?, "Good Friday"), (NaiveDate::from_ymd_res(2016, 5, 3)?, "Primary Election Day"), (NaiveDate::from_ymd_res(2016, 11, 8)?, "Election Day"), (NaiveDate::from_ymd_res(2016, 11, 25)?, "Lincoln's Birthday"), ], &mut map, - Country::US_IN, - "United States (Indiana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2017, 4, 14)?, "Good Friday"), (NaiveDate::from_ymd_res(2017, 5, 2)?, "Primary Election Day"), (NaiveDate::from_ymd_res(2017, 11, 7)?, "Election Day"), (NaiveDate::from_ymd_res(2017, 11, 24)?, "Lincoln's Birthday"), ], &mut map, - Country::US_IN, - "United States (Indiana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2018, 3, 30)?, "Good Friday"), (NaiveDate::from_ymd_res(2018, 5, 8)?, "Primary Election Day"), (NaiveDate::from_ymd_res(2018, 11, 6)?, "Election Day"), (NaiveDate::from_ymd_res(2018, 11, 23)?, "Lincoln's Birthday"), ], &mut map, - Country::US_IN, - "United States (Indiana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2019, 4, 19)?, "Good Friday"), (NaiveDate::from_ymd_res(2019, 5, 7)?, "Primary Election Day"), (NaiveDate::from_ymd_res(2019, 11, 5)?, "Election Day"), (NaiveDate::from_ymd_res(2019, 11, 29)?, "Lincoln's Birthday"), ], &mut map, - Country::US_IN, - "United States (Indiana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2020, 4, 10)?, "Good Friday"), (NaiveDate::from_ymd_res(2020, 5, 5)?, "Primary Election Day"), (NaiveDate::from_ymd_res(2020, 11, 3)?, "Election Day"), (NaiveDate::from_ymd_res(2020, 11, 27)?, "Lincoln's Birthday"), ], &mut map, - Country::US_IN, - "United States (Indiana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2021, 4, 2)?, "Good Friday"), (NaiveDate::from_ymd_res(2021, 5, 4)?, "Primary Election Day"), (NaiveDate::from_ymd_res(2021, 11, 2)?, "Election Day"), (NaiveDate::from_ymd_res(2021, 11, 26)?, "Lincoln's Birthday"), ], &mut map, - Country::US_IN, - "United States (Indiana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2022, 4, 15)?, "Good Friday"), (NaiveDate::from_ymd_res(2022, 5, 3)?, "Primary Election Day"), (NaiveDate::from_ymd_res(2022, 11, 8)?, "Election Day"), (NaiveDate::from_ymd_res(2022, 11, 25)?, "Lincoln's Birthday"), ], &mut map, - Country::US_IN, - "United States (Indiana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2023, 4, 7)?, "Good Friday"), (NaiveDate::from_ymd_res(2023, 5, 2)?, "Primary Election Day"), (NaiveDate::from_ymd_res(2023, 11, 7)?, "Election Day"), (NaiveDate::from_ymd_res(2023, 11, 24)?, "Lincoln's Birthday"), ], &mut map, - Country::US_IN, - "United States (Indiana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2024, 3, 29)?, "Good Friday"), (NaiveDate::from_ymd_res(2024, 5, 7)?, "Primary Election Day"), (NaiveDate::from_ymd_res(2024, 11, 5)?, "Election Day"), (NaiveDate::from_ymd_res(2024, 11, 29)?, "Lincoln's Birthday"), ], &mut map, - Country::US_IN, - "United States (Indiana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2025, 4, 18)?, "Good Friday"), (NaiveDate::from_ymd_res(2025, 5, 6)?, "Primary Election Day"), (NaiveDate::from_ymd_res(2025, 11, 4)?, "Election Day"), (NaiveDate::from_ymd_res(2025, 11, 28)?, "Lincoln's Birthday"), ], &mut map, - Country::US_IN, - "United States (Indiana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2026, 4, 3)?, "Good Friday"), (NaiveDate::from_ymd_res(2026, 5, 5)?, "Primary Election Day"), (NaiveDate::from_ymd_res(2026, 11, 3)?, "Election Day"), (NaiveDate::from_ymd_res(2026, 11, 27)?, "Lincoln's Birthday"), ], &mut map, - Country::US_IN, - "United States (Indiana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2027, 3, 26)?, "Good Friday"), (NaiveDate::from_ymd_res(2027, 5, 4)?, "Primary Election Day"), (NaiveDate::from_ymd_res(2027, 11, 2)?, "Election Day"), (NaiveDate::from_ymd_res(2027, 11, 26)?, "Lincoln's Birthday"), ], &mut map, - Country::US_IN, - "United States (Indiana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2028, 4, 14)?, "Good Friday"), (NaiveDate::from_ymd_res(2028, 5, 2)?, "Primary Election Day"), (NaiveDate::from_ymd_res(2028, 11, 7)?, "Election Day"), (NaiveDate::from_ymd_res(2028, 11, 24)?, "Lincoln's Birthday"), ], &mut map, - Country::US_IN, - "United States (Indiana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2029, 3, 30)?, "Good Friday"), (NaiveDate::from_ymd_res(2029, 5, 8)?, "Primary Election Day"), (NaiveDate::from_ymd_res(2029, 11, 6)?, "Election Day"), (NaiveDate::from_ymd_res(2029, 11, 23)?, "Lincoln's Birthday"), ], &mut map, - Country::US_IN, - "United States (Indiana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2030, 4, 19)?, "Good Friday"), (NaiveDate::from_ymd_res(2030, 5, 7)?, "Primary Election Day"), (NaiveDate::from_ymd_res(2030, 11, 5)?, "Election Day"), (NaiveDate::from_ymd_res(2030, 11, 29)?, "Lincoln's Birthday"), ], &mut map, - Country::US_IN, - "United States (Indiana)", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/us_ks.rs b/src/data/us_ks.rs index ac62c2a..bd89af6 100644 --- a/src/data/us_ks.rs +++ b/src/data/us_ks.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "United States (Kansas)"; +const COUNTY_CODE: Country = Country::US_KS; + /// Generate holiday map for United States (Kansas). #[allow( unused_mut, @@ -9,505 +12,176 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); - build_year( + let mut national_holidays = de::build(years)?; + + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_KS, - "United States (Kansas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_KS, - "United States (Kansas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_KS, - "United States (Kansas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_KS, - "United States (Kansas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_KS, - "United States (Kansas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_KS, - "United States (Kansas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_KS, - "United States (Kansas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_KS, - "United States (Kansas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_KS, - "United States (Kansas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_KS, - "United States (Kansas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_KS, - "United States (Kansas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_KS, - "United States (Kansas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_KS, - "United States (Kansas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 12, 24)?, "Christmas Eve"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2013, 12, 24)?, "Christmas Eve")], &mut map, - Country::US_KS, - "United States (Kansas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 12, 24)?, "Christmas Eve"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2014, 12, 24)?, "Christmas Eve")], &mut map, - Country::US_KS, - "United States (Kansas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 12, 24)?, "Christmas Eve"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2015, 12, 24)?, "Christmas Eve")], &mut map, - Country::US_KS, - "United States (Kansas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2016, 12, 24)?, "Christmas Eve"), ( NaiveDate::from_ymd_res(2016, 12, 23)?, @@ -515,37 +189,15 @@ pub fn build( ), ], &mut map, - Country::US_KS, - "United States (Kansas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2017, 12, 24)?, "Christmas Eve"), ( NaiveDate::from_ymd_res(2017, 12, 22)?, @@ -553,176 +205,58 @@ pub fn build( ), ], &mut map, - Country::US_KS, - "United States (Kansas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 12, 24)?, "Christmas Eve"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2018, 12, 24)?, "Christmas Eve")], &mut map, - Country::US_KS, - "United States (Kansas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 12, 24)?, "Christmas Eve"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2019, 12, 24)?, "Christmas Eve")], &mut map, - Country::US_KS, - "United States (Kansas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 12, 24)?, "Christmas Eve"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2020, 12, 24)?, "Christmas Eve")], &mut map, - Country::US_KS, - "United States (Kansas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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); Christmas Eve", - ), - ( - 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, 12, 23)?, - "Christmas Eve (observed)", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2021, 12, 23)?, + "Christmas Eve (observed)", + )], &mut map, - Country::US_KS, - "United States (Kansas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2022, 12, 24)?, "Christmas Eve"), ( NaiveDate::from_ymd_res(2022, 12, 23)?, @@ -730,41 +264,15 @@ pub fn build( ), ], &mut map, - Country::US_KS, - "United States (Kansas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2023, 12, 24)?, "Christmas Eve"), ( NaiveDate::from_ymd_res(2023, 12, 22)?, @@ -772,180 +280,58 @@ pub fn build( ), ], &mut map, - Country::US_KS, - "United States (Kansas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 12, 24)?, "Christmas Eve"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2024, 12, 24)?, "Christmas Eve")], &mut map, - Country::US_KS, - "United States (Kansas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 12, 24)?, "Christmas Eve"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2025, 12, 24)?, "Christmas Eve")], &mut map, - Country::US_KS, - "United States (Kansas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 12, 24)?, "Christmas Eve"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2026, 12, 24)?, "Christmas Eve")], &mut map, - Country::US_KS, - "United States (Kansas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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); Christmas Eve", - ), - ( - 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, 12, 23)?, - "Christmas Eve (observed)", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2027, 12, 23)?, + "Christmas Eve (observed)", + )], &mut map, - Country::US_KS, - "United States (Kansas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2028, 12, 24)?, "Christmas Eve"), ( NaiveDate::from_ymd_res(2028, 12, 22)?, @@ -953,72 +339,28 @@ pub fn build( ), ], &mut map, - Country::US_KS, - "United States (Kansas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 12, 24)?, "Christmas Eve"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2029, 12, 24)?, "Christmas Eve")], &mut map, - Country::US_KS, - "United States (Kansas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 12, 24)?, "Christmas Eve"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2030, 12, 24)?, "Christmas Eve")], &mut map, - Country::US_KS, - "United States (Kansas)", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/us_ky.rs b/src/data/us_ky.rs index 8d61056..26d5708 100644 --- a/src/data/us_ky.rs +++ b/src/data/us_ky.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "United States (Kentucky)"; +const COUNTY_CODE: Country = Country::US_KY; + /// Generate holiday map for United States (Kentucky). #[allow( unused_mut, @@ -9,521 +12,185 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); - build_year( + let mut national_holidays = de::build(years)?; + + build_subdivision_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, 4, 21)?, "Good Friday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2000, 4, 21)?, "Good Friday")], &mut map, - Country::US_KY, - "United States (Kentucky)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 13)?, "Good Friday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2001, 4, 13)?, "Good Friday")], &mut map, - Country::US_KY, - "United States (Kentucky)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 3, 29)?, "Good Friday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2002, 3, 29)?, "Good Friday")], &mut map, - Country::US_KY, - "United States (Kentucky)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 18)?, "Good Friday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2003, 4, 18)?, "Good Friday")], &mut map, - Country::US_KY, - "United States (Kentucky)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 9)?, "Good Friday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2004, 4, 9)?, "Good Friday")], &mut map, - Country::US_KY, - "United States (Kentucky)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 3, 25)?, "Good Friday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2005, 3, 25)?, "Good Friday")], &mut map, - Country::US_KY, - "United States (Kentucky)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 14)?, "Good Friday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2006, 4, 14)?, "Good Friday")], &mut map, - Country::US_KY, - "United States (Kentucky)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 6)?, "Good Friday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2007, 4, 6)?, "Good Friday")], &mut map, - Country::US_KY, - "United States (Kentucky)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 3, 21)?, "Good Friday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2008, 3, 21)?, "Good Friday")], &mut map, - Country::US_KY, - "United States (Kentucky)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 10)?, "Good Friday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2009, 4, 10)?, "Good Friday")], &mut map, - Country::US_KY, - "United States (Kentucky)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 2)?, "Good Friday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2010, 4, 2)?, "Good Friday")], &mut map, - Country::US_KY, - "United States (Kentucky)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 22)?, "Good Friday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2011, 4, 22)?, "Good Friday")], &mut map, - Country::US_KY, - "United States (Kentucky)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 6)?, "Good Friday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2012, 4, 6)?, "Good Friday")], &mut map, - Country::US_KY, - "United States (Kentucky)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2013, 3, 29)?, "Good Friday"), (NaiveDate::from_ymd_res(2013, 12, 31)?, "New Year's Eve"), ], &mut map, - Country::US_KY, - "United States (Kentucky)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2014, 4, 18)?, "Good Friday"), (NaiveDate::from_ymd_res(2014, 12, 31)?, "New Year's Eve"), ], &mut map, - Country::US_KY, - "United States (Kentucky)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2015, 4, 3)?, "Good Friday"), (NaiveDate::from_ymd_res(2015, 12, 31)?, "New Year's Eve"), ], &mut map, - Country::US_KY, - "United States (Kentucky)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2016, 3, 25)?, "Good Friday"), (NaiveDate::from_ymd_res(2016, 12, 31)?, "New Year's Eve"), ( @@ -532,211 +199,77 @@ pub fn build( ), ], &mut map, - Country::US_KY, - "United States (Kentucky)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2017, 4, 14)?, "Good Friday"), (NaiveDate::from_ymd_res(2017, 12, 31)?, "New Year's Eve"), ], &mut map, - Country::US_KY, - "United States (Kentucky)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2018, 3, 30)?, "Good Friday"), (NaiveDate::from_ymd_res(2018, 12, 31)?, "New Year's Eve"), ], &mut map, - Country::US_KY, - "United States (Kentucky)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2019, 4, 19)?, "Good Friday"), (NaiveDate::from_ymd_res(2019, 12, 31)?, "New Year's Eve"), ], &mut map, - Country::US_KY, - "United States (Kentucky)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2020, 4, 10)?, "Good Friday"), (NaiveDate::from_ymd_res(2020, 12, 31)?, "New Year's Eve"), ], &mut map, - Country::US_KY, - "United States (Kentucky)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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); New Year's Eve", - ), - (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, 4, 2)?, "Good Friday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2021, 4, 2)?, "Good Friday")], &mut map, - Country::US_KY, - "United States (Kentucky)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2022, 4, 15)?, "Good Friday"), (NaiveDate::from_ymd_res(2022, 12, 31)?, "New Year's Eve"), ( @@ -745,291 +278,109 @@ pub fn build( ), ], &mut map, - Country::US_KY, - "United States (Kentucky)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2023, 4, 7)?, "Good Friday"), (NaiveDate::from_ymd_res(2023, 12, 31)?, "New Year's Eve"), ], &mut map, - Country::US_KY, - "United States (Kentucky)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2024, 3, 29)?, "Good Friday"), (NaiveDate::from_ymd_res(2024, 12, 31)?, "New Year's Eve"), ], &mut map, - Country::US_KY, - "United States (Kentucky)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2025, 4, 18)?, "Good Friday"), (NaiveDate::from_ymd_res(2025, 12, 31)?, "New Year's Eve"), ], &mut map, - Country::US_KY, - "United States (Kentucky)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2026, 4, 3)?, "Good Friday"), (NaiveDate::from_ymd_res(2026, 12, 31)?, "New Year's Eve"), ], &mut map, - Country::US_KY, - "United States (Kentucky)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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); New Year's Eve", - ), - (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, 3, 26)?, "Good Friday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2027, 3, 26)?, "Good Friday")], &mut map, - Country::US_KY, - "United States (Kentucky)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2028, 4, 14)?, "Good Friday"), (NaiveDate::from_ymd_res(2028, 12, 31)?, "New Year's Eve"), ], &mut map, - Country::US_KY, - "United States (Kentucky)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2029, 3, 30)?, "Good Friday"), (NaiveDate::from_ymd_res(2029, 12, 31)?, "New Year's Eve"), ], &mut map, - Country::US_KY, - "United States (Kentucky)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2030, 4, 19)?, "Good Friday"), (NaiveDate::from_ymd_res(2030, 12, 31)?, "New Year's Eve"), ], &mut map, - Country::US_KY, - "United States (Kentucky)", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/us_la.rs b/src/data/us_la.rs index 2db5de6..4425d53 100644 --- a/src/data/us_la.rs +++ b/src/data/us_la.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "United States (Louisiana)"; +const COUNTY_CODE: Country = Country::US_LA; + /// Generate holiday map for United States (Louisiana). #[allow( unused_mut, @@ -9,1053 +12,431 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); - build_year( + let mut national_holidays = de::build(years)?; + + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2000, 3, 7)?, "Mardi Gras"), (NaiveDate::from_ymd_res(2000, 4, 21)?, "Good Friday"), ], &mut map, - Country::US_LA, - "United States (Louisiana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2001, 1, 20)?, "Inauguration Day"), (NaiveDate::from_ymd_res(2001, 2, 27)?, "Mardi Gras"), (NaiveDate::from_ymd_res(2001, 4, 13)?, "Good Friday"), ], &mut map, - Country::US_LA, - "United States (Louisiana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2002, 2, 12)?, "Mardi Gras"), (NaiveDate::from_ymd_res(2002, 3, 29)?, "Good Friday"), ], &mut map, - Country::US_LA, - "United States (Louisiana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2003, 3, 4)?, "Mardi Gras"), (NaiveDate::from_ymd_res(2003, 4, 18)?, "Good Friday"), ], &mut map, - Country::US_LA, - "United States (Louisiana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2004, 2, 24)?, "Mardi Gras"), (NaiveDate::from_ymd_res(2004, 4, 9)?, "Good Friday"), ], &mut map, - Country::US_LA, - "United States (Louisiana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2005, 1, 20)?, "Inauguration Day"), (NaiveDate::from_ymd_res(2005, 2, 8)?, "Mardi Gras"), (NaiveDate::from_ymd_res(2005, 3, 25)?, "Good Friday"), ], &mut map, - Country::US_LA, - "United States (Louisiana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2006, 2, 28)?, "Mardi Gras"), (NaiveDate::from_ymd_res(2006, 4, 14)?, "Good Friday"), ], &mut map, - Country::US_LA, - "United States (Louisiana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2007, 2, 20)?, "Mardi Gras"), (NaiveDate::from_ymd_res(2007, 4, 6)?, "Good Friday"), ], &mut map, - Country::US_LA, - "United States (Louisiana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2008, 2, 5)?, "Mardi Gras"), (NaiveDate::from_ymd_res(2008, 3, 21)?, "Good Friday"), (NaiveDate::from_ymd_res(2008, 11, 4)?, "Election Day"), ], &mut map, - Country::US_LA, - "United States (Louisiana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2009, 1, 20)?, "Inauguration Day"), (NaiveDate::from_ymd_res(2009, 2, 24)?, "Mardi Gras"), (NaiveDate::from_ymd_res(2009, 4, 10)?, "Good Friday"), ], &mut map, - Country::US_LA, - "United States (Louisiana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2010, 2, 16)?, "Mardi Gras"), (NaiveDate::from_ymd_res(2010, 4, 2)?, "Good Friday"), (NaiveDate::from_ymd_res(2010, 11, 2)?, "Election Day"), ], &mut map, - Country::US_LA, - "United States (Louisiana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2011, 3, 8)?, "Mardi Gras"), (NaiveDate::from_ymd_res(2011, 4, 22)?, "Good Friday"), ], &mut map, - Country::US_LA, - "United States (Louisiana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2012, 2, 21)?, "Mardi Gras"), (NaiveDate::from_ymd_res(2012, 4, 6)?, "Good Friday"), (NaiveDate::from_ymd_res(2012, 11, 6)?, "Election Day"), ], &mut map, - Country::US_LA, - "United States (Louisiana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Inauguration Day (observed); Martin Luther King Jr. Day", - ), - ( - NaiveDate::from_ymd_res(2013, 2, 18)?, - "Washington's Birthday", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2013, 1, 20)?, "Inauguration Day"), (NaiveDate::from_ymd_res(2013, 2, 12)?, "Mardi Gras"), (NaiveDate::from_ymd_res(2013, 3, 29)?, "Good Friday"), ], &mut map, - Country::US_LA, - "United States (Louisiana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2014, 3, 4)?, "Mardi Gras"), (NaiveDate::from_ymd_res(2014, 4, 18)?, "Good Friday"), (NaiveDate::from_ymd_res(2014, 11, 4)?, "Election Day"), ], &mut map, - Country::US_LA, - "United States (Louisiana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2015, 2, 17)?, "Mardi Gras"), (NaiveDate::from_ymd_res(2015, 4, 3)?, "Good Friday"), ], &mut map, - Country::US_LA, - "United States (Louisiana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2016, 2, 9)?, "Mardi Gras"), (NaiveDate::from_ymd_res(2016, 3, 25)?, "Good Friday"), (NaiveDate::from_ymd_res(2016, 11, 8)?, "Election Day"), ], &mut map, - Country::US_LA, - "United States (Louisiana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2017, 1, 20)?, "Inauguration Day"), (NaiveDate::from_ymd_res(2017, 2, 28)?, "Mardi Gras"), (NaiveDate::from_ymd_res(2017, 4, 14)?, "Good Friday"), ], &mut map, - Country::US_LA, - "United States (Louisiana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2018, 2, 13)?, "Mardi Gras"), (NaiveDate::from_ymd_res(2018, 3, 30)?, "Good Friday"), (NaiveDate::from_ymd_res(2018, 11, 6)?, "Election Day"), ], &mut map, - Country::US_LA, - "United States (Louisiana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2019, 3, 5)?, "Mardi Gras"), (NaiveDate::from_ymd_res(2019, 4, 19)?, "Good Friday"), ], &mut map, - Country::US_LA, - "United States (Louisiana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2020, 2, 25)?, "Mardi Gras"), (NaiveDate::from_ymd_res(2020, 4, 10)?, "Good Friday"), (NaiveDate::from_ymd_res(2020, 11, 3)?, "Election Day"), ], &mut map, - Country::US_LA, - "United States (Louisiana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2021, 1, 20)?, "Inauguration Day"), (NaiveDate::from_ymd_res(2021, 2, 16)?, "Mardi Gras"), (NaiveDate::from_ymd_res(2021, 4, 2)?, "Good Friday"), ], &mut map, - Country::US_LA, - "United States (Louisiana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2022, 3, 1)?, "Mardi Gras"), (NaiveDate::from_ymd_res(2022, 4, 15)?, "Good Friday"), (NaiveDate::from_ymd_res(2022, 11, 8)?, "Election Day"), ], &mut map, - Country::US_LA, - "United States (Louisiana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2023, 2, 21)?, "Mardi Gras"), (NaiveDate::from_ymd_res(2023, 4, 7)?, "Good Friday"), ], &mut map, - Country::US_LA, - "United States (Louisiana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2024, 2, 13)?, "Mardi Gras"), (NaiveDate::from_ymd_res(2024, 3, 29)?, "Good Friday"), (NaiveDate::from_ymd_res(2024, 11, 5)?, "Election Day"), ], &mut map, - Country::US_LA, - "United States (Louisiana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Inauguration Day; Martin Luther King Jr. Day", - ), - ( - NaiveDate::from_ymd_res(2025, 2, 17)?, - "Washington's Birthday", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2025, 3, 4)?, "Mardi Gras"), (NaiveDate::from_ymd_res(2025, 4, 18)?, "Good Friday"), ], &mut map, - Country::US_LA, - "United States (Louisiana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2026, 2, 17)?, "Mardi Gras"), (NaiveDate::from_ymd_res(2026, 4, 3)?, "Good Friday"), (NaiveDate::from_ymd_res(2026, 11, 3)?, "Election Day"), ], &mut map, - Country::US_LA, - "United States (Louisiana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2027, 2, 9)?, "Mardi Gras"), (NaiveDate::from_ymd_res(2027, 3, 26)?, "Good Friday"), ], &mut map, - Country::US_LA, - "United States (Louisiana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2028, 2, 29)?, "Mardi Gras"), (NaiveDate::from_ymd_res(2028, 4, 14)?, "Good Friday"), (NaiveDate::from_ymd_res(2028, 11, 7)?, "Election Day"), ], &mut map, - Country::US_LA, - "United States (Louisiana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2029, 1, 20)?, "Inauguration Day"), (NaiveDate::from_ymd_res(2029, 2, 13)?, "Mardi Gras"), (NaiveDate::from_ymd_res(2029, 3, 30)?, "Good Friday"), ], &mut map, - Country::US_LA, - "United States (Louisiana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2030, 3, 5)?, "Mardi Gras"), (NaiveDate::from_ymd_res(2030, 4, 19)?, "Good Friday"), (NaiveDate::from_ymd_res(2030, 11, 5)?, "Election Day"), ], &mut map, - Country::US_LA, - "United States (Louisiana)", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/us_ma.rs b/src/data/us_ma.rs index e587390..4b67e7c 100644 --- a/src/data/us_ma.rs +++ b/src/data/us_ma.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "United States (Massachusetts)"; +const COUNTY_CODE: Country = Country::US_MA; + /// Generate holiday map for United States (Massachusetts). #[allow( unused_mut, @@ -9,67 +12,29 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); - build_year( + let mut national_holidays = de::build(years)?; + + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2000, 3, 17)?, "Evacuation Day"), (NaiveDate::from_ymd_res(2000, 4, 17)?, "Patriots' Day"), ], &mut map, - Country::US_MA, - "United States (Massachusetts)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2001, 3, 17)?, "Evacuation Day"), ( NaiveDate::from_ymd_res(2001, 3, 19)?, @@ -78,30 +43,15 @@ pub fn build( (NaiveDate::from_ymd_res(2001, 4, 16)?, "Patriots' Day"), ], &mut map, - Country::US_MA, - "United States (Massachusetts)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2002, 3, 17)?, "Evacuation Day"), ( NaiveDate::from_ymd_res(2002, 3, 18)?, @@ -110,170 +60,67 @@ pub fn build( (NaiveDate::from_ymd_res(2002, 4, 15)?, "Patriots' Day"), ], &mut map, - Country::US_MA, - "United States (Massachusetts)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2003, 3, 17)?, "Evacuation Day"), (NaiveDate::from_ymd_res(2003, 4, 21)?, "Patriots' Day"), ], &mut map, - Country::US_MA, - "United States (Massachusetts)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2004, 3, 17)?, "Evacuation Day"), (NaiveDate::from_ymd_res(2004, 4, 19)?, "Patriots' Day"), ], &mut map, - Country::US_MA, - "United States (Massachusetts)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2005, 3, 17)?, "Evacuation Day"), (NaiveDate::from_ymd_res(2005, 4, 18)?, "Patriots' Day"), ], &mut map, - Country::US_MA, - "United States (Massachusetts)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2006, 3, 17)?, "Evacuation Day"), (NaiveDate::from_ymd_res(2006, 4, 17)?, "Patriots' Day"), ], &mut map, - Country::US_MA, - "United States (Massachusetts)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2007, 3, 17)?, "Evacuation Day"), ( NaiveDate::from_ymd_res(2007, 3, 19)?, @@ -282,170 +129,67 @@ pub fn build( (NaiveDate::from_ymd_res(2007, 4, 16)?, "Patriots' Day"), ], &mut map, - Country::US_MA, - "United States (Massachusetts)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2008, 3, 17)?, "Evacuation Day"), (NaiveDate::from_ymd_res(2008, 4, 21)?, "Patriots' Day"), ], &mut map, - Country::US_MA, - "United States (Massachusetts)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2009, 3, 17)?, "Evacuation Day"), (NaiveDate::from_ymd_res(2009, 4, 20)?, "Patriots' Day"), ], &mut map, - Country::US_MA, - "United States (Massachusetts)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2010, 3, 17)?, "Evacuation Day"), (NaiveDate::from_ymd_res(2010, 4, 19)?, "Patriots' Day"), ], &mut map, - Country::US_MA, - "United States (Massachusetts)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2011, 3, 17)?, "Evacuation Day"), (NaiveDate::from_ymd_res(2011, 4, 18)?, "Patriots' Day"), ], &mut map, - Country::US_MA, - "United States (Massachusetts)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2012, 3, 17)?, "Evacuation Day"), ( NaiveDate::from_ymd_res(2012, 3, 19)?, @@ -454,30 +198,15 @@ pub fn build( (NaiveDate::from_ymd_res(2012, 4, 16)?, "Patriots' Day"), ], &mut map, - Country::US_MA, - "United States (Massachusetts)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2013, 3, 17)?, "Evacuation Day"), ( NaiveDate::from_ymd_res(2013, 3, 18)?, @@ -486,162 +215,67 @@ pub fn build( (NaiveDate::from_ymd_res(2013, 4, 15)?, "Patriots' Day"), ], &mut map, - Country::US_MA, - "United States (Massachusetts)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2014, 3, 17)?, "Evacuation Day"), (NaiveDate::from_ymd_res(2014, 4, 21)?, "Patriots' Day"), ], &mut map, - Country::US_MA, - "United States (Massachusetts)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2015, 3, 17)?, "Evacuation Day"), (NaiveDate::from_ymd_res(2015, 4, 20)?, "Patriots' Day"), ], &mut map, - Country::US_MA, - "United States (Massachusetts)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2016, 3, 17)?, "Evacuation Day"), (NaiveDate::from_ymd_res(2016, 4, 18)?, "Patriots' Day"), ], &mut map, - Country::US_MA, - "United States (Massachusetts)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2017, 3, 17)?, "Evacuation Day"), (NaiveDate::from_ymd_res(2017, 4, 17)?, "Patriots' Day"), ], &mut map, - Country::US_MA, - "United States (Massachusetts)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2018, 3, 17)?, "Evacuation Day"), ( NaiveDate::from_ymd_res(2018, 3, 19)?, @@ -650,30 +284,15 @@ pub fn build( (NaiveDate::from_ymd_res(2018, 4, 16)?, "Patriots' Day"), ], &mut map, - Country::US_MA, - "United States (Massachusetts)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2019, 3, 17)?, "Evacuation Day"), ( NaiveDate::from_ymd_res(2019, 3, 18)?, @@ -682,194 +301,67 @@ pub fn build( (NaiveDate::from_ymd_res(2019, 4, 15)?, "Patriots' Day"), ], &mut map, - Country::US_MA, - "United States (Massachusetts)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2020, 3, 17)?, "Evacuation Day"), (NaiveDate::from_ymd_res(2020, 4, 20)?, "Patriots' Day"), ], &mut map, - Country::US_MA, - "United States (Massachusetts)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2021, 3, 17)?, "Evacuation Day"), (NaiveDate::from_ymd_res(2021, 4, 19)?, "Patriots' Day"), ], &mut map, - Country::US_MA, - "United States (Massachusetts)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2022, 3, 17)?, "Evacuation Day"), (NaiveDate::from_ymd_res(2022, 4, 18)?, "Patriots' Day"), ], &mut map, - Country::US_MA, - "United States (Massachusetts)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2023, 3, 17)?, "Evacuation Day"), (NaiveDate::from_ymd_res(2023, 4, 17)?, "Patriots' Day"), ], &mut map, - Country::US_MA, - "United States (Massachusetts)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2024, 3, 17)?, "Evacuation Day"), ( NaiveDate::from_ymd_res(2024, 3, 18)?, @@ -878,190 +370,67 @@ pub fn build( (NaiveDate::from_ymd_res(2024, 4, 15)?, "Patriots' Day"), ], &mut map, - Country::US_MA, - "United States (Massachusetts)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2025, 3, 17)?, "Evacuation Day"), (NaiveDate::from_ymd_res(2025, 4, 21)?, "Patriots' Day"), ], &mut map, - Country::US_MA, - "United States (Massachusetts)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2026, 3, 17)?, "Evacuation Day"), (NaiveDate::from_ymd_res(2026, 4, 20)?, "Patriots' Day"), ], &mut map, - Country::US_MA, - "United States (Massachusetts)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2027, 3, 17)?, "Evacuation Day"), (NaiveDate::from_ymd_res(2027, 4, 19)?, "Patriots' Day"), ], &mut map, - Country::US_MA, - "United States (Massachusetts)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2028, 3, 17)?, "Evacuation Day"), (NaiveDate::from_ymd_res(2028, 4, 17)?, "Patriots' Day"), ], &mut map, - Country::US_MA, - "United States (Massachusetts)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2029, 3, 17)?, "Evacuation Day"), ( NaiveDate::from_ymd_res(2029, 3, 19)?, @@ -1070,34 +439,15 @@ pub fn build( (NaiveDate::from_ymd_res(2029, 4, 16)?, "Patriots' Day"), ], &mut map, - Country::US_MA, - "United States (Massachusetts)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2030, 3, 17)?, "Evacuation Day"), ( NaiveDate::from_ymd_res(2030, 3, 18)?, @@ -1106,8 +456,8 @@ pub fn build( (NaiveDate::from_ymd_res(2030, 4, 15)?, "Patriots' Day"), ], &mut map, - Country::US_MA, - "United States (Massachusetts)", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/us_md.rs b/src/data/us_md.rs index 7a975ba..d2e1993 100644 --- a/src/data/us_md.rs +++ b/src/data/us_md.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "United States (Maryland)"; +const COUNTY_CODE: Country = Country::US_MD; + /// Generate holiday map for United States (Maryland). #[allow( unused_mut, @@ -9,311 +12,109 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); - build_year( + let mut national_holidays = de::build(years)?; + + build_subdivision_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 national_holidays, + [], &mut map, - Country::US_MD, - "United States (Maryland)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2001, 1, 20)?, "Inauguration Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2001, 1, 20)?, "Inauguration Day")], &mut map, - Country::US_MD, - "United States (Maryland)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::US_MD, - "United States (Maryland)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::US_MD, - "United States (Maryland)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::US_MD, - "United States (Maryland)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2005, 1, 20)?, "Inauguration Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2005, 1, 20)?, "Inauguration Day")], &mut map, - Country::US_MD, - "United States (Maryland)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::US_MD, - "United States (Maryland)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::US_MD, - "United States (Maryland)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - ( - NaiveDate::from_ymd_res(2008, 11, 28)?, - "American Indian Heritage Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2008, 11, 28)?, + "American Indian Heritage Day", + )], &mut map, - Country::US_MD, - "United States (Maryland)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2009, 1, 20)?, "Inauguration Day"), ( NaiveDate::from_ymd_res(2009, 11, 27)?, @@ -321,144 +122,54 @@ pub fn build( ), ], &mut map, - Country::US_MD, - "United States (Maryland)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - ( - NaiveDate::from_ymd_res(2010, 11, 26)?, - "American Indian Heritage Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2010, 11, 26)?, + "American Indian Heritage Day", + )], &mut map, - Country::US_MD, - "United States (Maryland)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - ( - NaiveDate::from_ymd_res(2011, 11, 25)?, - "American Indian Heritage Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2011, 11, 25)?, + "American Indian Heritage Day", + )], &mut map, - Country::US_MD, - "United States (Maryland)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - ( - NaiveDate::from_ymd_res(2012, 11, 23)?, - "American Indian Heritage Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2012, 11, 23)?, + "American Indian Heritage Day", + )], &mut map, - Country::US_MD, - "United States (Maryland)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Inauguration Day (observed); 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 national_holidays, + [ (NaiveDate::from_ymd_res(2013, 1, 20)?, "Inauguration Day"), ( NaiveDate::from_ymd_res(2013, 11, 29)?, @@ -466,136 +177,54 @@ pub fn build( ), ], &mut map, - Country::US_MD, - "United States (Maryland)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - ( - NaiveDate::from_ymd_res(2014, 11, 28)?, - "American Indian Heritage Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2014, 11, 28)?, + "American Indian Heritage Day", + )], &mut map, - Country::US_MD, - "United States (Maryland)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - ( - NaiveDate::from_ymd_res(2015, 11, 27)?, - "American Indian Heritage Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2015, 11, 27)?, + "American Indian Heritage Day", + )], &mut map, - Country::US_MD, - "United States (Maryland)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - ( - NaiveDate::from_ymd_res(2016, 11, 25)?, - "American Indian Heritage Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2016, 11, 25)?, + "American Indian Heritage Day", + )], &mut map, - Country::US_MD, - "United States (Maryland)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2017, 1, 20)?, "Inauguration Day"), ( NaiveDate::from_ymd_res(2017, 11, 24)?, @@ -603,148 +232,54 @@ pub fn build( ), ], &mut map, - Country::US_MD, - "United States (Maryland)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - ( - NaiveDate::from_ymd_res(2018, 11, 23)?, - "American Indian Heritage Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2018, 11, 23)?, + "American Indian Heritage Day", + )], &mut map, - Country::US_MD, - "United States (Maryland)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - ( - NaiveDate::from_ymd_res(2019, 11, 29)?, - "American Indian Heritage Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2019, 11, 29)?, + "American Indian Heritage Day", + )], &mut map, - Country::US_MD, - "United States (Maryland)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - ( - NaiveDate::from_ymd_res(2020, 11, 27)?, - "American Indian Heritage Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2020, 11, 27)?, + "American Indian Heritage Day", + )], &mut map, - Country::US_MD, - "United States (Maryland)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2021, 1, 20)?, "Inauguration Day"), ( NaiveDate::from_ymd_res(2021, 11, 26)?, @@ -752,316 +287,106 @@ pub fn build( ), ], &mut map, - Country::US_MD, - "United States (Maryland)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - ( - NaiveDate::from_ymd_res(2022, 11, 25)?, - "American Indian Heritage Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2022, 11, 25)?, + "American Indian Heritage Day", + )], &mut map, - Country::US_MD, - "United States (Maryland)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - ( - NaiveDate::from_ymd_res(2023, 11, 24)?, - "American Indian Heritage Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2023, 11, 24)?, + "American Indian Heritage Day", + )], &mut map, - Country::US_MD, - "United States (Maryland)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - ( - NaiveDate::from_ymd_res(2024, 11, 29)?, - "American Indian Heritage Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2024, 11, 29)?, + "American Indian Heritage Day", + )], &mut map, - Country::US_MD, - "United States (Maryland)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Inauguration Day; Martin Luther King Jr. Day", - ), - ( - NaiveDate::from_ymd_res(2025, 2, 17)?, - "Washington's Birthday", - ), - (NaiveDate::from_ymd_res(2025, 10, 13)?, "Columbus Day"), - ( - NaiveDate::from_ymd_res(2025, 11, 28)?, - "American Indian Heritage Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2025, 11, 28)?, + "American Indian Heritage Day", + )], &mut map, - Country::US_MD, - "United States (Maryland)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - ( - NaiveDate::from_ymd_res(2026, 11, 27)?, - "American Indian Heritage Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2026, 11, 27)?, + "American Indian Heritage Day", + )], &mut map, - Country::US_MD, - "United States (Maryland)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - ( - NaiveDate::from_ymd_res(2027, 11, 26)?, - "American Indian Heritage Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2027, 11, 26)?, + "American Indian Heritage Day", + )], &mut map, - Country::US_MD, - "United States (Maryland)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - ( - NaiveDate::from_ymd_res(2028, 11, 24)?, - "American Indian Heritage Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2028, 11, 24)?, + "American Indian Heritage Day", + )], &mut map, - Country::US_MD, - "United States (Maryland)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2029, 1, 20)?, "Inauguration Day"), ( NaiveDate::from_ymd_res(2029, 11, 23)?, @@ -1069,42 +394,21 @@ pub fn build( ), ], &mut map, - Country::US_MD, - "United States (Maryland)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - ( - NaiveDate::from_ymd_res(2030, 11, 29)?, - "American Indian Heritage Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2030, 11, 29)?, + "American Indian Heritage Day", + )], &mut map, - Country::US_MD, - "United States (Maryland)", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/us_me.rs b/src/data/us_me.rs index 7901f47..ac56df6 100644 --- a/src/data/us_me.rs +++ b/src/data/us_me.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "United States (Maine)"; +const COUNTY_CODE: Country = Country::US_ME; + /// Generate holiday map for United States (Maine). #[allow( unused_mut, @@ -9,1070 +12,319 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); - build_year( + let mut national_holidays = de::build(years)?; + + build_subdivision_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, 4, 17)?, "Patriots' Day"), - (NaiveDate::from_ymd_res(2000, 10, 9)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2000, 4, 17)?, "Patriots' Day")], &mut map, - Country::US_ME, - "United States (Maine)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 16)?, "Patriots' Day"), - (NaiveDate::from_ymd_res(2001, 10, 8)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2001, 4, 16)?, "Patriots' Day")], &mut map, - Country::US_ME, - "United States (Maine)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 15)?, "Patriots' Day"), - (NaiveDate::from_ymd_res(2002, 10, 14)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2002, 4, 15)?, "Patriots' Day")], &mut map, - Country::US_ME, - "United States (Maine)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 21)?, "Patriots' Day"), - (NaiveDate::from_ymd_res(2003, 10, 13)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2003, 4, 21)?, "Patriots' Day")], &mut map, - Country::US_ME, - "United States (Maine)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 19)?, "Patriots' Day"), - (NaiveDate::from_ymd_res(2004, 10, 11)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2004, 4, 19)?, "Patriots' Day")], &mut map, - Country::US_ME, - "United States (Maine)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 18)?, "Patriots' Day"), - (NaiveDate::from_ymd_res(2005, 10, 10)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2005, 4, 18)?, "Patriots' Day")], &mut map, - Country::US_ME, - "United States (Maine)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 17)?, "Patriots' Day"), - (NaiveDate::from_ymd_res(2006, 10, 9)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2006, 4, 17)?, "Patriots' Day")], &mut map, - Country::US_ME, - "United States (Maine)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 16)?, "Patriots' Day"), - (NaiveDate::from_ymd_res(2007, 10, 8)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2007, 4, 16)?, "Patriots' Day")], &mut map, - Country::US_ME, - "United States (Maine)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 21)?, "Patriots' Day"), - (NaiveDate::from_ymd_res(2008, 10, 13)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2008, 4, 21)?, "Patriots' Day")], &mut map, - Country::US_ME, - "United States (Maine)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 20)?, "Patriots' Day"), - (NaiveDate::from_ymd_res(2009, 10, 12)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2009, 4, 20)?, "Patriots' Day")], &mut map, - Country::US_ME, - "United States (Maine)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 19)?, "Patriots' Day"), - (NaiveDate::from_ymd_res(2010, 10, 11)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2010, 4, 19)?, "Patriots' Day")], &mut map, - Country::US_ME, - "United States (Maine)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 18)?, "Patriots' Day"), - (NaiveDate::from_ymd_res(2011, 10, 10)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2011, 4, 18)?, "Patriots' Day")], &mut map, - Country::US_ME, - "United States (Maine)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 16)?, "Patriots' Day"), - (NaiveDate::from_ymd_res(2012, 10, 8)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2012, 4, 16)?, "Patriots' Day")], &mut map, - Country::US_ME, - "United States (Maine)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 15)?, "Patriots' Day"), - (NaiveDate::from_ymd_res(2013, 10, 14)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2013, 4, 15)?, "Patriots' Day")], &mut map, - Country::US_ME, - "United States (Maine)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 21)?, "Patriots' Day"), - (NaiveDate::from_ymd_res(2014, 10, 13)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2014, 4, 21)?, "Patriots' Day")], &mut map, - Country::US_ME, - "United States (Maine)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 20)?, "Patriots' Day"), - (NaiveDate::from_ymd_res(2015, 10, 12)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2015, 4, 20)?, "Patriots' Day")], &mut map, - Country::US_ME, - "United States (Maine)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 18)?, "Patriots' Day"), - (NaiveDate::from_ymd_res(2016, 10, 10)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2016, 4, 18)?, "Patriots' Day")], &mut map, - Country::US_ME, - "United States (Maine)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 17)?, "Patriots' Day"), - (NaiveDate::from_ymd_res(2017, 10, 9)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2017, 4, 17)?, "Patriots' Day")], &mut map, - Country::US_ME, - "United States (Maine)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 16)?, "Patriots' Day"), - (NaiveDate::from_ymd_res(2018, 10, 8)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2018, 4, 16)?, "Patriots' Day")], &mut map, - Country::US_ME, - "United States (Maine)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 15)?, "Patriots' Day"), - ( - NaiveDate::from_ymd_res(2019, 10, 14)?, - "Indigenous Peoples' Day", - ), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2019, 4, 15)?, "Patriots' Day")], &mut map, - Country::US_ME, - "United States (Maine)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 20)?, "Patriots' Day"), - ( - NaiveDate::from_ymd_res(2020, 10, 12)?, - "Indigenous Peoples' Day", - ), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2020, 4, 20)?, "Patriots' Day")], &mut map, - Country::US_ME, - "United States (Maine)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 19)?, "Patriots' Day"), - ( - NaiveDate::from_ymd_res(2021, 10, 11)?, - "Indigenous Peoples' Day", - ), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2021, 4, 19)?, "Patriots' Day")], &mut map, - Country::US_ME, - "United States (Maine)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 18)?, "Patriots' Day"), - ( - NaiveDate::from_ymd_res(2022, 10, 10)?, - "Indigenous Peoples' Day", - ), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2022, 4, 18)?, "Patriots' Day")], &mut map, - Country::US_ME, - "United States (Maine)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 17)?, "Patriots' Day"), - ( - NaiveDate::from_ymd_res(2023, 10, 9)?, - "Indigenous Peoples' Day", - ), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2023, 4, 17)?, "Patriots' Day")], &mut map, - Country::US_ME, - "United States (Maine)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 15)?, "Patriots' Day"), - ( - NaiveDate::from_ymd_res(2024, 10, 14)?, - "Indigenous Peoples' Day", - ), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2024, 4, 15)?, "Patriots' Day")], &mut map, - Country::US_ME, - "United States (Maine)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 21)?, "Patriots' Day"), - ( - NaiveDate::from_ymd_res(2025, 10, 13)?, - "Indigenous Peoples' Day", - ), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2025, 4, 21)?, "Patriots' Day")], &mut map, - Country::US_ME, - "United States (Maine)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 20)?, "Patriots' Day"), - ( - NaiveDate::from_ymd_res(2026, 10, 12)?, - "Indigenous Peoples' Day", - ), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2026, 4, 20)?, "Patriots' Day")], &mut map, - Country::US_ME, - "United States (Maine)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 19)?, "Patriots' Day"), - ( - NaiveDate::from_ymd_res(2027, 10, 11)?, - "Indigenous Peoples' Day", - ), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2027, 4, 19)?, "Patriots' Day")], &mut map, - Country::US_ME, - "United States (Maine)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 17)?, "Patriots' Day"), - ( - NaiveDate::from_ymd_res(2028, 10, 9)?, - "Indigenous Peoples' Day", - ), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2028, 4, 17)?, "Patriots' Day")], &mut map, - Country::US_ME, - "United States (Maine)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 16)?, "Patriots' Day"), - ( - NaiveDate::from_ymd_res(2029, 10, 8)?, - "Indigenous Peoples' Day", - ), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2029, 4, 16)?, "Patriots' Day")], &mut map, - Country::US_ME, - "United States (Maine)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 15)?, "Patriots' Day"), - ( - NaiveDate::from_ymd_res(2030, 10, 14)?, - "Indigenous Peoples' Day", - ), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2030, 4, 15)?, "Patriots' Day")], &mut map, - Country::US_ME, - "United States (Maine)", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/us_mi.rs b/src/data/us_mi.rs index af4080e..3e36019 100644 --- a/src/data/us_mi.rs +++ b/src/data/us_mi.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "United States (Michigan)"; +const COUNTY_CODE: Country = Country::US_MI; + /// Generate holiday map for United States (Michigan). #[allow( unused_mut, @@ -9,508 +12,185 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); - build_year( + let mut national_holidays = de::build(years)?; + + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_MI, - "United States (Michigan)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_MI, - "United States (Michigan)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_MI, - "United States (Michigan)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_MI, - "United States (Michigan)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_MI, - "United States (Michigan)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_MI, - "United States (Michigan)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_MI, - "United States (Michigan)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_MI, - "United States (Michigan)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_MI, - "United States (Michigan)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_MI, - "United States (Michigan)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_MI, - "United States (Michigan)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_MI, - "United States (Michigan)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_MI, - "United States (Michigan)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2013, 12, 24)?, "Christmas Eve"), (NaiveDate::from_ymd_res(2013, 12, 31)?, "New Year's Eve"), ], &mut map, - Country::US_MI, - "United States (Michigan)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2014, 12, 24)?, "Christmas Eve"), (NaiveDate::from_ymd_res(2014, 12, 31)?, "New Year's Eve"), ], &mut map, - Country::US_MI, - "United States (Michigan)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2015, 12, 24)?, "Christmas Eve"), (NaiveDate::from_ymd_res(2015, 12, 31)?, "New Year's Eve"), ], &mut map, - Country::US_MI, - "United States (Michigan)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2016, 12, 24)?, "Christmas Eve"), ( NaiveDate::from_ymd_res(2016, 12, 23)?, @@ -523,37 +203,15 @@ pub fn build( ), ], &mut map, - Country::US_MI, - "United States (Michigan)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2017, 12, 24)?, "Christmas Eve"), ( NaiveDate::from_ymd_res(2017, 12, 22)?, @@ -562,179 +220,67 @@ pub fn build( (NaiveDate::from_ymd_res(2017, 12, 31)?, "New Year's Eve"), ], &mut map, - Country::US_MI, - "United States (Michigan)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2018, 12, 24)?, "Christmas Eve"), (NaiveDate::from_ymd_res(2018, 12, 31)?, "New Year's Eve"), ], &mut map, - Country::US_MI, - "United States (Michigan)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2019, 12, 24)?, "Christmas Eve"), (NaiveDate::from_ymd_res(2019, 12, 31)?, "New Year's Eve"), ], &mut map, - Country::US_MI, - "United States (Michigan)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2020, 12, 24)?, "Christmas Eve"), (NaiveDate::from_ymd_res(2020, 12, 31)?, "New Year's Eve"), ], &mut map, - Country::US_MI, - "United States (Michigan)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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); New Year's Eve", - ), - (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); Christmas Eve", - ), - ( - 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, 12, 23)?, - "Christmas Eve (observed)", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2021, 12, 23)?, + "Christmas Eve (observed)", + )], &mut map, - Country::US_MI, - "United States (Michigan)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2022, 12, 24)?, "Christmas Eve"), ( NaiveDate::from_ymd_res(2022, 12, 23)?, @@ -747,41 +293,15 @@ pub fn build( ), ], &mut map, - Country::US_MI, - "United States (Michigan)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2023, 12, 24)?, "Christmas Eve"), ( NaiveDate::from_ymd_res(2023, 12, 22)?, @@ -790,183 +310,67 @@ pub fn build( (NaiveDate::from_ymd_res(2023, 12, 31)?, "New Year's Eve"), ], &mut map, - Country::US_MI, - "United States (Michigan)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2024, 12, 24)?, "Christmas Eve"), (NaiveDate::from_ymd_res(2024, 12, 31)?, "New Year's Eve"), ], &mut map, - Country::US_MI, - "United States (Michigan)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2025, 12, 24)?, "Christmas Eve"), (NaiveDate::from_ymd_res(2025, 12, 31)?, "New Year's Eve"), ], &mut map, - Country::US_MI, - "United States (Michigan)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2026, 12, 24)?, "Christmas Eve"), (NaiveDate::from_ymd_res(2026, 12, 31)?, "New Year's Eve"), ], &mut map, - Country::US_MI, - "United States (Michigan)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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); New Year's Eve", - ), - (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); Christmas Eve", - ), - ( - 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, 12, 23)?, - "Christmas Eve (observed)", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2027, 12, 23)?, + "Christmas Eve (observed)", + )], &mut map, - Country::US_MI, - "United States (Michigan)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2028, 12, 24)?, "Christmas Eve"), ( NaiveDate::from_ymd_res(2028, 12, 22)?, @@ -975,74 +379,34 @@ pub fn build( (NaiveDate::from_ymd_res(2028, 12, 31)?, "New Year's Eve"), ], &mut map, - Country::US_MI, - "United States (Michigan)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2029, 12, 24)?, "Christmas Eve"), (NaiveDate::from_ymd_res(2029, 12, 31)?, "New Year's Eve"), ], &mut map, - Country::US_MI, - "United States (Michigan)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2030, 12, 24)?, "Christmas Eve"), (NaiveDate::from_ymd_res(2030, 12, 31)?, "New Year's Eve"), ], &mut map, - Country::US_MI, - "United States (Michigan)", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/us_mn.rs b/src/data/us_mn.rs index 4c34f2b..97643e0 100644 --- a/src/data/us_mn.rs +++ b/src/data/us_mn.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "United States (Minnesota)"; +const COUNTY_CODE: Country = Country::US_MN; + /// Generate holiday map for United States (Minnesota). #[allow( unused_mut, @@ -9,972 +12,319 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); - build_year( + let mut national_holidays = de::build(years)?; + + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_MN, - "United States (Minnesota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_MN, - "United States (Minnesota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_MN, - "United States (Minnesota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_MN, - "United States (Minnesota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_MN, - "United States (Minnesota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_MN, - "United States (Minnesota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_MN, - "United States (Minnesota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_MN, - "United States (Minnesota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_MN, - "United States (Minnesota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_MN, - "United States (Minnesota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_MN, - "United States (Minnesota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_MN, - "United States (Minnesota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_MN, - "United States (Minnesota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_MN, - "United States (Minnesota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_MN, - "United States (Minnesota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_MN, - "United States (Minnesota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_MN, - "United States (Minnesota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_MN, - "United States (Minnesota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_MN, - "United States (Minnesota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_MN, - "United States (Minnesota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_MN, - "United States (Minnesota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_MN, - "United States (Minnesota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_MN, - "United States (Minnesota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_MN, - "United States (Minnesota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_MN, - "United States (Minnesota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_MN, - "United States (Minnesota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_MN, - "United States (Minnesota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_MN, - "United States (Minnesota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_MN, - "United States (Minnesota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_MN, - "United States (Minnesota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_MN, - "United States (Minnesota)", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/us_mo.rs b/src/data/us_mo.rs index d0126e1..754462f 100644 --- a/src/data/us_mo.rs +++ b/src/data/us_mo.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "United States (Missouri)"; +const COUNTY_CODE: Country = Country::US_MO; + /// Generate holiday map for United States (Missouri). #[allow( unused_mut, @@ -9,159 +12,56 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); - build_year( + let mut national_holidays = de::build(years)?; + + build_subdivision_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"), - (NaiveDate::from_ymd_res(2000, 5, 8)?, "Truman Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2000, 5, 8)?, "Truman Day")], &mut map, - Country::US_MO, - "United States (Missouri)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2001, 5, 8)?, "Truman Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2001, 5, 8)?, "Truman Day")], &mut map, - Country::US_MO, - "United States (Missouri)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2002, 5, 8)?, "Truman Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2002, 5, 8)?, "Truman Day")], &mut map, - Country::US_MO, - "United States (Missouri)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2003, 5, 8)?, "Truman Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2003, 5, 8)?, "Truman Day")], &mut map, - Country::US_MO, - "United States (Missouri)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2004, 5, 8)?, "Truman Day"), ( NaiveDate::from_ymd_res(2004, 5, 7)?, @@ -169,34 +69,15 @@ pub fn build( ), ], &mut map, - Country::US_MO, - "United States (Missouri)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2005, 5, 8)?, "Truman Day"), ( NaiveDate::from_ymd_res(2005, 5, 9)?, @@ -204,166 +85,55 @@ pub fn build( ), ], &mut map, - Country::US_MO, - "United States (Missouri)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2006, 5, 8)?, "Truman Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2006, 5, 8)?, "Truman Day")], &mut map, - Country::US_MO, - "United States (Missouri)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2007, 5, 8)?, "Truman Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2007, 5, 8)?, "Truman Day")], &mut map, - Country::US_MO, - "United States (Missouri)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2008, 5, 8)?, "Truman Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2008, 5, 8)?, "Truman Day")], &mut map, - Country::US_MO, - "United States (Missouri)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2009, 5, 8)?, "Truman Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2009, 5, 8)?, "Truman Day")], &mut map, - Country::US_MO, - "United States (Missouri)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2010, 5, 8)?, "Truman Day"), ( NaiveDate::from_ymd_res(2010, 5, 7)?, @@ -371,34 +141,15 @@ pub fn build( ), ], &mut map, - Country::US_MO, - "United States (Missouri)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2011, 5, 8)?, "Truman Day"), ( NaiveDate::from_ymd_res(2011, 5, 9)?, @@ -406,154 +157,55 @@ pub fn build( ), ], &mut map, - Country::US_MO, - "United States (Missouri)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2012, 5, 8)?, "Truman Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2012, 5, 8)?, "Truman Day")], &mut map, - Country::US_MO, - "United States (Missouri)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2013, 5, 8)?, "Truman Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2013, 5, 8)?, "Truman Day")], &mut map, - Country::US_MO, - "United States (Missouri)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2014, 5, 8)?, "Truman Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2014, 5, 8)?, "Truman Day")], &mut map, - Country::US_MO, - "United States (Missouri)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2015, 5, 8)?, "Truman Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2015, 5, 8)?, "Truman Day")], &mut map, - Country::US_MO, - "United States (Missouri)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2016, 5, 8)?, "Truman Day"), ( NaiveDate::from_ymd_res(2016, 5, 9)?, @@ -561,174 +213,55 @@ pub fn build( ), ], &mut map, - Country::US_MO, - "United States (Missouri)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2017, 5, 8)?, "Truman Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2017, 5, 8)?, "Truman Day")], &mut map, - Country::US_MO, - "United States (Missouri)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2018, 5, 8)?, "Truman Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2018, 5, 8)?, "Truman Day")], &mut map, - Country::US_MO, - "United States (Missouri)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2019, 5, 8)?, "Truman Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2019, 5, 8)?, "Truman Day")], &mut map, - Country::US_MO, - "United States (Missouri)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2020, 5, 8)?, "Truman Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2020, 5, 8)?, "Truman Day")], &mut map, - Country::US_MO, - "United States (Missouri)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2021, 5, 8)?, "Truman Day"), ( NaiveDate::from_ymd_res(2021, 5, 7)?, @@ -736,42 +269,15 @@ pub fn build( ), ], &mut map, - Country::US_MO, - "United States (Missouri)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2022, 5, 8)?, "Truman Day"), ( NaiveDate::from_ymd_res(2022, 5, 9)?, @@ -779,186 +285,55 @@ pub fn build( ), ], &mut map, - Country::US_MO, - "United States (Missouri)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2023, 5, 8)?, "Truman Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2023, 5, 8)?, "Truman Day")], &mut map, - Country::US_MO, - "United States (Missouri)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2024, 5, 8)?, "Truman Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2024, 5, 8)?, "Truman Day")], &mut map, - Country::US_MO, - "United States (Missouri)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2025, 5, 8)?, "Truman Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2025, 5, 8)?, "Truman Day")], &mut map, - Country::US_MO, - "United States (Missouri)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2026, 5, 8)?, "Truman Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2026, 5, 8)?, "Truman Day")], &mut map, - Country::US_MO, - "United States (Missouri)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2027, 5, 8)?, "Truman Day"), ( NaiveDate::from_ymd_res(2027, 5, 7)?, @@ -966,109 +341,38 @@ pub fn build( ), ], &mut map, - Country::US_MO, - "United States (Missouri)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2028, 5, 8)?, "Truman Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2028, 5, 8)?, "Truman Day")], &mut map, - Country::US_MO, - "United States (Missouri)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2029, 5, 8)?, "Truman Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2029, 5, 8)?, "Truman Day")], &mut map, - Country::US_MO, - "United States (Missouri)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2030, 5, 8)?, "Truman Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2030, 5, 8)?, "Truman Day")], &mut map, - Country::US_MO, - "United States (Missouri)", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/us_mp.rs b/src/data/us_mp.rs index 369902b..5af6e99 100644 --- a/src/data/us_mp.rs +++ b/src/data/us_mp.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "United States (Northern Mariana Islands)"; +const COUNTY_CODE: Country = Country::US_MP; + /// Generate holiday map for United States (Northern Mariana Islands). #[allow( unused_mut, @@ -9,43 +12,21 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); - build_year( + let mut national_holidays = de::build(years)?; + + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2000, 3, 24)?, "Commonwealth Covenant Day", ), (NaiveDate::from_ymd_res(2000, 4, 21)?, "Good Friday"), - ( - NaiveDate::from_ymd_res(2000, 10, 9)?, - "Commonwealth Cultural Day", - ), (NaiveDate::from_ymd_res(2000, 11, 4)?, "Citizenship Day"), ( NaiveDate::from_ymd_res(2000, 11, 3)?, @@ -54,33 +35,15 @@ pub fn build( (NaiveDate::from_ymd_res(2000, 12, 8)?, "Constitution Day"), ], &mut map, - Country::US_MP, - "United States (Northern Mariana Islands)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2001, 3, 24)?, "Commonwealth Covenant Day", @@ -90,10 +53,6 @@ pub fn build( "Commonwealth Covenant Day (observed)", ), (NaiveDate::from_ymd_res(2001, 4, 13)?, "Good Friday"), - ( - NaiveDate::from_ymd_res(2001, 10, 8)?, - "Commonwealth Cultural Day", - ), (NaiveDate::from_ymd_res(2001, 11, 4)?, "Citizenship Day"), ( NaiveDate::from_ymd_res(2001, 11, 5)?, @@ -106,29 +65,15 @@ pub fn build( ), ], &mut map, - Country::US_MP, - "United States (Northern Mariana Islands)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2002, 3, 24)?, "Commonwealth Covenant Day", @@ -138,10 +83,6 @@ pub fn build( "Commonwealth Covenant Day (observed)", ), (NaiveDate::from_ymd_res(2002, 3, 29)?, "Good Friday"), - ( - NaiveDate::from_ymd_res(2002, 10, 14)?, - "Commonwealth Cultural Day", - ), (NaiveDate::from_ymd_res(2002, 11, 4)?, "Citizenship Day"), (NaiveDate::from_ymd_res(2002, 12, 8)?, "Constitution Day"), ( @@ -150,170 +91,74 @@ pub fn build( ), ], &mut map, - Country::US_MP, - "United States (Northern Mariana Islands)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2003, 3, 24)?, "Commonwealth Covenant Day", ), (NaiveDate::from_ymd_res(2003, 4, 18)?, "Good Friday"), - ( - NaiveDate::from_ymd_res(2003, 10, 13)?, - "Commonwealth Cultural Day", - ), (NaiveDate::from_ymd_res(2003, 11, 4)?, "Citizenship Day"), (NaiveDate::from_ymd_res(2003, 12, 8)?, "Constitution Day"), ], &mut map, - Country::US_MP, - "United States (Northern Mariana Islands)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2004, 3, 24)?, "Commonwealth Covenant Day", ), (NaiveDate::from_ymd_res(2004, 4, 9)?, "Good Friday"), - ( - NaiveDate::from_ymd_res(2004, 10, 11)?, - "Commonwealth Cultural Day", - ), (NaiveDate::from_ymd_res(2004, 11, 4)?, "Citizenship Day"), (NaiveDate::from_ymd_res(2004, 12, 8)?, "Constitution Day"), ], &mut map, - Country::US_MP, - "United States (Northern Mariana Islands)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2005, 3, 24)?, "Commonwealth Covenant Day", ), (NaiveDate::from_ymd_res(2005, 3, 25)?, "Good Friday"), - ( - NaiveDate::from_ymd_res(2005, 10, 10)?, - "Commonwealth Cultural Day", - ), (NaiveDate::from_ymd_res(2005, 11, 4)?, "Citizenship Day"), (NaiveDate::from_ymd_res(2005, 12, 8)?, "Constitution Day"), ], &mut map, - Country::US_MP, - "United States (Northern Mariana Islands)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2006, 3, 24)?, "Commonwealth Covenant Day", ), (NaiveDate::from_ymd_res(2006, 4, 14)?, "Good Friday"), - ( - NaiveDate::from_ymd_res(2006, 10, 9)?, - "Commonwealth Cultural Day", - ), (NaiveDate::from_ymd_res(2006, 11, 4)?, "Citizenship Day"), ( NaiveDate::from_ymd_res(2006, 11, 3)?, @@ -322,33 +167,15 @@ pub fn build( (NaiveDate::from_ymd_res(2006, 12, 8)?, "Constitution Day"), ], &mut map, - Country::US_MP, - "United States (Northern Mariana Islands)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2007, 3, 24)?, "Commonwealth Covenant Day", @@ -358,10 +185,6 @@ pub fn build( "Commonwealth Covenant Day (observed)", ), (NaiveDate::from_ymd_res(2007, 4, 6)?, "Good Friday"), - ( - NaiveDate::from_ymd_res(2007, 10, 8)?, - "Commonwealth Cultural Day", - ), (NaiveDate::from_ymd_res(2007, 11, 4)?, "Citizenship Day"), ( NaiveDate::from_ymd_res(2007, 11, 5)?, @@ -374,38 +197,20 @@ pub fn build( ), ], &mut map, - Country::US_MP, - "United States (Northern Mariana Islands)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2008, 3, 24)?, "Commonwealth Covenant Day", ), (NaiveDate::from_ymd_res(2008, 3, 21)?, "Good Friday"), - ( - NaiveDate::from_ymd_res(2008, 10, 13)?, - "Commonwealth Cultural Day", - ), ( NaiveDate::from_ymd_res(2008, 11, 4)?, "Citizenship Day; Election Day", @@ -413,166 +218,70 @@ pub fn build( (NaiveDate::from_ymd_res(2008, 12, 8)?, "Constitution Day"), ], &mut map, - Country::US_MP, - "United States (Northern Mariana Islands)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2009, 3, 24)?, "Commonwealth Covenant Day", ), (NaiveDate::from_ymd_res(2009, 4, 10)?, "Good Friday"), - ( - NaiveDate::from_ymd_res(2009, 10, 12)?, - "Commonwealth Cultural Day", - ), (NaiveDate::from_ymd_res(2009, 11, 4)?, "Citizenship Day"), (NaiveDate::from_ymd_res(2009, 12, 8)?, "Constitution Day"), ], &mut map, - Country::US_MP, - "United States (Northern Mariana Islands)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2010, 3, 24)?, "Commonwealth Covenant Day", ), (NaiveDate::from_ymd_res(2010, 4, 2)?, "Good Friday"), - ( - NaiveDate::from_ymd_res(2010, 10, 11)?, - "Commonwealth Cultural Day", - ), (NaiveDate::from_ymd_res(2010, 11, 2)?, "Election Day"), (NaiveDate::from_ymd_res(2010, 11, 4)?, "Citizenship Day"), (NaiveDate::from_ymd_res(2010, 12, 8)?, "Constitution Day"), ], &mut map, - Country::US_MP, - "United States (Northern Mariana Islands)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2011, 3, 24)?, "Commonwealth Covenant Day", ), (NaiveDate::from_ymd_res(2011, 4, 22)?, "Good Friday"), - ( - NaiveDate::from_ymd_res(2011, 10, 10)?, - "Commonwealth Cultural Day", - ), (NaiveDate::from_ymd_res(2011, 11, 4)?, "Citizenship Day"), (NaiveDate::from_ymd_res(2011, 12, 8)?, "Constitution Day"), ], &mut map, - Country::US_MP, - "United States (Northern Mariana Islands)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2012, 3, 24)?, "Commonwealth Covenant Day", @@ -582,10 +291,6 @@ pub fn build( "Commonwealth Covenant Day (observed)", ), (NaiveDate::from_ymd_res(2012, 4, 6)?, "Good Friday"), - ( - NaiveDate::from_ymd_res(2012, 10, 8)?, - "Commonwealth Cultural Day", - ), (NaiveDate::from_ymd_res(2012, 11, 6)?, "Election Day"), (NaiveDate::from_ymd_res(2012, 11, 4)?, "Citizenship Day"), ( @@ -599,29 +304,15 @@ pub fn build( ), ], &mut map, - Country::US_MP, - "United States (Northern Mariana Islands)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2013, 3, 24)?, "Commonwealth Covenant Day", @@ -631,10 +322,6 @@ pub fn build( "Commonwealth Covenant Day (observed)", ), (NaiveDate::from_ymd_res(2013, 3, 29)?, "Good Friday"), - ( - NaiveDate::from_ymd_res(2013, 10, 14)?, - "Commonwealth Cultural Day", - ), (NaiveDate::from_ymd_res(2013, 11, 4)?, "Citizenship Day"), (NaiveDate::from_ymd_res(2013, 12, 8)?, "Constitution Day"), ( @@ -643,38 +330,20 @@ pub fn build( ), ], &mut map, - Country::US_MP, - "United States (Northern Mariana Islands)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2014, 3, 24)?, "Commonwealth Covenant Day", ), (NaiveDate::from_ymd_res(2014, 4, 18)?, "Good Friday"), - ( - NaiveDate::from_ymd_res(2014, 10, 13)?, - "Commonwealth Cultural Day", - ), ( NaiveDate::from_ymd_res(2014, 11, 4)?, "Citizenship Day; Election Day", @@ -682,127 +351,57 @@ pub fn build( (NaiveDate::from_ymd_res(2014, 12, 8)?, "Constitution Day"), ], &mut map, - Country::US_MP, - "United States (Northern Mariana Islands)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2015, 3, 24)?, "Commonwealth Covenant Day", ), (NaiveDate::from_ymd_res(2015, 4, 3)?, "Good Friday"), - ( - NaiveDate::from_ymd_res(2015, 10, 12)?, - "Commonwealth Cultural Day", - ), (NaiveDate::from_ymd_res(2015, 11, 4)?, "Citizenship Day"), (NaiveDate::from_ymd_res(2015, 12, 8)?, "Constitution Day"), ], &mut map, - Country::US_MP, - "United States (Northern Mariana Islands)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2016, 3, 24)?, "Commonwealth Covenant Day", ), (NaiveDate::from_ymd_res(2016, 3, 25)?, "Good Friday"), - ( - NaiveDate::from_ymd_res(2016, 10, 10)?, - "Commonwealth Cultural Day", - ), (NaiveDate::from_ymd_res(2016, 11, 8)?, "Election Day"), (NaiveDate::from_ymd_res(2016, 11, 4)?, "Citizenship Day"), (NaiveDate::from_ymd_res(2016, 12, 8)?, "Constitution Day"), ], &mut map, - Country::US_MP, - "United States (Northern Mariana Islands)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2017, 3, 24)?, "Commonwealth Covenant Day", ), (NaiveDate::from_ymd_res(2017, 4, 14)?, "Good Friday"), - ( - NaiveDate::from_ymd_res(2017, 10, 9)?, - "Commonwealth Cultural Day", - ), (NaiveDate::from_ymd_res(2017, 11, 4)?, "Citizenship Day"), ( NaiveDate::from_ymd_res(2017, 11, 3)?, @@ -811,33 +410,15 @@ pub fn build( (NaiveDate::from_ymd_res(2017, 12, 8)?, "Constitution Day"), ], &mut map, - Country::US_MP, - "United States (Northern Mariana Islands)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2018, 3, 24)?, "Commonwealth Covenant Day", @@ -847,10 +428,6 @@ pub fn build( "Commonwealth Covenant Day (observed)", ), (NaiveDate::from_ymd_res(2018, 3, 30)?, "Good Friday"), - ( - NaiveDate::from_ymd_res(2018, 10, 8)?, - "Commonwealth Cultural Day", - ), (NaiveDate::from_ymd_res(2018, 11, 6)?, "Election Day"), (NaiveDate::from_ymd_res(2018, 11, 4)?, "Citizenship Day"), ( @@ -864,29 +441,15 @@ pub fn build( ), ], &mut map, - Country::US_MP, - "United States (Northern Mariana Islands)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2019, 3, 24)?, "Commonwealth Covenant Day", @@ -896,10 +459,6 @@ pub fn build( "Commonwealth Covenant Day (observed)", ), (NaiveDate::from_ymd_res(2019, 4, 19)?, "Good Friday"), - ( - NaiveDate::from_ymd_res(2019, 10, 14)?, - "Commonwealth Cultural Day", - ), (NaiveDate::from_ymd_res(2019, 11, 4)?, "Citizenship Day"), (NaiveDate::from_ymd_res(2019, 12, 8)?, "Constitution Day"), ( @@ -908,196 +467,76 @@ pub fn build( ), ], &mut map, - Country::US_MP, - "United States (Northern Mariana Islands)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2020, 3, 24)?, "Commonwealth Covenant Day", ), (NaiveDate::from_ymd_res(2020, 4, 10)?, "Good Friday"), - ( - NaiveDate::from_ymd_res(2020, 10, 12)?, - "Commonwealth Cultural Day", - ), (NaiveDate::from_ymd_res(2020, 11, 3)?, "Election Day"), (NaiveDate::from_ymd_res(2020, 11, 4)?, "Citizenship Day"), (NaiveDate::from_ymd_res(2020, 12, 8)?, "Constitution Day"), ], &mut map, - Country::US_MP, - "United States (Northern Mariana Islands)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2021, 3, 24)?, "Commonwealth Covenant Day", ), (NaiveDate::from_ymd_res(2021, 4, 2)?, "Good Friday"), - ( - NaiveDate::from_ymd_res(2021, 10, 11)?, - "Commonwealth Cultural Day", - ), (NaiveDate::from_ymd_res(2021, 11, 4)?, "Citizenship Day"), (NaiveDate::from_ymd_res(2021, 12, 8)?, "Constitution Day"), ], &mut map, - Country::US_MP, - "United States (Northern Mariana Islands)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2022, 3, 24)?, "Commonwealth Covenant Day", ), (NaiveDate::from_ymd_res(2022, 4, 15)?, "Good Friday"), - ( - NaiveDate::from_ymd_res(2022, 10, 10)?, - "Commonwealth Cultural Day", - ), (NaiveDate::from_ymd_res(2022, 11, 8)?, "Election Day"), (NaiveDate::from_ymd_res(2022, 11, 4)?, "Citizenship Day"), (NaiveDate::from_ymd_res(2022, 12, 8)?, "Constitution Day"), ], &mut map, - Country::US_MP, - "United States (Northern Mariana Islands)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2023, 3, 24)?, "Commonwealth Covenant Day", ), (NaiveDate::from_ymd_res(2023, 4, 7)?, "Good Friday"), - ( - NaiveDate::from_ymd_res(2023, 10, 9)?, - "Commonwealth Cultural Day", - ), (NaiveDate::from_ymd_res(2023, 11, 4)?, "Citizenship Day"), ( NaiveDate::from_ymd_res(2023, 11, 3)?, @@ -1106,33 +545,15 @@ pub fn build( (NaiveDate::from_ymd_res(2023, 12, 8)?, "Constitution Day"), ], &mut map, - Country::US_MP, - "United States (Northern Mariana Islands)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2024, 3, 24)?, "Commonwealth Covenant Day", @@ -1142,10 +563,6 @@ pub fn build( "Commonwealth Covenant Day (observed)", ), (NaiveDate::from_ymd_res(2024, 3, 29)?, "Good Friday"), - ( - NaiveDate::from_ymd_res(2024, 10, 14)?, - "Commonwealth Cultural Day", - ), (NaiveDate::from_ymd_res(2024, 11, 5)?, "Election Day"), (NaiveDate::from_ymd_res(2024, 11, 4)?, "Citizenship Day"), (NaiveDate::from_ymd_res(2024, 12, 8)?, "Constitution Day"), @@ -1155,187 +572,75 @@ pub fn build( ), ], &mut map, - Country::US_MP, - "United States (Northern Mariana Islands)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2025, 3, 24)?, "Commonwealth Covenant Day", ), (NaiveDate::from_ymd_res(2025, 4, 18)?, "Good Friday"), - ( - NaiveDate::from_ymd_res(2025, 10, 13)?, - "Commonwealth Cultural Day", - ), (NaiveDate::from_ymd_res(2025, 11, 4)?, "Citizenship Day"), (NaiveDate::from_ymd_res(2025, 12, 8)?, "Constitution Day"), ], &mut map, - Country::US_MP, - "United States (Northern Mariana Islands)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2026, 3, 24)?, "Commonwealth Covenant Day", ), (NaiveDate::from_ymd_res(2026, 4, 3)?, "Good Friday"), - ( - NaiveDate::from_ymd_res(2026, 10, 12)?, - "Commonwealth Cultural Day", - ), (NaiveDate::from_ymd_res(2026, 11, 3)?, "Election Day"), (NaiveDate::from_ymd_res(2026, 11, 4)?, "Citizenship Day"), (NaiveDate::from_ymd_res(2026, 12, 8)?, "Constitution Day"), ], &mut map, - Country::US_MP, - "United States (Northern Mariana Islands)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2027, 3, 24)?, "Commonwealth Covenant Day", ), (NaiveDate::from_ymd_res(2027, 3, 26)?, "Good Friday"), - ( - NaiveDate::from_ymd_res(2027, 10, 11)?, - "Commonwealth Cultural Day", - ), (NaiveDate::from_ymd_res(2027, 11, 4)?, "Citizenship Day"), (NaiveDate::from_ymd_res(2027, 12, 8)?, "Constitution Day"), ], &mut map, - Country::US_MP, - "United States (Northern Mariana Islands)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2028, 3, 24)?, "Commonwealth Covenant Day", ), (NaiveDate::from_ymd_res(2028, 4, 14)?, "Good Friday"), - ( - NaiveDate::from_ymd_res(2028, 10, 9)?, - "Commonwealth Cultural Day", - ), (NaiveDate::from_ymd_res(2028, 11, 7)?, "Election Day"), (NaiveDate::from_ymd_res(2028, 11, 4)?, "Citizenship Day"), ( @@ -1345,37 +650,15 @@ pub fn build( (NaiveDate::from_ymd_res(2028, 12, 8)?, "Constitution Day"), ], &mut map, - Country::US_MP, - "United States (Northern Mariana Islands)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2029, 3, 24)?, "Commonwealth Covenant Day", @@ -1385,10 +668,6 @@ pub fn build( "Commonwealth Covenant Day (observed)", ), (NaiveDate::from_ymd_res(2029, 3, 30)?, "Good Friday"), - ( - NaiveDate::from_ymd_res(2029, 10, 8)?, - "Commonwealth Cultural Day", - ), (NaiveDate::from_ymd_res(2029, 11, 4)?, "Citizenship Day"), ( NaiveDate::from_ymd_res(2029, 11, 5)?, @@ -1401,33 +680,15 @@ pub fn build( ), ], &mut map, - Country::US_MP, - "United States (Northern Mariana Islands)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2030, 3, 24)?, "Commonwealth Covenant Day", @@ -1437,10 +698,6 @@ pub fn build( "Commonwealth Covenant Day (observed)", ), (NaiveDate::from_ymd_res(2030, 4, 19)?, "Good Friday"), - ( - NaiveDate::from_ymd_res(2030, 10, 14)?, - "Commonwealth Cultural Day", - ), (NaiveDate::from_ymd_res(2030, 11, 5)?, "Election Day"), (NaiveDate::from_ymd_res(2030, 11, 4)?, "Citizenship Day"), (NaiveDate::from_ymd_res(2030, 12, 8)?, "Constitution Day"), @@ -1450,8 +707,8 @@ pub fn build( ), ], &mut map, - Country::US_MP, - "United States (Northern Mariana Islands)", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/us_ms.rs b/src/data/us_ms.rs index 4f7e7d2..529f0ae 100644 --- a/src/data/us_ms.rs +++ b/src/data/us_ms.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "United States (Mississippi)"; +const COUNTY_CODE: Country = Country::US_MS; + /// Generate holiday map for United States (Mississippi). #[allow( unused_mut, @@ -9,1096 +12,412 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); - build_year( + let mut national_holidays = de::build(years)?; + + build_subdivision_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, 2, 21)?, - "Washington's Birthday", - ), - ( - NaiveDate::from_ymd_res(2000, 1, 17)?, - "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", - ), - ( - NaiveDate::from_ymd_res(2000, 4, 24)?, - "Confederate Memorial Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2000, 4, 24)?, + "Confederate Memorial Day", + )], &mut map, - Country::US_MS, - "United States (Mississippi)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 19)?, - "Washington's Birthday", - ), - ( - NaiveDate::from_ymd_res(2001, 1, 15)?, - "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", - ), - ( - NaiveDate::from_ymd_res(2001, 4, 30)?, - "Confederate Memorial Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2001, 4, 30)?, + "Confederate Memorial Day", + )], &mut map, - Country::US_MS, - "United States (Mississippi)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 18)?, - "Washington's Birthday", - ), - ( - NaiveDate::from_ymd_res(2002, 1, 21)?, - "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", - ), - ( - NaiveDate::from_ymd_res(2002, 4, 29)?, - "Confederate Memorial Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2002, 4, 29)?, + "Confederate Memorial Day", + )], &mut map, - Country::US_MS, - "United States (Mississippi)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 17)?, - "Washington's Birthday", - ), - ( - NaiveDate::from_ymd_res(2003, 1, 20)?, - "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", - ), - ( - NaiveDate::from_ymd_res(2003, 4, 28)?, - "Confederate Memorial Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2003, 4, 28)?, + "Confederate Memorial Day", + )], &mut map, - Country::US_MS, - "United States (Mississippi)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 16)?, - "Washington's Birthday", - ), - ( - NaiveDate::from_ymd_res(2004, 1, 19)?, - "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", - ), - ( - NaiveDate::from_ymd_res(2004, 4, 26)?, - "Confederate Memorial Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2004, 4, 26)?, + "Confederate Memorial Day", + )], &mut map, - Country::US_MS, - "United States (Mississippi)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 21)?, - "Washington's Birthday", - ), - ( - NaiveDate::from_ymd_res(2005, 1, 17)?, - "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", - ), - ( - NaiveDate::from_ymd_res(2005, 4, 25)?, - "Confederate Memorial Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2005, 4, 25)?, + "Confederate Memorial Day", + )], &mut map, - Country::US_MS, - "United States (Mississippi)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 20)?, - "Washington's Birthday", - ), - ( - NaiveDate::from_ymd_res(2006, 1, 16)?, - "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", - ), - ( - NaiveDate::from_ymd_res(2006, 4, 24)?, - "Confederate Memorial Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2006, 4, 24)?, + "Confederate Memorial Day", + )], &mut map, - Country::US_MS, - "United States (Mississippi)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 19)?, - "Washington's Birthday", - ), - ( - NaiveDate::from_ymd_res(2007, 1, 15)?, - "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", - ), - ( - NaiveDate::from_ymd_res(2007, 4, 30)?, - "Confederate Memorial Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2007, 4, 30)?, + "Confederate Memorial Day", + )], &mut map, - Country::US_MS, - "United States (Mississippi)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 18)?, - "Washington's Birthday", - ), - ( - NaiveDate::from_ymd_res(2008, 1, 21)?, - "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", - ), - ( - NaiveDate::from_ymd_res(2008, 4, 28)?, - "Confederate Memorial Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2008, 4, 28)?, + "Confederate Memorial Day", + )], &mut map, - Country::US_MS, - "United States (Mississippi)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 16)?, - "Washington's Birthday", - ), - ( - NaiveDate::from_ymd_res(2009, 1, 19)?, - "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", - ), - ( - NaiveDate::from_ymd_res(2009, 4, 27)?, - "Confederate Memorial Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2009, 4, 27)?, + "Confederate Memorial Day", + )], &mut map, - Country::US_MS, - "United States (Mississippi)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 15)?, - "Washington's Birthday", - ), - ( - NaiveDate::from_ymd_res(2010, 1, 18)?, - "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", - ), - ( - NaiveDate::from_ymd_res(2010, 4, 26)?, - "Confederate Memorial Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2010, 4, 26)?, + "Confederate Memorial Day", + )], &mut map, - Country::US_MS, - "United States (Mississippi)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 21)?, - "Washington's Birthday", - ), - ( - NaiveDate::from_ymd_res(2011, 1, 17)?, - "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", - ), - ( - NaiveDate::from_ymd_res(2011, 4, 25)?, - "Confederate Memorial Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2011, 4, 25)?, + "Confederate Memorial Day", + )], &mut map, - Country::US_MS, - "United States (Mississippi)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 20)?, - "Washington's Birthday", - ), - ( - NaiveDate::from_ymd_res(2012, 1, 16)?, - "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", - ), - ( - NaiveDate::from_ymd_res(2012, 4, 30)?, - "Confederate Memorial Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2012, 4, 30)?, + "Confederate Memorial Day", + )], &mut map, - Country::US_MS, - "United States (Mississippi)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 18)?, - "Washington's Birthday", - ), - ( - NaiveDate::from_ymd_res(2013, 1, 21)?, - "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", - ), - ( - NaiveDate::from_ymd_res(2013, 4, 29)?, - "Confederate Memorial Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2013, 4, 29)?, + "Confederate Memorial Day", + )], &mut map, - Country::US_MS, - "United States (Mississippi)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 17)?, - "Washington's Birthday", - ), - ( - NaiveDate::from_ymd_res(2014, 1, 20)?, - "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", - ), - ( - NaiveDate::from_ymd_res(2014, 4, 28)?, - "Confederate Memorial Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2014, 4, 28)?, + "Confederate Memorial Day", + )], &mut map, - Country::US_MS, - "United States (Mississippi)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 16)?, - "Washington's Birthday", - ), - ( - NaiveDate::from_ymd_res(2015, 1, 19)?, - "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", - ), - ( - NaiveDate::from_ymd_res(2015, 4, 27)?, - "Confederate Memorial Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2015, 4, 27)?, + "Confederate Memorial Day", + )], &mut map, - Country::US_MS, - "United States (Mississippi)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 15)?, - "Washington's Birthday", - ), - ( - NaiveDate::from_ymd_res(2016, 1, 18)?, - "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", - ), - ( - NaiveDate::from_ymd_res(2016, 4, 25)?, - "Confederate Memorial Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2016, 4, 25)?, + "Confederate Memorial Day", + )], &mut map, - Country::US_MS, - "United States (Mississippi)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 20)?, - "Washington's Birthday", - ), - ( - NaiveDate::from_ymd_res(2017, 1, 16)?, - "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", - ), - ( - NaiveDate::from_ymd_res(2017, 4, 24)?, - "Confederate Memorial Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2017, 4, 24)?, + "Confederate Memorial Day", + )], &mut map, - Country::US_MS, - "United States (Mississippi)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 19)?, - "Washington's Birthday", - ), - ( - NaiveDate::from_ymd_res(2018, 1, 15)?, - "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", - ), - ( - NaiveDate::from_ymd_res(2018, 4, 30)?, - "Confederate Memorial Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2018, 4, 30)?, + "Confederate Memorial Day", + )], &mut map, - Country::US_MS, - "United States (Mississippi)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 18)?, - "Washington's Birthday", - ), - ( - NaiveDate::from_ymd_res(2019, 1, 21)?, - "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", - ), - ( - NaiveDate::from_ymd_res(2019, 4, 29)?, - "Confederate Memorial Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2019, 4, 29)?, + "Confederate Memorial Day", + )], &mut map, - Country::US_MS, - "United States (Mississippi)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 17)?, - "Washington's Birthday", - ), - ( - NaiveDate::from_ymd_res(2020, 1, 20)?, - "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", - ), - ( - NaiveDate::from_ymd_res(2020, 4, 27)?, - "Confederate Memorial Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2020, 4, 27)?, + "Confederate Memorial Day", + )], &mut map, - Country::US_MS, - "United States (Mississippi)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 15)?, - "Washington's Birthday", - ), - ( - NaiveDate::from_ymd_res(2021, 1, 18)?, - "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", - ), - ( - NaiveDate::from_ymd_res(2021, 4, 26)?, - "Confederate Memorial Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2021, 4, 26)?, + "Confederate Memorial Day", + )], &mut map, - Country::US_MS, - "United States (Mississippi)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 21)?, - "Washington's Birthday", - ), - ( - NaiveDate::from_ymd_res(2022, 1, 17)?, - "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", - ), - ( - NaiveDate::from_ymd_res(2022, 4, 25)?, - "Confederate Memorial Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2022, 4, 25)?, + "Confederate Memorial Day", + )], &mut map, - Country::US_MS, - "United States (Mississippi)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 20)?, - "Washington's Birthday", - ), - ( - NaiveDate::from_ymd_res(2023, 1, 16)?, - "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", - ), - ( - NaiveDate::from_ymd_res(2023, 4, 24)?, - "Confederate Memorial Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2023, 4, 24)?, + "Confederate Memorial Day", + )], &mut map, - Country::US_MS, - "United States (Mississippi)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 19)?, - "Washington's Birthday", - ), - ( - NaiveDate::from_ymd_res(2024, 1, 15)?, - "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", - ), - ( - NaiveDate::from_ymd_res(2024, 4, 29)?, - "Confederate Memorial Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2024, 4, 29)?, + "Confederate Memorial Day", + )], &mut map, - Country::US_MS, - "United States (Mississippi)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 17)?, - "Washington's Birthday", - ), - ( - NaiveDate::from_ymd_res(2025, 1, 20)?, - "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", - ), - ( - NaiveDate::from_ymd_res(2025, 4, 28)?, - "Confederate Memorial Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2025, 4, 28)?, + "Confederate Memorial Day", + )], &mut map, - Country::US_MS, - "United States (Mississippi)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 16)?, - "Washington's Birthday", - ), - ( - NaiveDate::from_ymd_res(2026, 1, 19)?, - "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", - ), - ( - NaiveDate::from_ymd_res(2026, 4, 27)?, - "Confederate Memorial Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2026, 4, 27)?, + "Confederate Memorial Day", + )], &mut map, - Country::US_MS, - "United States (Mississippi)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 15)?, - "Washington's Birthday", - ), - ( - NaiveDate::from_ymd_res(2027, 1, 18)?, - "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", - ), - ( - NaiveDate::from_ymd_res(2027, 4, 26)?, - "Confederate Memorial Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2027, 4, 26)?, + "Confederate Memorial Day", + )], &mut map, - Country::US_MS, - "United States (Mississippi)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 21)?, - "Washington's Birthday", - ), - ( - NaiveDate::from_ymd_res(2028, 1, 17)?, - "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", - ), - ( - NaiveDate::from_ymd_res(2028, 4, 24)?, - "Confederate Memorial Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2028, 4, 24)?, + "Confederate Memorial Day", + )], &mut map, - Country::US_MS, - "United States (Mississippi)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 19)?, - "Washington's Birthday", - ), - ( - NaiveDate::from_ymd_res(2029, 1, 15)?, - "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", - ), - ( - NaiveDate::from_ymd_res(2029, 4, 30)?, - "Confederate Memorial Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2029, 4, 30)?, + "Confederate Memorial Day", + )], &mut map, - Country::US_MS, - "United States (Mississippi)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 18)?, - "Washington's Birthday", - ), - ( - NaiveDate::from_ymd_res(2030, 1, 21)?, - "Dr. Martin Luther King Jr. and Robert E. Lee's Birthdays", - ), - ( - NaiveDate::from_ymd_res(2030, 4, 29)?, - "Confederate Memorial Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2030, 4, 29)?, + "Confederate Memorial Day", + )], &mut map, - Country::US_MS, - "United States (Mississippi)", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/us_mt.rs b/src/data/us_mt.rs index 4174a1a..60aac6c 100644 --- a/src/data/us_mt.rs +++ b/src/data/us_mt.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "United States (Montana)"; +const COUNTY_CODE: Country = Country::US_MT; + /// Generate holiday map for United States (Montana). #[allow( unused_mut, @@ -9,1015 +12,319 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); - build_year( + let mut national_holidays = de::build(years)?; + + build_subdivision_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 national_holidays, + [], &mut map, - Country::US_MT, - "United States (Montana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::US_MT, - "United States (Montana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::US_MT, - "United States (Montana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::US_MT, - "United States (Montana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::US_MT, - "United States (Montana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::US_MT, - "United States (Montana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::US_MT, - "United States (Montana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::US_MT, - "United States (Montana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2008, 11, 4)?, "Election Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2008, 11, 4)?, "Election Day")], &mut map, - Country::US_MT, - "United States (Montana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::US_MT, - "United States (Montana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2010, 11, 2)?, "Election Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2010, 11, 2)?, "Election Day")], &mut map, - Country::US_MT, - "United States (Montana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::US_MT, - "United States (Montana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2012, 11, 6)?, "Election Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2012, 11, 6)?, "Election Day")], &mut map, - Country::US_MT, - "United States (Montana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::US_MT, - "United States (Montana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2014, 11, 4)?, "Election Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2014, 11, 4)?, "Election Day")], &mut map, - Country::US_MT, - "United States (Montana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::US_MT, - "United States (Montana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2016, 11, 8)?, "Election Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2016, 11, 8)?, "Election Day")], &mut map, - Country::US_MT, - "United States (Montana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::US_MT, - "United States (Montana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2018, 11, 6)?, "Election Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2018, 11, 6)?, "Election Day")], &mut map, - Country::US_MT, - "United States (Montana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::US_MT, - "United States (Montana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2020, 11, 3)?, "Election Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2020, 11, 3)?, "Election Day")], &mut map, - Country::US_MT, - "United States (Montana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::US_MT, - "United States (Montana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2022, 11, 8)?, "Election Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2022, 11, 8)?, "Election Day")], &mut map, - Country::US_MT, - "United States (Montana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::US_MT, - "United States (Montana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2024, 11, 5)?, "Election Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2024, 11, 5)?, "Election Day")], &mut map, - Country::US_MT, - "United States (Montana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::US_MT, - "United States (Montana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2026, 11, 3)?, "Election Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2026, 11, 3)?, "Election Day")], &mut map, - Country::US_MT, - "United States (Montana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::US_MT, - "United States (Montana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2028, 11, 7)?, "Election Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2028, 11, 7)?, "Election Day")], &mut map, - Country::US_MT, - "United States (Montana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::US_MT, - "United States (Montana)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2030, 11, 5)?, "Election Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2030, 11, 5)?, "Election Day")], &mut map, - Country::US_MT, - "United States (Montana)", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/us_nc.rs b/src/data/us_nc.rs index f9b1d86..ca38724 100644 --- a/src/data/us_nc.rs +++ b/src/data/us_nc.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "United States (North Carolina)"; +const COUNTY_CODE: Country = Country::US_NC; + /// Generate holiday map for United States (North Carolina). #[allow( unused_mut, @@ -9,34 +12,16 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); - build_year( + let mut national_holidays = de::build(years)?; + + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2000, 4, 21)?, "Good Friday"), ( NaiveDate::from_ymd_res(2000, 11, 24)?, @@ -44,33 +29,15 @@ pub fn build( ), ], &mut map, - Country::US_NC, - "United States (North Carolina)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2001, 4, 13)?, "Good Friday"), ( NaiveDate::from_ymd_res(2001, 11, 23)?, @@ -78,29 +45,15 @@ pub fn build( ), ], &mut map, - Country::US_NC, - "United States (North Carolina)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2002, 3, 29)?, "Good Friday"), ( NaiveDate::from_ymd_res(2002, 11, 29)?, @@ -108,29 +61,15 @@ pub fn build( ), ], &mut map, - Country::US_NC, - "United States (North Carolina)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2003, 4, 18)?, "Good Friday"), ( NaiveDate::from_ymd_res(2003, 11, 28)?, @@ -138,41 +77,15 @@ pub fn build( ), ], &mut map, - Country::US_NC, - "United States (North Carolina)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2004, 4, 9)?, "Good Friday"), ( NaiveDate::from_ymd_res(2004, 11, 26)?, @@ -180,33 +93,15 @@ pub fn build( ), ], &mut map, - Country::US_NC, - "United States (North Carolina)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2005, 3, 25)?, "Good Friday"), ( NaiveDate::from_ymd_res(2005, 11, 25)?, @@ -214,37 +109,15 @@ pub fn build( ), ], &mut map, - Country::US_NC, - "United States (North Carolina)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2006, 4, 14)?, "Good Friday"), ( NaiveDate::from_ymd_res(2006, 11, 24)?, @@ -252,33 +125,15 @@ pub fn build( ), ], &mut map, - Country::US_NC, - "United States (North Carolina)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2007, 4, 6)?, "Good Friday"), ( NaiveDate::from_ymd_res(2007, 11, 23)?, @@ -286,29 +141,15 @@ pub fn build( ), ], &mut map, - Country::US_NC, - "United States (North Carolina)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2008, 3, 21)?, "Good Friday"), ( NaiveDate::from_ymd_res(2008, 11, 28)?, @@ -316,33 +157,15 @@ pub fn build( ), ], &mut map, - Country::US_NC, - "United States (North Carolina)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2009, 4, 10)?, "Good Friday"), ( NaiveDate::from_ymd_res(2009, 11, 27)?, @@ -350,41 +173,15 @@ pub fn build( ), ], &mut map, - Country::US_NC, - "United States (North Carolina)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2010, 4, 2)?, "Good Friday"), ( NaiveDate::from_ymd_res(2010, 11, 26)?, @@ -392,33 +189,15 @@ pub fn build( ), ], &mut map, - Country::US_NC, - "United States (North Carolina)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2011, 4, 22)?, "Good Friday"), ( NaiveDate::from_ymd_res(2011, 11, 25)?, @@ -426,37 +205,15 @@ pub fn build( ), ], &mut map, - Country::US_NC, - "United States (North Carolina)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2012, 4, 6)?, "Good Friday"), ( NaiveDate::from_ymd_res(2012, 11, 23)?, @@ -464,29 +221,15 @@ pub fn build( ), ], &mut map, - Country::US_NC, - "United States (North Carolina)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2013, 3, 29)?, "Good Friday"), ( NaiveDate::from_ymd_res(2013, 11, 29)?, @@ -499,29 +242,15 @@ pub fn build( ), ], &mut map, - Country::US_NC, - "United States (North Carolina)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2014, 4, 18)?, "Good Friday"), ( NaiveDate::from_ymd_res(2014, 11, 28)?, @@ -534,33 +263,15 @@ pub fn build( ), ], &mut map, - Country::US_NC, - "United States (North Carolina)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2015, 4, 3)?, "Good Friday"), ( NaiveDate::from_ymd_res(2015, 11, 27)?, @@ -577,33 +288,15 @@ pub fn build( ), ], &mut map, - Country::US_NC, - "United States (North Carolina)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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); Day After Christmas", - ), - ( - NaiveDate::from_ymd_res(2016, 1, 18)?, - "Martin Luther King Jr. Day", - ), - ( - NaiveDate::from_ymd_res(2016, 2, 15)?, - "Washington's Birthday", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2016, 3, 25)?, "Good Friday"), ( NaiveDate::from_ymd_res(2016, 11, 25)?, @@ -620,37 +313,15 @@ pub fn build( ), ], &mut map, - Country::US_NC, - "United States (North Carolina)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2017, 4, 14)?, "Good Friday"), ( NaiveDate::from_ymd_res(2017, 11, 24)?, @@ -667,33 +338,15 @@ pub fn build( ), ], &mut map, - Country::US_NC, - "United States (North Carolina)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2018, 3, 30)?, "Good Friday"), ( NaiveDate::from_ymd_res(2018, 11, 23)?, @@ -706,29 +359,15 @@ pub fn build( ), ], &mut map, - Country::US_NC, - "United States (North Carolina)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2019, 4, 19)?, "Good Friday"), ( NaiveDate::from_ymd_res(2019, 11, 29)?, @@ -741,33 +380,15 @@ pub fn build( ), ], &mut map, - Country::US_NC, - "United States (North Carolina)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2020, 4, 10)?, "Good Friday"), ( NaiveDate::from_ymd_res(2020, 11, 27)?, @@ -784,49 +405,15 @@ pub fn build( ), ], &mut map, - Country::US_NC, - "United States (North Carolina)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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); Christmas Eve", - ), - ( - NaiveDate::from_ymd_res(2021, 1, 18)?, - "Martin Luther King Jr. Day", - ), - ( - NaiveDate::from_ymd_res(2021, 2, 15)?, - "Washington's Birthday", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2021, 4, 2)?, "Good Friday"), ( NaiveDate::from_ymd_res(2021, 11, 26)?, @@ -846,41 +433,15 @@ pub fn build( ), ], &mut map, - Country::US_NC, - "United States (North Carolina)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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); Day After Christmas", - ), - ( - NaiveDate::from_ymd_res(2022, 1, 17)?, - "Martin Luther King Jr. Day", - ), - ( - NaiveDate::from_ymd_res(2022, 2, 21)?, - "Washington's Birthday", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2022, 4, 15)?, "Good Friday"), ( NaiveDate::from_ymd_res(2022, 11, 25)?, @@ -897,41 +458,15 @@ pub fn build( ), ], &mut map, - Country::US_NC, - "United States (North Carolina)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2023, 4, 7)?, "Good Friday"), ( NaiveDate::from_ymd_res(2023, 11, 24)?, @@ -948,33 +483,15 @@ pub fn build( ), ], &mut map, - Country::US_NC, - "United States (North Carolina)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2024, 3, 29)?, "Good Friday"), ( NaiveDate::from_ymd_res(2024, 11, 29)?, @@ -987,33 +504,15 @@ pub fn build( ), ], &mut map, - Country::US_NC, - "United States (North Carolina)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2025, 4, 18)?, "Good Friday"), ( NaiveDate::from_ymd_res(2025, 11, 28)?, @@ -1026,37 +525,15 @@ pub fn build( ), ], &mut map, - Country::US_NC, - "United States (North Carolina)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2026, 4, 3)?, "Good Friday"), ( NaiveDate::from_ymd_res(2026, 11, 27)?, @@ -1073,49 +550,15 @@ pub fn build( ), ], &mut map, - Country::US_NC, - "United States (North Carolina)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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); Christmas Eve", - ), - ( - NaiveDate::from_ymd_res(2027, 1, 18)?, - "Martin Luther King Jr. Day", - ), - ( - NaiveDate::from_ymd_res(2027, 2, 15)?, - "Washington's Birthday", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2027, 3, 26)?, "Good Friday"), ( NaiveDate::from_ymd_res(2027, 11, 26)?, @@ -1135,37 +578,15 @@ pub fn build( ), ], &mut map, - Country::US_NC, - "United States (North Carolina)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2028, 4, 14)?, "Good Friday"), ( NaiveDate::from_ymd_res(2028, 11, 24)?, @@ -1182,37 +603,15 @@ pub fn build( ), ], &mut map, - Country::US_NC, - "United States (North Carolina)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2029, 3, 30)?, "Good Friday"), ( NaiveDate::from_ymd_res(2029, 11, 23)?, @@ -1225,33 +624,15 @@ pub fn build( ), ], &mut map, - Country::US_NC, - "United States (North Carolina)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2030, 4, 19)?, "Good Friday"), ( NaiveDate::from_ymd_res(2030, 11, 29)?, @@ -1264,8 +645,8 @@ pub fn build( ), ], &mut map, - Country::US_NC, - "United States (North Carolina)", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/us_nd.rs b/src/data/us_nd.rs index 35623bc..92b324b 100644 --- a/src/data/us_nd.rs +++ b/src/data/us_nd.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "United States (North Dakota)"; +const COUNTY_CODE: Country = Country::US_ND; + /// Generate holiday map for United States (North Dakota). #[allow( unused_mut, @@ -9,972 +12,319 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); - build_year( + let mut national_holidays = de::build(years)?; + + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_ND, - "United States (North Dakota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_ND, - "United States (North Dakota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_ND, - "United States (North Dakota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_ND, - "United States (North Dakota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_ND, - "United States (North Dakota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_ND, - "United States (North Dakota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_ND, - "United States (North Dakota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_ND, - "United States (North Dakota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_ND, - "United States (North Dakota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_ND, - "United States (North Dakota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_ND, - "United States (North Dakota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_ND, - "United States (North Dakota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_ND, - "United States (North Dakota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_ND, - "United States (North Dakota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_ND, - "United States (North Dakota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_ND, - "United States (North Dakota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_ND, - "United States (North Dakota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_ND, - "United States (North Dakota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_ND, - "United States (North Dakota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_ND, - "United States (North Dakota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_ND, - "United States (North Dakota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_ND, - "United States (North Dakota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_ND, - "United States (North Dakota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_ND, - "United States (North Dakota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_ND, - "United States (North Dakota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_ND, - "United States (North Dakota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_ND, - "United States (North Dakota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_ND, - "United States (North Dakota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_ND, - "United States (North Dakota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_ND, - "United States (North Dakota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_ND, - "United States (North Dakota)", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/us_ne.rs b/src/data/us_ne.rs index 86c2d71..11fdd14 100644 --- a/src/data/us_ne.rs +++ b/src/data/us_ne.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "United States (Nebraska)"; +const COUNTY_CODE: Country = Country::US_NE; + /// Generate holiday map for United States (Nebraska). #[allow( unused_mut, @@ -9,1067 +12,319 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); - build_year( + let mut national_holidays = de::build(years)?; + + build_subdivision_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, 4, 28)?, "Arbor Day"), - (NaiveDate::from_ymd_res(2000, 10, 9)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2000, 4, 28)?, "Arbor Day")], &mut map, - Country::US_NE, - "United States (Nebraska)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 27)?, "Arbor Day"), - (NaiveDate::from_ymd_res(2001, 10, 8)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2001, 4, 27)?, "Arbor Day")], &mut map, - Country::US_NE, - "United States (Nebraska)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 26)?, "Arbor Day"), - (NaiveDate::from_ymd_res(2002, 10, 14)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2002, 4, 26)?, "Arbor Day")], &mut map, - Country::US_NE, - "United States (Nebraska)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 25)?, "Arbor Day"), - (NaiveDate::from_ymd_res(2003, 10, 13)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2003, 4, 25)?, "Arbor Day")], &mut map, - Country::US_NE, - "United States (Nebraska)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 30)?, "Arbor Day"), - (NaiveDate::from_ymd_res(2004, 10, 11)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2004, 4, 30)?, "Arbor Day")], &mut map, - Country::US_NE, - "United States (Nebraska)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 29)?, "Arbor Day"), - (NaiveDate::from_ymd_res(2005, 10, 10)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2005, 4, 29)?, "Arbor Day")], &mut map, - Country::US_NE, - "United States (Nebraska)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 28)?, "Arbor Day"), - (NaiveDate::from_ymd_res(2006, 10, 9)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2006, 4, 28)?, "Arbor Day")], &mut map, - Country::US_NE, - "United States (Nebraska)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 27)?, "Arbor Day"), - (NaiveDate::from_ymd_res(2007, 10, 8)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2007, 4, 27)?, "Arbor Day")], &mut map, - Country::US_NE, - "United States (Nebraska)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 25)?, "Arbor Day"), - (NaiveDate::from_ymd_res(2008, 10, 13)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2008, 4, 25)?, "Arbor Day")], &mut map, - Country::US_NE, - "United States (Nebraska)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 24)?, "Arbor Day"), - (NaiveDate::from_ymd_res(2009, 10, 12)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2009, 4, 24)?, "Arbor Day")], &mut map, - Country::US_NE, - "United States (Nebraska)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 30)?, "Arbor Day"), - (NaiveDate::from_ymd_res(2010, 10, 11)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2010, 4, 30)?, "Arbor Day")], &mut map, - Country::US_NE, - "United States (Nebraska)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 29)?, "Arbor Day"), - (NaiveDate::from_ymd_res(2011, 10, 10)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2011, 4, 29)?, "Arbor Day")], &mut map, - Country::US_NE, - "United States (Nebraska)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 27)?, "Arbor Day"), - (NaiveDate::from_ymd_res(2012, 10, 8)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2012, 4, 27)?, "Arbor Day")], &mut map, - Country::US_NE, - "United States (Nebraska)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 26)?, "Arbor Day"), - (NaiveDate::from_ymd_res(2013, 10, 14)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2013, 4, 26)?, "Arbor Day")], &mut map, - Country::US_NE, - "United States (Nebraska)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 25)?, "Arbor Day"), - (NaiveDate::from_ymd_res(2014, 10, 13)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2014, 4, 25)?, "Arbor Day")], &mut map, - Country::US_NE, - "United States (Nebraska)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 24)?, "Arbor Day"), - (NaiveDate::from_ymd_res(2015, 10, 12)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2015, 4, 24)?, "Arbor Day")], &mut map, - Country::US_NE, - "United States (Nebraska)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 29)?, "Arbor Day"), - (NaiveDate::from_ymd_res(2016, 10, 10)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2016, 4, 29)?, "Arbor Day")], &mut map, - Country::US_NE, - "United States (Nebraska)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 28)?, "Arbor Day"), - (NaiveDate::from_ymd_res(2017, 10, 9)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2017, 4, 28)?, "Arbor Day")], &mut map, - Country::US_NE, - "United States (Nebraska)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 27)?, "Arbor Day"), - (NaiveDate::from_ymd_res(2018, 10, 8)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2018, 4, 27)?, "Arbor Day")], &mut map, - Country::US_NE, - "United States (Nebraska)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 26)?, "Arbor Day"), - (NaiveDate::from_ymd_res(2019, 10, 14)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2019, 4, 26)?, "Arbor Day")], &mut map, - Country::US_NE, - "United States (Nebraska)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 24)?, "Arbor Day"), - ( - NaiveDate::from_ymd_res(2020, 10, 12)?, - "Indigenous Peoples' Day", - ), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2020, 4, 24)?, "Arbor Day")], &mut map, - Country::US_NE, - "United States (Nebraska)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 30)?, "Arbor Day"), - ( - NaiveDate::from_ymd_res(2021, 10, 11)?, - "Indigenous Peoples' Day", - ), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2021, 4, 30)?, "Arbor Day")], &mut map, - Country::US_NE, - "United States (Nebraska)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 29)?, "Arbor Day"), - ( - NaiveDate::from_ymd_res(2022, 10, 10)?, - "Indigenous Peoples' Day", - ), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2022, 4, 29)?, "Arbor Day")], &mut map, - Country::US_NE, - "United States (Nebraska)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 28)?, "Arbor Day"), - ( - NaiveDate::from_ymd_res(2023, 10, 9)?, - "Indigenous Peoples' Day", - ), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2023, 4, 28)?, "Arbor Day")], &mut map, - Country::US_NE, - "United States (Nebraska)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 26)?, "Arbor Day"), - ( - NaiveDate::from_ymd_res(2024, 10, 14)?, - "Indigenous Peoples' Day", - ), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2024, 4, 26)?, "Arbor Day")], &mut map, - Country::US_NE, - "United States (Nebraska)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 25)?, "Arbor Day"), - ( - NaiveDate::from_ymd_res(2025, 10, 13)?, - "Indigenous Peoples' Day", - ), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2025, 4, 25)?, "Arbor Day")], &mut map, - Country::US_NE, - "United States (Nebraska)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 24)?, "Arbor Day"), - ( - NaiveDate::from_ymd_res(2026, 10, 12)?, - "Indigenous Peoples' Day", - ), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2026, 4, 24)?, "Arbor Day")], &mut map, - Country::US_NE, - "United States (Nebraska)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 30)?, "Arbor Day"), - ( - NaiveDate::from_ymd_res(2027, 10, 11)?, - "Indigenous Peoples' Day", - ), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2027, 4, 30)?, "Arbor Day")], &mut map, - Country::US_NE, - "United States (Nebraska)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 28)?, "Arbor Day"), - ( - NaiveDate::from_ymd_res(2028, 10, 9)?, - "Indigenous Peoples' Day", - ), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2028, 4, 28)?, "Arbor Day")], &mut map, - Country::US_NE, - "United States (Nebraska)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 27)?, "Arbor Day"), - ( - NaiveDate::from_ymd_res(2029, 10, 8)?, - "Indigenous Peoples' Day", - ), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2029, 4, 27)?, "Arbor Day")], &mut map, - Country::US_NE, - "United States (Nebraska)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 26)?, "Arbor Day"), - ( - NaiveDate::from_ymd_res(2030, 10, 14)?, - "Indigenous Peoples' Day", - ), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2030, 4, 26)?, "Arbor Day")], &mut map, - Country::US_NE, - "United States (Nebraska)", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/us_nh.rs b/src/data/us_nh.rs index 7db2d7c..c8a9a11 100644 --- a/src/data/us_nh.rs +++ b/src/data/us_nh.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "United States (New Hampshire)"; +const COUNTY_CODE: Country = Country::US_NH; + /// Generate holiday map for United States (New Hampshire). #[allow( unused_mut, @@ -9,298 +12,120 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); - build_year( + let mut national_holidays = de::build(years)?; + + build_subdivision_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, 2, 21)?, - "Washington's Birthday", - ), - ( - NaiveDate::from_ymd_res(2000, 1, 17)?, - "Dr. Martin Luther King Jr. / Civil Rights Day", - ), - ( - NaiveDate::from_ymd_res(2000, 11, 24)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2000, 11, 24)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_NH, - "United States (New Hampshire)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 19)?, - "Washington's Birthday", - ), - ( - NaiveDate::from_ymd_res(2001, 1, 15)?, - "Dr. Martin Luther King Jr. / Civil Rights Day", - ), - ( - NaiveDate::from_ymd_res(2001, 11, 23)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2001, 11, 23)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_NH, - "United States (New Hampshire)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 18)?, - "Washington's Birthday", - ), - ( - NaiveDate::from_ymd_res(2002, 1, 21)?, - "Dr. Martin Luther King Jr. / Civil Rights Day", - ), - ( - NaiveDate::from_ymd_res(2002, 11, 29)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2002, 11, 29)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_NH, - "United States (New Hampshire)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 17)?, - "Washington's Birthday", - ), - ( - NaiveDate::from_ymd_res(2003, 1, 20)?, - "Dr. Martin Luther King Jr. / Civil Rights Day", - ), - ( - NaiveDate::from_ymd_res(2003, 11, 28)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2003, 11, 28)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_NH, - "United States (New Hampshire)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 16)?, - "Washington's Birthday", - ), - ( - NaiveDate::from_ymd_res(2004, 1, 19)?, - "Dr. Martin Luther King Jr. / Civil Rights Day", - ), - ( - NaiveDate::from_ymd_res(2004, 11, 26)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2004, 11, 26)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_NH, - "United States (New Hampshire)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 21)?, - "Washington's Birthday", - ), - ( - NaiveDate::from_ymd_res(2005, 1, 17)?, - "Dr. Martin Luther King Jr. / Civil Rights Day", - ), - ( - NaiveDate::from_ymd_res(2005, 11, 25)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2005, 11, 25)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_NH, - "United States (New Hampshire)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 20)?, - "Washington's Birthday", - ), - ( - NaiveDate::from_ymd_res(2006, 1, 16)?, - "Dr. Martin Luther King Jr. / Civil Rights Day", - ), - ( - NaiveDate::from_ymd_res(2006, 11, 24)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2006, 11, 24)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_NH, - "United States (New Hampshire)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 19)?, - "Washington's Birthday", - ), - ( - NaiveDate::from_ymd_res(2007, 1, 15)?, - "Dr. Martin Luther King Jr. / Civil Rights Day", - ), - ( - NaiveDate::from_ymd_res(2007, 11, 23)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2007, 11, 23)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_NH, - "United States (New Hampshire)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 18)?, - "Washington's Birthday", - ), - ( - NaiveDate::from_ymd_res(2008, 1, 21)?, - "Dr. Martin Luther King Jr. / Civil Rights Day", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2008, 11, 4)?, "Election Day"), ( NaiveDate::from_ymd_res(2008, 11, 28)?, @@ -308,74 +133,28 @@ pub fn build( ), ], &mut map, - Country::US_NH, - "United States (New Hampshire)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 16)?, - "Washington's Birthday", - ), - ( - NaiveDate::from_ymd_res(2009, 1, 19)?, - "Dr. Martin Luther King Jr. / Civil Rights Day", - ), - ( - NaiveDate::from_ymd_res(2009, 11, 27)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2009, 11, 27)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_NH, - "United States (New Hampshire)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 15)?, - "Washington's Birthday", - ), - ( - NaiveDate::from_ymd_res(2010, 1, 18)?, - "Dr. Martin Luther King Jr. / Civil Rights Day", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2010, 11, 2)?, "Election Day"), ( NaiveDate::from_ymd_res(2010, 11, 26)?, @@ -383,70 +162,28 @@ pub fn build( ), ], &mut map, - Country::US_NH, - "United States (New Hampshire)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 21)?, - "Washington's Birthday", - ), - ( - NaiveDate::from_ymd_res(2011, 1, 17)?, - "Dr. Martin Luther King Jr. / Civil Rights Day", - ), - ( - NaiveDate::from_ymd_res(2011, 11, 25)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2011, 11, 25)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_NH, - "United States (New Hampshire)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 20)?, - "Washington's Birthday", - ), - ( - NaiveDate::from_ymd_res(2012, 1, 16)?, - "Dr. Martin Luther King Jr. / Civil Rights Day", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2012, 11, 6)?, "Election Day"), ( NaiveDate::from_ymd_res(2012, 11, 23)?, @@ -454,58 +191,28 @@ pub fn build( ), ], &mut map, - Country::US_NH, - "United States (New Hampshire)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 18)?, - "Washington's Birthday", - ), - ( - NaiveDate::from_ymd_res(2013, 1, 21)?, - "Dr. Martin Luther King Jr. / Civil Rights Day", - ), - ( - NaiveDate::from_ymd_res(2013, 11, 29)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2013, 11, 29)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_NH, - "United States (New Hampshire)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 17)?, - "Washington's Birthday", - ), - ( - NaiveDate::from_ymd_res(2014, 1, 20)?, - "Dr. Martin Luther King Jr. / Civil Rights Day", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2014, 11, 4)?, "Election Day"), ( NaiveDate::from_ymd_res(2014, 11, 28)?, @@ -513,66 +220,28 @@ pub fn build( ), ], &mut map, - Country::US_NH, - "United States (New Hampshire)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 16)?, - "Washington's Birthday", - ), - ( - NaiveDate::from_ymd_res(2015, 1, 19)?, - "Dr. Martin Luther King Jr. / Civil Rights Day", - ), - ( - NaiveDate::from_ymd_res(2015, 11, 27)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2015, 11, 27)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_NH, - "United States (New Hampshire)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 15)?, - "Washington's Birthday", - ), - ( - NaiveDate::from_ymd_res(2016, 1, 18)?, - "Dr. Martin Luther King Jr. / Civil Rights Day", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2016, 11, 8)?, "Election Day"), ( NaiveDate::from_ymd_res(2016, 11, 25)?, @@ -580,70 +249,28 @@ pub fn build( ), ], &mut map, - Country::US_NH, - "United States (New Hampshire)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 20)?, - "Washington's Birthday", - ), - ( - NaiveDate::from_ymd_res(2017, 1, 16)?, - "Dr. Martin Luther King Jr. / Civil Rights Day", - ), - ( - NaiveDate::from_ymd_res(2017, 11, 24)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2017, 11, 24)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_NH, - "United States (New Hampshire)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 19)?, - "Washington's Birthday", - ), - ( - NaiveDate::from_ymd_res(2018, 1, 15)?, - "Dr. Martin Luther King Jr. / Civil Rights Day", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2018, 11, 6)?, "Election Day"), ( NaiveDate::from_ymd_res(2018, 11, 23)?, @@ -651,62 +278,28 @@ pub fn build( ), ], &mut map, - Country::US_NH, - "United States (New Hampshire)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 18)?, - "Washington's Birthday", - ), - ( - NaiveDate::from_ymd_res(2019, 1, 21)?, - "Dr. Martin Luther King Jr. / Civil Rights Day", - ), - ( - NaiveDate::from_ymd_res(2019, 11, 29)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2019, 11, 29)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_NH, - "United States (New Hampshire)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 17)?, - "Washington's Birthday", - ), - ( - NaiveDate::from_ymd_res(2020, 1, 20)?, - "Dr. Martin Luther King Jr. / Civil Rights Day", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2020, 11, 3)?, "Election Day"), ( NaiveDate::from_ymd_res(2020, 11, 27)?, @@ -714,90 +307,28 @@ pub fn build( ), ], &mut map, - Country::US_NH, - "United States (New Hampshire)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 15)?, - "Washington's Birthday", - ), - ( - NaiveDate::from_ymd_res(2021, 1, 18)?, - "Dr. Martin Luther King Jr. / Civil Rights Day", - ), - ( - NaiveDate::from_ymd_res(2021, 11, 26)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2021, 11, 26)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_NH, - "United States (New Hampshire)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 21)?, - "Washington's Birthday", - ), - ( - NaiveDate::from_ymd_res(2022, 1, 17)?, - "Dr. Martin Luther King Jr. / Civil Rights Day", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2022, 11, 8)?, "Election Day"), ( NaiveDate::from_ymd_res(2022, 11, 25)?, @@ -805,74 +336,28 @@ pub fn build( ), ], &mut map, - Country::US_NH, - "United States (New Hampshire)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 20)?, - "Washington's Birthday", - ), - ( - NaiveDate::from_ymd_res(2023, 1, 16)?, - "Dr. Martin Luther King Jr. / Civil Rights Day", - ), - ( - NaiveDate::from_ymd_res(2023, 11, 24)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2023, 11, 24)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_NH, - "United States (New Hampshire)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 19)?, - "Washington's Birthday", - ), - ( - NaiveDate::from_ymd_res(2024, 1, 15)?, - "Dr. Martin Luther King Jr. / Civil Rights Day", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2024, 11, 5)?, "Election Day"), ( NaiveDate::from_ymd_res(2024, 11, 29)?, @@ -880,70 +365,28 @@ pub fn build( ), ], &mut map, - Country::US_NH, - "United States (New Hampshire)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 17)?, - "Washington's Birthday", - ), - ( - NaiveDate::from_ymd_res(2025, 1, 20)?, - "Dr. Martin Luther King Jr. / Civil Rights Day", - ), - ( - NaiveDate::from_ymd_res(2025, 11, 28)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2025, 11, 28)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_NH, - "United States (New Hampshire)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 16)?, - "Washington's Birthday", - ), - ( - NaiveDate::from_ymd_res(2026, 1, 19)?, - "Dr. Martin Luther King Jr. / Civil Rights Day", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2026, 11, 3)?, "Election Day"), ( NaiveDate::from_ymd_res(2026, 11, 27)?, @@ -951,86 +394,28 @@ pub fn build( ), ], &mut map, - Country::US_NH, - "United States (New Hampshire)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 15)?, - "Washington's Birthday", - ), - ( - NaiveDate::from_ymd_res(2027, 1, 18)?, - "Dr. Martin Luther King Jr. / Civil Rights Day", - ), - ( - NaiveDate::from_ymd_res(2027, 11, 26)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2027, 11, 26)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_NH, - "United States (New Hampshire)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 21)?, - "Washington's Birthday", - ), - ( - NaiveDate::from_ymd_res(2028, 1, 17)?, - "Dr. Martin Luther King Jr. / Civil Rights Day", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2028, 11, 7)?, "Election Day"), ( NaiveDate::from_ymd_res(2028, 11, 24)?, @@ -1038,70 +423,28 @@ pub fn build( ), ], &mut map, - Country::US_NH, - "United States (New Hampshire)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 19)?, - "Washington's Birthday", - ), - ( - NaiveDate::from_ymd_res(2029, 1, 15)?, - "Dr. Martin Luther King Jr. / Civil Rights Day", - ), - ( - NaiveDate::from_ymd_res(2029, 11, 23)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2029, 11, 23)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_NH, - "United States (New Hampshire)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 18)?, - "Washington's Birthday", - ), - ( - NaiveDate::from_ymd_res(2030, 1, 21)?, - "Dr. Martin Luther King Jr. / Civil Rights Day", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2030, 11, 5)?, "Election Day"), ( NaiveDate::from_ymd_res(2030, 11, 29)?, @@ -1109,8 +452,8 @@ pub fn build( ), ], &mut map, - Country::US_NH, - "United States (New Hampshire)", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/us_nj.rs b/src/data/us_nj.rs index d62cf9c..0e697a1 100644 --- a/src/data/us_nj.rs +++ b/src/data/us_nj.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "United States (New Jersey)"; +const COUNTY_CODE: Country = Country::US_NJ; + /// Generate holiday map for United States (New Jersey). #[allow( unused_mut, @@ -9,35 +12,16 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); - build_year( + let mut national_holidays = de::build(years)?; + + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2000, 2, 12)?, "Lincoln's Birthday"), ( NaiveDate::from_ymd_res(2000, 2, 11)?, @@ -46,162 +30,67 @@ pub fn build( (NaiveDate::from_ymd_res(2000, 4, 21)?, "Good Friday"), ], &mut map, - Country::US_NJ, - "United States (New Jersey)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2001, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2001, 4, 13)?, "Good Friday"), ], &mut map, - Country::US_NJ, - "United States (New Jersey)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2002, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2002, 3, 29)?, "Good Friday"), ], &mut map, - Country::US_NJ, - "United States (New Jersey)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2003, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2003, 4, 18)?, "Good Friday"), ], &mut map, - Country::US_NJ, - "United States (New Jersey)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2004, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2004, 4, 9)?, "Good Friday"), ], &mut map, - Country::US_NJ, - "United States (New Jersey)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2005, 2, 12)?, "Lincoln's Birthday"), ( NaiveDate::from_ymd_res(2005, 2, 11)?, @@ -210,38 +99,15 @@ pub fn build( (NaiveDate::from_ymd_res(2005, 3, 25)?, "Good Friday"), ], &mut map, - Country::US_NJ, - "United States (New Jersey)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2006, 2, 12)?, "Lincoln's Birthday"), ( NaiveDate::from_ymd_res(2006, 2, 13)?, @@ -250,168 +116,69 @@ pub fn build( (NaiveDate::from_ymd_res(2006, 4, 14)?, "Good Friday"), ], &mut map, - Country::US_NJ, - "United States (New Jersey)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2007, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2007, 4, 6)?, "Good Friday"), ], &mut map, - Country::US_NJ, - "United States (New Jersey)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2008, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2008, 3, 21)?, "Good Friday"), (NaiveDate::from_ymd_res(2008, 11, 4)?, "Election Day"), ], &mut map, - Country::US_NJ, - "United States (New Jersey)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2009, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2009, 4, 10)?, "Good Friday"), ], &mut map, - Country::US_NJ, - "United States (New Jersey)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2010, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2010, 4, 2)?, "Good Friday"), (NaiveDate::from_ymd_res(2010, 11, 2)?, "Election Day"), ], &mut map, - Country::US_NJ, - "United States (New Jersey)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2011, 2, 12)?, "Lincoln's Birthday"), ( NaiveDate::from_ymd_res(2011, 2, 11)?, @@ -420,38 +187,15 @@ pub fn build( (NaiveDate::from_ymd_res(2011, 4, 22)?, "Good Friday"), ], &mut map, - Country::US_NJ, - "United States (New Jersey)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2012, 2, 12)?, "Lincoln's Birthday"), ( NaiveDate::from_ymd_res(2012, 2, 13)?, @@ -461,160 +205,69 @@ pub fn build( (NaiveDate::from_ymd_res(2012, 11, 6)?, "Election Day"), ], &mut map, - Country::US_NJ, - "United States (New Jersey)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2013, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2013, 3, 29)?, "Good Friday"), ], &mut map, - Country::US_NJ, - "United States (New Jersey)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2014, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2014, 4, 18)?, "Good Friday"), (NaiveDate::from_ymd_res(2014, 11, 4)?, "Election Day"), ], &mut map, - Country::US_NJ, - "United States (New Jersey)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2015, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2015, 4, 3)?, "Good Friday"), ], &mut map, - Country::US_NJ, - "United States (New Jersey)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2016, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2016, 3, 25)?, "Good Friday"), (NaiveDate::from_ymd_res(2016, 11, 8)?, "Election Day"), ], &mut map, - Country::US_NJ, - "United States (New Jersey)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2017, 2, 12)?, "Lincoln's Birthday"), ( NaiveDate::from_ymd_res(2017, 2, 13)?, @@ -623,184 +276,69 @@ pub fn build( (NaiveDate::from_ymd_res(2017, 4, 14)?, "Good Friday"), ], &mut map, - Country::US_NJ, - "United States (New Jersey)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2018, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2018, 3, 30)?, "Good Friday"), (NaiveDate::from_ymd_res(2018, 11, 6)?, "Election Day"), ], &mut map, - Country::US_NJ, - "United States (New Jersey)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2019, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2019, 4, 19)?, "Good Friday"), ], &mut map, - Country::US_NJ, - "United States (New Jersey)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2020, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2020, 4, 10)?, "Good Friday"), (NaiveDate::from_ymd_res(2020, 11, 3)?, "Election Day"), ], &mut map, - Country::US_NJ, - "United States (New Jersey)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2021, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2021, 4, 2)?, "Good Friday"), ], &mut map, - Country::US_NJ, - "United States (New Jersey)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2022, 2, 12)?, "Lincoln's Birthday"), ( NaiveDate::from_ymd_res(2022, 2, 11)?, @@ -810,42 +348,15 @@ pub fn build( (NaiveDate::from_ymd_res(2022, 11, 8)?, "Election Day"), ], &mut map, - Country::US_NJ, - "United States (New Jersey)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2023, 2, 12)?, "Lincoln's Birthday"), ( NaiveDate::from_ymd_res(2023, 2, 13)?, @@ -854,188 +365,69 @@ pub fn build( (NaiveDate::from_ymd_res(2023, 4, 7)?, "Good Friday"), ], &mut map, - Country::US_NJ, - "United States (New Jersey)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2024, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2024, 3, 29)?, "Good Friday"), (NaiveDate::from_ymd_res(2024, 11, 5)?, "Election Day"), ], &mut map, - Country::US_NJ, - "United States (New Jersey)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2025, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2025, 4, 18)?, "Good Friday"), ], &mut map, - Country::US_NJ, - "United States (New Jersey)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2026, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2026, 4, 3)?, "Good Friday"), (NaiveDate::from_ymd_res(2026, 11, 3)?, "Election Day"), ], &mut map, - Country::US_NJ, - "United States (New Jersey)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2027, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2027, 3, 26)?, "Good Friday"), ], &mut map, - Country::US_NJ, - "United States (New Jersey)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2028, 2, 12)?, "Lincoln's Birthday"), ( NaiveDate::from_ymd_res(2028, 2, 11)?, @@ -1045,77 +437,35 @@ pub fn build( (NaiveDate::from_ymd_res(2028, 11, 7)?, "Election Day"), ], &mut map, - Country::US_NJ, - "United States (New Jersey)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2029, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2029, 3, 30)?, "Good Friday"), ], &mut map, - Country::US_NJ, - "United States (New Jersey)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2030, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2030, 4, 19)?, "Good Friday"), (NaiveDate::from_ymd_res(2030, 11, 5)?, "Election Day"), ], &mut map, - Country::US_NJ, - "United States (New Jersey)", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/us_nm.rs b/src/data/us_nm.rs index 26e8b59..fffbe2b 100644 --- a/src/data/us_nm.rs +++ b/src/data/us_nm.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "United States (New Mexico)"; +const COUNTY_CODE: Country = Country::US_NM; + /// Generate holiday map for United States (New Mexico). #[allow( unused_mut, @@ -9,946 +12,319 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); - build_year( + let mut national_holidays = de::build(years)?; + + build_subdivision_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, 10, 9)?, "Columbus Day"), - (NaiveDate::from_ymd_res(2000, 11, 24)?, "Presidents' Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2000, 11, 24)?, "Presidents' Day")], &mut map, - Country::US_NM, - "United States (New Mexico)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 10, 8)?, "Columbus Day"), - (NaiveDate::from_ymd_res(2001, 11, 23)?, "Presidents' Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2001, 11, 23)?, "Presidents' Day")], &mut map, - Country::US_NM, - "United States (New Mexico)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 10, 14)?, "Columbus Day"), - (NaiveDate::from_ymd_res(2002, 11, 29)?, "Presidents' Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2002, 11, 29)?, "Presidents' Day")], &mut map, - Country::US_NM, - "United States (New Mexico)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 10, 13)?, "Columbus Day"), - (NaiveDate::from_ymd_res(2003, 11, 28)?, "Presidents' Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2003, 11, 28)?, "Presidents' Day")], &mut map, - Country::US_NM, - "United States (New Mexico)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 10, 11)?, "Columbus Day"), - (NaiveDate::from_ymd_res(2004, 11, 26)?, "Presidents' Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2004, 11, 26)?, "Presidents' Day")], &mut map, - Country::US_NM, - "United States (New Mexico)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 10, 10)?, "Columbus Day"), - (NaiveDate::from_ymd_res(2005, 11, 25)?, "Presidents' Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2005, 11, 25)?, "Presidents' Day")], &mut map, - Country::US_NM, - "United States (New Mexico)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 10, 9)?, "Columbus Day"), - (NaiveDate::from_ymd_res(2006, 11, 24)?, "Presidents' Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2006, 11, 24)?, "Presidents' Day")], &mut map, - Country::US_NM, - "United States (New Mexico)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 10, 8)?, "Columbus Day"), - (NaiveDate::from_ymd_res(2007, 11, 23)?, "Presidents' Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2007, 11, 23)?, "Presidents' Day")], &mut map, - Country::US_NM, - "United States (New Mexico)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 10, 13)?, "Columbus Day"), - (NaiveDate::from_ymd_res(2008, 11, 28)?, "Presidents' Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2008, 11, 28)?, "Presidents' Day")], &mut map, - Country::US_NM, - "United States (New Mexico)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 10, 12)?, "Columbus Day"), - (NaiveDate::from_ymd_res(2009, 11, 27)?, "Presidents' Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2009, 11, 27)?, "Presidents' Day")], &mut map, - Country::US_NM, - "United States (New Mexico)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 10, 11)?, "Columbus Day"), - (NaiveDate::from_ymd_res(2010, 11, 26)?, "Presidents' Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2010, 11, 26)?, "Presidents' Day")], &mut map, - Country::US_NM, - "United States (New Mexico)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 10, 10)?, "Columbus Day"), - (NaiveDate::from_ymd_res(2011, 11, 25)?, "Presidents' Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2011, 11, 25)?, "Presidents' Day")], &mut map, - Country::US_NM, - "United States (New Mexico)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 10, 8)?, "Columbus Day"), - (NaiveDate::from_ymd_res(2012, 11, 23)?, "Presidents' Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2012, 11, 23)?, "Presidents' Day")], &mut map, - Country::US_NM, - "United States (New Mexico)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 10, 14)?, "Columbus Day"), - (NaiveDate::from_ymd_res(2013, 11, 29)?, "Presidents' Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2013, 11, 29)?, "Presidents' Day")], &mut map, - Country::US_NM, - "United States (New Mexico)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 10, 13)?, "Columbus Day"), - (NaiveDate::from_ymd_res(2014, 11, 28)?, "Presidents' Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2014, 11, 28)?, "Presidents' Day")], &mut map, - Country::US_NM, - "United States (New Mexico)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 10, 12)?, "Columbus Day"), - (NaiveDate::from_ymd_res(2015, 11, 27)?, "Presidents' Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2015, 11, 27)?, "Presidents' Day")], &mut map, - Country::US_NM, - "United States (New Mexico)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 10, 10)?, "Columbus Day"), - (NaiveDate::from_ymd_res(2016, 11, 25)?, "Presidents' Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2016, 11, 25)?, "Presidents' Day")], &mut map, - Country::US_NM, - "United States (New Mexico)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 10, 9)?, "Columbus Day"), - (NaiveDate::from_ymd_res(2017, 11, 24)?, "Presidents' Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2017, 11, 24)?, "Presidents' Day")], &mut map, - Country::US_NM, - "United States (New Mexico)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 10, 8)?, "Columbus Day"), - (NaiveDate::from_ymd_res(2018, 11, 23)?, "Presidents' Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2018, 11, 23)?, "Presidents' Day")], &mut map, - Country::US_NM, - "United States (New Mexico)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 10, 14)?, - "Indigenous Peoples' Day", - ), - (NaiveDate::from_ymd_res(2019, 11, 29)?, "Presidents' Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2019, 11, 29)?, "Presidents' Day")], &mut map, - Country::US_NM, - "United States (New Mexico)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 10, 12)?, - "Indigenous Peoples' Day", - ), - (NaiveDate::from_ymd_res(2020, 11, 27)?, "Presidents' Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2020, 11, 27)?, "Presidents' Day")], &mut map, - Country::US_NM, - "United States (New Mexico)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 10, 11)?, - "Indigenous Peoples' Day", - ), - (NaiveDate::from_ymd_res(2021, 11, 26)?, "Presidents' Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2021, 11, 26)?, "Presidents' Day")], &mut map, - Country::US_NM, - "United States (New Mexico)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 10, 10)?, - "Indigenous Peoples' Day", - ), - (NaiveDate::from_ymd_res(2022, 11, 25)?, "Presidents' Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2022, 11, 25)?, "Presidents' Day")], &mut map, - Country::US_NM, - "United States (New Mexico)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 10, 9)?, - "Indigenous Peoples' Day", - ), - (NaiveDate::from_ymd_res(2023, 11, 24)?, "Presidents' Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2023, 11, 24)?, "Presidents' Day")], &mut map, - Country::US_NM, - "United States (New Mexico)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 10, 14)?, - "Indigenous Peoples' Day", - ), - (NaiveDate::from_ymd_res(2024, 11, 29)?, "Presidents' Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2024, 11, 29)?, "Presidents' Day")], &mut map, - Country::US_NM, - "United States (New Mexico)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 10, 13)?, - "Indigenous Peoples' Day", - ), - (NaiveDate::from_ymd_res(2025, 11, 28)?, "Presidents' Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2025, 11, 28)?, "Presidents' Day")], &mut map, - Country::US_NM, - "United States (New Mexico)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 10, 12)?, - "Indigenous Peoples' Day", - ), - (NaiveDate::from_ymd_res(2026, 11, 27)?, "Presidents' Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2026, 11, 27)?, "Presidents' Day")], &mut map, - Country::US_NM, - "United States (New Mexico)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 10, 11)?, - "Indigenous Peoples' Day", - ), - (NaiveDate::from_ymd_res(2027, 11, 26)?, "Presidents' Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2027, 11, 26)?, "Presidents' Day")], &mut map, - Country::US_NM, - "United States (New Mexico)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 10, 9)?, - "Indigenous Peoples' Day", - ), - (NaiveDate::from_ymd_res(2028, 11, 24)?, "Presidents' Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2028, 11, 24)?, "Presidents' Day")], &mut map, - Country::US_NM, - "United States (New Mexico)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 10, 8)?, - "Indigenous Peoples' Day", - ), - (NaiveDate::from_ymd_res(2029, 11, 23)?, "Presidents' Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2029, 11, 23)?, "Presidents' Day")], &mut map, - Country::US_NM, - "United States (New Mexico)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 10, 14)?, - "Indigenous Peoples' Day", - ), - (NaiveDate::from_ymd_res(2030, 11, 29)?, "Presidents' Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2030, 11, 29)?, "Presidents' Day")], &mut map, - Country::US_NM, - "United States (New Mexico)", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/us_nv.rs b/src/data/us_nv.rs index ce54ddf..0e160e3 100644 --- a/src/data/us_nv.rs +++ b/src/data/us_nv.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "United States (Nevada)"; +const COUNTY_CODE: Country = Country::US_NV; + /// Generate holiday map for United States (Nevada). #[allow( unused_mut, @@ -9,1034 +12,412 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); - build_year( + let mut national_holidays = de::build(years)?; + + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2000, 10, 27)?, "Nevada Day"), (NaiveDate::from_ymd_res(2000, 11, 24)?, "Family Day"), ], &mut map, - Country::US_NV, - "United States (Nevada)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2001, 10, 26)?, "Nevada Day"), (NaiveDate::from_ymd_res(2001, 11, 23)?, "Family Day"), ], &mut map, - Country::US_NV, - "United States (Nevada)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2002, 10, 25)?, "Nevada Day"), (NaiveDate::from_ymd_res(2002, 11, 29)?, "Family Day"), ], &mut map, - Country::US_NV, - "United States (Nevada)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2003, 10, 31)?, "Nevada Day"), (NaiveDate::from_ymd_res(2003, 11, 28)?, "Family Day"), ], &mut map, - Country::US_NV, - "United States (Nevada)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2004, 10, 29)?, "Nevada Day"), (NaiveDate::from_ymd_res(2004, 11, 26)?, "Family Day"), ], &mut map, - Country::US_NV, - "United States (Nevada)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2005, 10, 28)?, "Nevada Day"), (NaiveDate::from_ymd_res(2005, 11, 25)?, "Family Day"), ], &mut map, - Country::US_NV, - "United States (Nevada)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2006, 10, 27)?, "Nevada Day"), (NaiveDate::from_ymd_res(2006, 11, 24)?, "Family Day"), ], &mut map, - Country::US_NV, - "United States (Nevada)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2007, 10, 26)?, "Nevada Day"), (NaiveDate::from_ymd_res(2007, 11, 23)?, "Family Day"), ], &mut map, - Country::US_NV, - "United States (Nevada)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2008, 10, 31)?, "Nevada Day"), (NaiveDate::from_ymd_res(2008, 11, 28)?, "Family Day"), ], &mut map, - Country::US_NV, - "United States (Nevada)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2009, 10, 30)?, "Nevada Day"), (NaiveDate::from_ymd_res(2009, 11, 27)?, "Family Day"), ], &mut map, - Country::US_NV, - "United States (Nevada)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2010, 10, 29)?, "Nevada Day"), (NaiveDate::from_ymd_res(2010, 11, 26)?, "Family Day"), ], &mut map, - Country::US_NV, - "United States (Nevada)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2011, 10, 28)?, "Nevada Day"), (NaiveDate::from_ymd_res(2011, 11, 25)?, "Family Day"), ], &mut map, - Country::US_NV, - "United States (Nevada)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2012, 10, 26)?, "Nevada Day"), (NaiveDate::from_ymd_res(2012, 11, 23)?, "Family Day"), ], &mut map, - Country::US_NV, - "United States (Nevada)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2013, 10, 25)?, "Nevada Day"), (NaiveDate::from_ymd_res(2013, 11, 29)?, "Family Day"), ], &mut map, - Country::US_NV, - "United States (Nevada)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2014, 10, 31)?, "Nevada Day"), (NaiveDate::from_ymd_res(2014, 11, 28)?, "Family Day"), ], &mut map, - Country::US_NV, - "United States (Nevada)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2015, 10, 30)?, "Nevada Day"), (NaiveDate::from_ymd_res(2015, 11, 27)?, "Family Day"), ], &mut map, - Country::US_NV, - "United States (Nevada)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2016, 10, 28)?, "Nevada Day"), (NaiveDate::from_ymd_res(2016, 11, 25)?, "Family Day"), ], &mut map, - Country::US_NV, - "United States (Nevada)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2017, 10, 27)?, "Nevada Day"), (NaiveDate::from_ymd_res(2017, 11, 24)?, "Family Day"), ], &mut map, - Country::US_NV, - "United States (Nevada)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2018, 10, 26)?, "Nevada Day"), (NaiveDate::from_ymd_res(2018, 11, 23)?, "Family Day"), ], &mut map, - Country::US_NV, - "United States (Nevada)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2019, 10, 25)?, "Nevada Day"), (NaiveDate::from_ymd_res(2019, 11, 29)?, "Family Day"), ], &mut map, - Country::US_NV, - "United States (Nevada)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2020, 10, 30)?, "Nevada Day"), (NaiveDate::from_ymd_res(2020, 11, 27)?, "Family Day"), ], &mut map, - Country::US_NV, - "United States (Nevada)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2021, 10, 29)?, "Nevada Day"), (NaiveDate::from_ymd_res(2021, 11, 26)?, "Family Day"), ], &mut map, - Country::US_NV, - "United States (Nevada)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2022, 10, 28)?, "Nevada Day"), (NaiveDate::from_ymd_res(2022, 11, 25)?, "Family Day"), ], &mut map, - Country::US_NV, - "United States (Nevada)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2023, 10, 27)?, "Nevada Day"), (NaiveDate::from_ymd_res(2023, 11, 24)?, "Family Day"), ], &mut map, - Country::US_NV, - "United States (Nevada)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2024, 10, 25)?, "Nevada Day"), (NaiveDate::from_ymd_res(2024, 11, 29)?, "Family Day"), ], &mut map, - Country::US_NV, - "United States (Nevada)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2025, 10, 31)?, "Nevada Day"), (NaiveDate::from_ymd_res(2025, 11, 28)?, "Family Day"), ], &mut map, - Country::US_NV, - "United States (Nevada)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2026, 10, 30)?, "Nevada Day"), (NaiveDate::from_ymd_res(2026, 11, 27)?, "Family Day"), ], &mut map, - Country::US_NV, - "United States (Nevada)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2027, 10, 29)?, "Nevada Day"), (NaiveDate::from_ymd_res(2027, 11, 26)?, "Family Day"), ], &mut map, - Country::US_NV, - "United States (Nevada)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2028, 10, 27)?, "Nevada Day"), (NaiveDate::from_ymd_res(2028, 11, 24)?, "Family Day"), ], &mut map, - Country::US_NV, - "United States (Nevada)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2029, 10, 26)?, "Nevada Day"), (NaiveDate::from_ymd_res(2029, 11, 23)?, "Family Day"), ], &mut map, - Country::US_NV, - "United States (Nevada)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2030, 10, 25)?, "Nevada Day"), (NaiveDate::from_ymd_res(2030, 11, 29)?, "Family Day"), ], &mut map, - Country::US_NV, - "United States (Nevada)", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/us_ny.rs b/src/data/us_ny.rs index 52ae3c8..004495d 100644 --- a/src/data/us_ny.rs +++ b/src/data/us_ny.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "United States (New York)"; +const COUNTY_CODE: Country = Country::US_NY; + /// Generate holiday map for United States (New York). #[allow( unused_mut, @@ -9,35 +12,16 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); - build_year( + let mut national_holidays = de::build(years)?; + + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2000, 2, 12)?, "Lincoln's Birthday"), ( NaiveDate::from_ymd_res(2000, 2, 11)?, @@ -45,127 +29,45 @@ pub fn build( ), ], &mut map, - Country::US_NY, - "United States (New York)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2001, 2, 12)?, "Lincoln's Birthday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2001, 2, 12)?, "Lincoln's Birthday")], &mut map, - Country::US_NY, - "United States (New York)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2002, 2, 12)?, "Lincoln's Birthday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2002, 2, 12)?, "Lincoln's Birthday")], &mut map, - Country::US_NY, - "United States (New York)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2003, 2, 12)?, "Lincoln's Birthday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2003, 2, 12)?, "Lincoln's Birthday")], &mut map, - Country::US_NY, - "United States (New York)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2004, 2, 12)?, "Lincoln's Birthday"), ( NaiveDate::from_ymd_res(2004, 2, 15)?, @@ -173,34 +75,15 @@ pub fn build( ), ], &mut map, - Country::US_NY, - "United States (New York)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2005, 2, 12)?, "Lincoln's Birthday"), ( NaiveDate::from_ymd_res(2005, 2, 11)?, @@ -212,38 +95,15 @@ pub fn build( ), ], &mut map, - Country::US_NY, - "United States (New York)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2006, 2, 12)?, "Lincoln's Birthday"), ( NaiveDate::from_ymd_res(2006, 2, 13)?, @@ -255,34 +115,15 @@ pub fn build( ), ], &mut map, - Country::US_NY, - "United States (New York)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2007, 2, 12)?, "Lincoln's Birthday"), ( NaiveDate::from_ymd_res(2007, 2, 15)?, @@ -290,30 +131,15 @@ pub fn build( ), ], &mut map, - Country::US_NY, - "United States (New York)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2008, 2, 12)?, "Lincoln's Birthday"), ( NaiveDate::from_ymd_res(2008, 2, 15)?, @@ -322,34 +148,15 @@ pub fn build( (NaiveDate::from_ymd_res(2008, 11, 4)?, "Election Day"), ], &mut map, - Country::US_NY, - "United States (New York)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2009, 2, 12)?, "Lincoln's Birthday"), ( NaiveDate::from_ymd_res(2009, 2, 15)?, @@ -357,74 +164,28 @@ pub fn build( ), ], &mut map, - Country::US_NY, - "United States (New York)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Susan B. Anthony Day; Washington's Birthday", - ), - (NaiveDate::from_ymd_res(2010, 10, 11)?, "Columbus Day"), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2010, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2010, 11, 2)?, "Election Day"), ], &mut map, - Country::US_NY, - "United States (New York)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2011, 2, 12)?, "Lincoln's Birthday"), ( NaiveDate::from_ymd_res(2011, 2, 11)?, @@ -436,38 +197,15 @@ pub fn build( ), ], &mut map, - Country::US_NY, - "United States (New York)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2012, 2, 12)?, "Lincoln's Birthday"), ( NaiveDate::from_ymd_res(2012, 2, 13)?, @@ -480,30 +218,15 @@ pub fn build( (NaiveDate::from_ymd_res(2012, 11, 6)?, "Election Day"), ], &mut map, - Country::US_NY, - "United States (New York)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2013, 2, 12)?, "Lincoln's Birthday"), ( NaiveDate::from_ymd_res(2013, 2, 15)?, @@ -511,30 +234,15 @@ pub fn build( ), ], &mut map, - Country::US_NY, - "United States (New York)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2014, 2, 12)?, "Lincoln's Birthday"), ( NaiveDate::from_ymd_res(2014, 2, 15)?, @@ -543,34 +251,15 @@ pub fn build( (NaiveDate::from_ymd_res(2014, 11, 4)?, "Election Day"), ], &mut map, - Country::US_NY, - "United States (New York)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2015, 2, 12)?, "Lincoln's Birthday"), ( NaiveDate::from_ymd_res(2015, 2, 15)?, @@ -579,70 +268,28 @@ pub fn build( (NaiveDate::from_ymd_res(2015, 11, 3)?, "Election Day"), ], &mut map, - Country::US_NY, - "United States (New York)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Susan B. Anthony Day; Washington's Birthday", - ), - (NaiveDate::from_ymd_res(2016, 10, 10)?, "Columbus Day"), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2016, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2016, 11, 8)?, "Election Day"), ], &mut map, - Country::US_NY, - "United States (New York)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2017, 2, 12)?, "Lincoln's Birthday"), ( NaiveDate::from_ymd_res(2017, 2, 13)?, @@ -655,34 +302,15 @@ pub fn build( (NaiveDate::from_ymd_res(2017, 11, 7)?, "Election Day"), ], &mut map, - Country::US_NY, - "United States (New York)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2018, 2, 12)?, "Lincoln's Birthday"), ( NaiveDate::from_ymd_res(2018, 2, 15)?, @@ -691,30 +319,15 @@ pub fn build( (NaiveDate::from_ymd_res(2018, 11, 6)?, "Election Day"), ], &mut map, - Country::US_NY, - "United States (New York)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2019, 2, 12)?, "Lincoln's Birthday"), ( NaiveDate::from_ymd_res(2019, 2, 15)?, @@ -723,34 +336,15 @@ pub fn build( (NaiveDate::from_ymd_res(2019, 11, 5)?, "Election Day"), ], &mut map, - Country::US_NY, - "United States (New York)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2020, 2, 12)?, "Lincoln's Birthday"), ( NaiveDate::from_ymd_res(2020, 2, 15)?, @@ -759,90 +353,28 @@ pub fn build( (NaiveDate::from_ymd_res(2020, 11, 3)?, "Election Day"), ], &mut map, - Country::US_NY, - "United States (New York)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Susan B. Anthony Day; Washington's Birthday", - ), - (NaiveDate::from_ymd_res(2021, 10, 11)?, "Columbus Day"), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2021, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2021, 11, 2)?, "Election Day"), ], &mut map, - Country::US_NY, - "United States (New York)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2022, 2, 12)?, "Lincoln's Birthday"), ( NaiveDate::from_ymd_res(2022, 2, 11)?, @@ -855,42 +387,15 @@ pub fn build( (NaiveDate::from_ymd_res(2022, 11, 8)?, "Election Day"), ], &mut map, - Country::US_NY, - "United States (New York)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2023, 2, 12)?, "Lincoln's Birthday"), ( NaiveDate::from_ymd_res(2023, 2, 13)?, @@ -903,34 +408,15 @@ pub fn build( (NaiveDate::from_ymd_res(2023, 11, 7)?, "Election Day"), ], &mut map, - Country::US_NY, - "United States (New York)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2024, 2, 12)?, "Lincoln's Birthday"), ( NaiveDate::from_ymd_res(2024, 2, 15)?, @@ -939,34 +425,15 @@ pub fn build( (NaiveDate::from_ymd_res(2024, 11, 5)?, "Election Day"), ], &mut map, - Country::US_NY, - "United States (New York)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2025, 2, 12)?, "Lincoln's Birthday"), ( NaiveDate::from_ymd_res(2025, 2, 15)?, @@ -975,38 +442,15 @@ pub fn build( (NaiveDate::from_ymd_res(2025, 11, 4)?, "Election Day"), ], &mut map, - Country::US_NY, - "United States (New York)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2026, 2, 12)?, "Lincoln's Birthday"), ( NaiveDate::from_ymd_res(2026, 2, 15)?, @@ -1015,86 +459,28 @@ pub fn build( (NaiveDate::from_ymd_res(2026, 11, 3)?, "Election Day"), ], &mut map, - Country::US_NY, - "United States (New York)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Susan B. Anthony Day; Washington's Birthday", - ), - (NaiveDate::from_ymd_res(2027, 10, 11)?, "Columbus Day"), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2027, 2, 12)?, "Lincoln's Birthday"), (NaiveDate::from_ymd_res(2027, 11, 2)?, "Election Day"), ], &mut map, - Country::US_NY, - "United States (New York)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2028, 2, 12)?, "Lincoln's Birthday"), ( NaiveDate::from_ymd_res(2028, 2, 11)?, @@ -1107,38 +493,15 @@ pub fn build( (NaiveDate::from_ymd_res(2028, 11, 7)?, "Election Day"), ], &mut map, - Country::US_NY, - "United States (New York)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2029, 2, 12)?, "Lincoln's Birthday"), ( NaiveDate::from_ymd_res(2029, 2, 15)?, @@ -1147,34 +510,15 @@ pub fn build( (NaiveDate::from_ymd_res(2029, 11, 6)?, "Election Day"), ], &mut map, - Country::US_NY, - "United States (New York)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2030, 2, 12)?, "Lincoln's Birthday"), ( NaiveDate::from_ymd_res(2030, 2, 15)?, @@ -1183,8 +527,8 @@ pub fn build( (NaiveDate::from_ymd_res(2030, 11, 5)?, "Election Day"), ], &mut map, - Country::US_NY, - "United States (New York)", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/us_oh.rs b/src/data/us_oh.rs index e99759f..d1e5f3c 100644 --- a/src/data/us_oh.rs +++ b/src/data/us_oh.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "United States (Ohio)"; +const COUNTY_CODE: Country = Country::US_OH; + /// Generate holiday map for United States (Ohio). #[allow( unused_mut, @@ -9,1003 +12,319 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); - build_year( + let mut national_holidays = de::build(years)?; + + build_subdivision_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 national_holidays, + [], &mut map, - Country::US_OH, - "United States (Ohio)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::US_OH, - "United States (Ohio)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::US_OH, - "United States (Ohio)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::US_OH, - "United States (Ohio)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::US_OH, - "United States (Ohio)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::US_OH, - "United States (Ohio)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::US_OH, - "United States (Ohio)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::US_OH, - "United States (Ohio)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::US_OH, - "United States (Ohio)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::US_OH, - "United States (Ohio)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::US_OH, - "United States (Ohio)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::US_OH, - "United States (Ohio)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::US_OH, - "United States (Ohio)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::US_OH, - "United States (Ohio)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::US_OH, - "United States (Ohio)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::US_OH, - "United States (Ohio)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::US_OH, - "United States (Ohio)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::US_OH, - "United States (Ohio)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::US_OH, - "United States (Ohio)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::US_OH, - "United States (Ohio)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::US_OH, - "United States (Ohio)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::US_OH, - "United States (Ohio)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::US_OH, - "United States (Ohio)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::US_OH, - "United States (Ohio)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::US_OH, - "United States (Ohio)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::US_OH, - "United States (Ohio)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::US_OH, - "United States (Ohio)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::US_OH, - "United States (Ohio)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::US_OH, - "United States (Ohio)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::US_OH, - "United States (Ohio)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [], &mut map, - Country::US_OH, - "United States (Ohio)", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/us_ok.rs b/src/data/us_ok.rs index c805fbb..f60ed45 100644 --- a/src/data/us_ok.rs +++ b/src/data/us_ok.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "United States (Oklahoma)"; +const COUNTY_CODE: Country = Country::US_OK; + /// Generate holiday map for United States (Oklahoma). #[allow( unused_mut, @@ -9,1096 +12,412 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); - build_year( + let mut national_holidays = de::build(years)?; + + build_subdivision_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, 11, 24)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2000, 11, 24)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_OK, - "United States (Oklahoma)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 11, 23)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2001, 11, 23)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_OK, - "United States (Oklahoma)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 11, 29)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2002, 11, 29)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_OK, - "United States (Oklahoma)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 11, 28)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2003, 11, 28)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_OK, - "United States (Oklahoma)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 11, 26)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2004, 11, 26)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_OK, - "United States (Oklahoma)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 11, 25)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2005, 11, 25)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_OK, - "United States (Oklahoma)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 11, 24)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2006, 11, 24)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_OK, - "United States (Oklahoma)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 11, 23)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2007, 11, 23)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_OK, - "United States (Oklahoma)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 11, 28)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2008, 11, 28)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_OK, - "United States (Oklahoma)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 11, 27)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2009, 11, 27)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_OK, - "United States (Oklahoma)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 11, 26)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2010, 11, 26)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_OK, - "United States (Oklahoma)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 11, 25)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2011, 11, 25)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_OK, - "United States (Oklahoma)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 11, 23)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2012, 11, 23)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_OK, - "United States (Oklahoma)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 11, 29)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2013, 11, 29)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_OK, - "United States (Oklahoma)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 11, 28)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2014, 11, 28)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_OK, - "United States (Oklahoma)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 11, 27)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2015, 11, 27)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_OK, - "United States (Oklahoma)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 11, 25)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2016, 11, 25)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_OK, - "United States (Oklahoma)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 11, 24)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2017, 11, 24)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_OK, - "United States (Oklahoma)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 11, 23)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2018, 11, 23)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_OK, - "United States (Oklahoma)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 11, 29)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2019, 11, 29)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_OK, - "United States (Oklahoma)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 11, 27)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2020, 11, 27)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_OK, - "United States (Oklahoma)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 11, 26)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2021, 11, 26)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_OK, - "United States (Oklahoma)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 11, 25)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2022, 11, 25)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_OK, - "United States (Oklahoma)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 11, 24)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2023, 11, 24)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_OK, - "United States (Oklahoma)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 11, 29)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2024, 11, 29)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_OK, - "United States (Oklahoma)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 11, 28)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2025, 11, 28)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_OK, - "United States (Oklahoma)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 11, 27)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2026, 11, 27)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_OK, - "United States (Oklahoma)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 11, 26)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2027, 11, 26)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_OK, - "United States (Oklahoma)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 11, 24)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2028, 11, 24)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_OK, - "United States (Oklahoma)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 11, 23)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2029, 11, 23)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_OK, - "United States (Oklahoma)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 11, 29)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2030, 11, 29)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_OK, - "United States (Oklahoma)", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/us_or.rs b/src/data/us_or.rs index d59bd33..b967768 100644 --- a/src/data/us_or.rs +++ b/src/data/us_or.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "United States (Oregon)"; +const COUNTY_CODE: Country = Country::US_OR; + /// Generate holiday map for United States (Oregon). #[allow( unused_mut, @@ -9,972 +12,319 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); - build_year( + let mut national_holidays = de::build(years)?; + + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_OR, - "United States (Oregon)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_OR, - "United States (Oregon)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_OR, - "United States (Oregon)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_OR, - "United States (Oregon)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_OR, - "United States (Oregon)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_OR, - "United States (Oregon)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_OR, - "United States (Oregon)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_OR, - "United States (Oregon)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_OR, - "United States (Oregon)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_OR, - "United States (Oregon)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_OR, - "United States (Oregon)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_OR, - "United States (Oregon)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_OR, - "United States (Oregon)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_OR, - "United States (Oregon)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_OR, - "United States (Oregon)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_OR, - "United States (Oregon)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_OR, - "United States (Oregon)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_OR, - "United States (Oregon)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_OR, - "United States (Oregon)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_OR, - "United States (Oregon)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_OR, - "United States (Oregon)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_OR, - "United States (Oregon)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_OR, - "United States (Oregon)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_OR, - "United States (Oregon)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_OR, - "United States (Oregon)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_OR, - "United States (Oregon)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_OR, - "United States (Oregon)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_OR, - "United States (Oregon)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_OR, - "United States (Oregon)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_OR, - "United States (Oregon)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_OR, - "United States (Oregon)", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/us_pa.rs b/src/data/us_pa.rs index 3a9fc42..f771761 100644 --- a/src/data/us_pa.rs +++ b/src/data/us_pa.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "United States (Pennsylvania)"; +const COUNTY_CODE: Country = Country::US_PA; + /// Generate holiday map for United States (Pennsylvania). #[allow( unused_mut, @@ -9,1127 +12,412 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); - build_year( + let mut national_holidays = de::build(years)?; + + build_subdivision_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"), - ( - NaiveDate::from_ymd_res(2000, 11, 24)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2000, 11, 24)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_PA, - "United States (Pennsylvania)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - ( - NaiveDate::from_ymd_res(2001, 11, 23)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2001, 11, 23)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_PA, - "United States (Pennsylvania)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - ( - NaiveDate::from_ymd_res(2002, 11, 29)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2002, 11, 29)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_PA, - "United States (Pennsylvania)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - ( - NaiveDate::from_ymd_res(2003, 11, 28)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2003, 11, 28)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_PA, - "United States (Pennsylvania)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - ( - NaiveDate::from_ymd_res(2004, 11, 26)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2004, 11, 26)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_PA, - "United States (Pennsylvania)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - ( - NaiveDate::from_ymd_res(2005, 11, 25)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2005, 11, 25)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_PA, - "United States (Pennsylvania)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - ( - NaiveDate::from_ymd_res(2006, 11, 24)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2006, 11, 24)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_PA, - "United States (Pennsylvania)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - ( - NaiveDate::from_ymd_res(2007, 11, 23)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2007, 11, 23)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_PA, - "United States (Pennsylvania)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - ( - NaiveDate::from_ymd_res(2008, 11, 28)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2008, 11, 28)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_PA, - "United States (Pennsylvania)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - ( - NaiveDate::from_ymd_res(2009, 11, 27)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2009, 11, 27)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_PA, - "United States (Pennsylvania)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - ( - NaiveDate::from_ymd_res(2010, 11, 26)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2010, 11, 26)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_PA, - "United States (Pennsylvania)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - ( - NaiveDate::from_ymd_res(2011, 11, 25)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2011, 11, 25)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_PA, - "United States (Pennsylvania)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - ( - NaiveDate::from_ymd_res(2012, 11, 23)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2012, 11, 23)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_PA, - "United States (Pennsylvania)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - ( - NaiveDate::from_ymd_res(2013, 11, 29)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2013, 11, 29)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_PA, - "United States (Pennsylvania)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - ( - NaiveDate::from_ymd_res(2014, 11, 28)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2014, 11, 28)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_PA, - "United States (Pennsylvania)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - ( - NaiveDate::from_ymd_res(2015, 11, 27)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2015, 11, 27)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_PA, - "United States (Pennsylvania)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - ( - NaiveDate::from_ymd_res(2016, 11, 25)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2016, 11, 25)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_PA, - "United States (Pennsylvania)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - ( - NaiveDate::from_ymd_res(2017, 11, 24)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2017, 11, 24)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_PA, - "United States (Pennsylvania)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - ( - NaiveDate::from_ymd_res(2018, 11, 23)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2018, 11, 23)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_PA, - "United States (Pennsylvania)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - ( - NaiveDate::from_ymd_res(2019, 11, 29)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2019, 11, 29)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_PA, - "United States (Pennsylvania)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - ( - NaiveDate::from_ymd_res(2020, 11, 27)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2020, 11, 27)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_PA, - "United States (Pennsylvania)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - ( - NaiveDate::from_ymd_res(2021, 11, 26)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2021, 11, 26)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_PA, - "United States (Pennsylvania)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - ( - NaiveDate::from_ymd_res(2022, 11, 25)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2022, 11, 25)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_PA, - "United States (Pennsylvania)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - ( - NaiveDate::from_ymd_res(2023, 11, 24)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2023, 11, 24)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_PA, - "United States (Pennsylvania)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - ( - NaiveDate::from_ymd_res(2024, 11, 29)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2024, 11, 29)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_PA, - "United States (Pennsylvania)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - ( - NaiveDate::from_ymd_res(2025, 11, 28)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2025, 11, 28)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_PA, - "United States (Pennsylvania)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - ( - NaiveDate::from_ymd_res(2026, 11, 27)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2026, 11, 27)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_PA, - "United States (Pennsylvania)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - ( - NaiveDate::from_ymd_res(2027, 11, 26)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2027, 11, 26)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_PA, - "United States (Pennsylvania)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - ( - NaiveDate::from_ymd_res(2028, 11, 24)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2028, 11, 24)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_PA, - "United States (Pennsylvania)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - ( - NaiveDate::from_ymd_res(2029, 11, 23)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2029, 11, 23)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_PA, - "United States (Pennsylvania)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - ( - NaiveDate::from_ymd_res(2030, 11, 29)?, - "Day After Thanksgiving", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2030, 11, 29)?, + "Day After Thanksgiving", + )], &mut map, - Country::US_PA, - "United States (Pennsylvania)", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/us_pr.rs b/src/data/us_pr.rs index a01b871..82191fc 100644 --- a/src/data/us_pr.rs +++ b/src/data/us_pr.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "United States (Puerto Rico)"; +const COUNTY_CODE: Country = Country::US_PR; + /// Generate holiday map for United States (Puerto Rico). #[allow( unused_mut, @@ -9,32 +12,17 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); - build_year( + let mut national_holidays = de::build(years)?; + + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2000, 1, 6)?, "Epiphany"), - (NaiveDate::from_ymd_res(2000, 2, 21)?, "Presidents' Day"), (NaiveDate::from_ymd_res(2000, 3, 22)?, "Emancipation Day"), (NaiveDate::from_ymd_res(2000, 4, 21)?, "Good Friday"), (NaiveDate::from_ymd_res(2000, 7, 25)?, "Constitution Day"), @@ -45,124 +33,64 @@ pub fn build( ), ], &mut map, - Country::US_PR, - "United States (Puerto Rico)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2001, 1, 6)?, "Epiphany"), - (NaiveDate::from_ymd_res(2001, 2, 19)?, "Presidents' Day"), (NaiveDate::from_ymd_res(2001, 3, 22)?, "Emancipation Day"), (NaiveDate::from_ymd_res(2001, 4, 13)?, "Good Friday"), (NaiveDate::from_ymd_res(2001, 7, 25)?, "Constitution Day"), (NaiveDate::from_ymd_res(2001, 11, 19)?, "Discovery Day"), ], &mut map, - Country::US_PR, - "United States (Puerto Rico)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2002, 1, 6)?, "Epiphany"), - (NaiveDate::from_ymd_res(2002, 2, 18)?, "Presidents' Day"), (NaiveDate::from_ymd_res(2002, 3, 22)?, "Emancipation Day"), (NaiveDate::from_ymd_res(2002, 3, 29)?, "Good Friday"), (NaiveDate::from_ymd_res(2002, 7, 25)?, "Constitution Day"), (NaiveDate::from_ymd_res(2002, 11, 19)?, "Discovery Day"), ], &mut map, - Country::US_PR, - "United States (Puerto Rico)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2003, 1, 6)?, "Epiphany"), - (NaiveDate::from_ymd_res(2003, 2, 17)?, "Presidents' Day"), (NaiveDate::from_ymd_res(2003, 3, 22)?, "Emancipation Day"), (NaiveDate::from_ymd_res(2003, 4, 18)?, "Good Friday"), (NaiveDate::from_ymd_res(2003, 7, 25)?, "Constitution Day"), (NaiveDate::from_ymd_res(2003, 11, 19)?, "Discovery Day"), ], &mut map, - Country::US_PR, - "United States (Puerto Rico)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2004, 1, 6)?, "Epiphany"), - (NaiveDate::from_ymd_res(2004, 2, 16)?, "Presidents' Day"), (NaiveDate::from_ymd_res(2004, 3, 22)?, "Emancipation Day"), (NaiveDate::from_ymd_res(2004, 4, 9)?, "Good Friday"), (NaiveDate::from_ymd_res(2004, 7, 25)?, "Constitution Day"), @@ -173,66 +101,32 @@ pub fn build( (NaiveDate::from_ymd_res(2004, 11, 19)?, "Discovery Day"), ], &mut map, - Country::US_PR, - "United States (Puerto Rico)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2005, 1, 6)?, "Epiphany"), - (NaiveDate::from_ymd_res(2005, 2, 21)?, "Presidents' Day"), (NaiveDate::from_ymd_res(2005, 3, 22)?, "Emancipation Day"), (NaiveDate::from_ymd_res(2005, 3, 25)?, "Good Friday"), (NaiveDate::from_ymd_res(2005, 7, 25)?, "Constitution Day"), (NaiveDate::from_ymd_res(2005, 11, 19)?, "Discovery Day"), ], &mut map, - Country::US_PR, - "United States (Puerto Rico)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2006, 1, 6)?, "Epiphany"), - (NaiveDate::from_ymd_res(2006, 2, 20)?, "Presidents' Day"), (NaiveDate::from_ymd_res(2006, 3, 22)?, "Emancipation Day"), (NaiveDate::from_ymd_res(2006, 4, 14)?, "Good Friday"), (NaiveDate::from_ymd_res(2006, 7, 25)?, "Constitution Day"), @@ -243,89 +137,48 @@ pub fn build( ), ], &mut map, - Country::US_PR, - "United States (Puerto Rico)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2007, 1, 6)?, "Epiphany"), - (NaiveDate::from_ymd_res(2007, 2, 19)?, "Presidents' Day"), (NaiveDate::from_ymd_res(2007, 3, 22)?, "Emancipation Day"), (NaiveDate::from_ymd_res(2007, 4, 6)?, "Good Friday"), (NaiveDate::from_ymd_res(2007, 7, 25)?, "Constitution Day"), (NaiveDate::from_ymd_res(2007, 11, 19)?, "Discovery Day"), ], &mut map, - Country::US_PR, - "United States (Puerto Rico)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2008, 1, 6)?, "Epiphany"), - (NaiveDate::from_ymd_res(2008, 2, 18)?, "Presidents' Day"), (NaiveDate::from_ymd_res(2008, 3, 22)?, "Emancipation Day"), (NaiveDate::from_ymd_res(2008, 3, 21)?, "Good Friday"), (NaiveDate::from_ymd_res(2008, 7, 25)?, "Constitution Day"), (NaiveDate::from_ymd_res(2008, 11, 19)?, "Discovery Day"), ], &mut map, - Country::US_PR, - "United States (Puerto Rico)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2009, 1, 6)?, "Epiphany"), - (NaiveDate::from_ymd_res(2009, 2, 16)?, "Presidents' Day"), (NaiveDate::from_ymd_res(2009, 3, 22)?, "Emancipation Day"), ( NaiveDate::from_ymd_res(2009, 3, 23)?, @@ -336,39 +189,16 @@ pub fn build( (NaiveDate::from_ymd_res(2009, 11, 19)?, "Discovery Day"), ], &mut map, - Country::US_PR, - "United States (Puerto Rico)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2010, 1, 6)?, "Epiphany"), - (NaiveDate::from_ymd_res(2010, 2, 15)?, "Presidents' Day"), (NaiveDate::from_ymd_res(2010, 3, 22)?, "Emancipation Day"), (NaiveDate::from_ymd_res(2010, 4, 2)?, "Good Friday"), (NaiveDate::from_ymd_res(2010, 7, 25)?, "Constitution Day"), @@ -379,151 +209,80 @@ pub fn build( (NaiveDate::from_ymd_res(2010, 11, 19)?, "Discovery Day"), ], &mut map, - Country::US_PR, - "United States (Puerto Rico)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2011, 1, 6)?, "Epiphany"), - (NaiveDate::from_ymd_res(2011, 2, 21)?, "Presidents' Day"), (NaiveDate::from_ymd_res(2011, 3, 22)?, "Emancipation Day"), (NaiveDate::from_ymd_res(2011, 4, 22)?, "Good Friday"), (NaiveDate::from_ymd_res(2011, 7, 25)?, "Constitution Day"), (NaiveDate::from_ymd_res(2011, 11, 19)?, "Discovery Day"), ], &mut map, - Country::US_PR, - "United States (Puerto Rico)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2012, 1, 6)?, "Epiphany"), - (NaiveDate::from_ymd_res(2012, 2, 20)?, "Presidents' Day"), (NaiveDate::from_ymd_res(2012, 3, 22)?, "Emancipation Day"), (NaiveDate::from_ymd_res(2012, 4, 6)?, "Good Friday"), (NaiveDate::from_ymd_res(2012, 7, 25)?, "Constitution Day"), (NaiveDate::from_ymd_res(2012, 11, 19)?, "Discovery Day"), ], &mut map, - Country::US_PR, - "United States (Puerto Rico)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2013, 1, 6)?, "Epiphany"), - (NaiveDate::from_ymd_res(2013, 2, 18)?, "Presidents' Day"), (NaiveDate::from_ymd_res(2013, 3, 22)?, "Emancipation Day"), (NaiveDate::from_ymd_res(2013, 3, 29)?, "Good Friday"), (NaiveDate::from_ymd_res(2013, 7, 25)?, "Constitution Day"), (NaiveDate::from_ymd_res(2013, 11, 19)?, "Discovery Day"), ], &mut map, - Country::US_PR, - "United States (Puerto Rico)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2014, 1, 6)?, "Epiphany"), - (NaiveDate::from_ymd_res(2014, 2, 17)?, "Presidents' Day"), (NaiveDate::from_ymd_res(2014, 3, 22)?, "Emancipation Day"), (NaiveDate::from_ymd_res(2014, 4, 18)?, "Good Friday"), (NaiveDate::from_ymd_res(2014, 7, 25)?, "Constitution Day"), (NaiveDate::from_ymd_res(2014, 11, 19)?, "Discovery Day"), ], &mut map, - Country::US_PR, - "United States (Puerto Rico)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2015, 1, 6)?, "Epiphany"), - (NaiveDate::from_ymd_res(2015, 2, 16)?, "Presidents' Day"), (NaiveDate::from_ymd_res(2015, 3, 22)?, "Emancipation Day"), ( NaiveDate::from_ymd_res(2015, 3, 23)?, @@ -534,66 +293,32 @@ pub fn build( (NaiveDate::from_ymd_res(2015, 11, 19)?, "Discovery Day"), ], &mut map, - Country::US_PR, - "United States (Puerto Rico)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2016, 1, 6)?, "Epiphany"), - (NaiveDate::from_ymd_res(2016, 2, 15)?, "Presidents' Day"), (NaiveDate::from_ymd_res(2016, 3, 22)?, "Emancipation Day"), (NaiveDate::from_ymd_res(2016, 3, 25)?, "Good Friday"), (NaiveDate::from_ymd_res(2016, 7, 25)?, "Constitution Day"), (NaiveDate::from_ymd_res(2016, 11, 19)?, "Discovery Day"), ], &mut map, - Country::US_PR, - "United States (Puerto Rico)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2017, 1, 6)?, "Epiphany"), - (NaiveDate::from_ymd_res(2017, 2, 20)?, "Presidents' Day"), (NaiveDate::from_ymd_res(2017, 3, 22)?, "Emancipation Day"), (NaiveDate::from_ymd_res(2017, 4, 14)?, "Good Friday"), (NaiveDate::from_ymd_res(2017, 7, 25)?, "Constitution Day"), @@ -604,89 +329,48 @@ pub fn build( ), ], &mut map, - Country::US_PR, - "United States (Puerto Rico)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2018, 1, 6)?, "Epiphany"), - (NaiveDate::from_ymd_res(2018, 2, 19)?, "Presidents' Day"), (NaiveDate::from_ymd_res(2018, 3, 22)?, "Emancipation Day"), (NaiveDate::from_ymd_res(2018, 3, 30)?, "Good Friday"), (NaiveDate::from_ymd_res(2018, 7, 25)?, "Constitution Day"), (NaiveDate::from_ymd_res(2018, 11, 19)?, "Discovery Day"), ], &mut map, - Country::US_PR, - "United States (Puerto Rico)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2019, 1, 6)?, "Epiphany"), - (NaiveDate::from_ymd_res(2019, 2, 18)?, "Presidents' Day"), (NaiveDate::from_ymd_res(2019, 3, 22)?, "Emancipation Day"), (NaiveDate::from_ymd_res(2019, 4, 19)?, "Good Friday"), (NaiveDate::from_ymd_res(2019, 7, 25)?, "Constitution Day"), (NaiveDate::from_ymd_res(2019, 11, 19)?, "Discovery Day"), ], &mut map, - Country::US_PR, - "United States (Puerto Rico)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2020, 1, 6)?, "Epiphany"), - (NaiveDate::from_ymd_res(2020, 2, 17)?, "Presidents' Day"), (NaiveDate::from_ymd_res(2020, 3, 22)?, "Emancipation Day"), ( NaiveDate::from_ymd_res(2020, 3, 23)?, @@ -697,47 +381,16 @@ pub fn build( (NaiveDate::from_ymd_res(2020, 11, 19)?, "Discovery Day"), ], &mut map, - Country::US_PR, - "United States (Puerto Rico)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2021, 1, 6)?, "Epiphany"), - (NaiveDate::from_ymd_res(2021, 2, 15)?, "Presidents' Day"), (NaiveDate::from_ymd_res(2021, 3, 22)?, "Emancipation Day"), (NaiveDate::from_ymd_res(2021, 4, 2)?, "Good Friday"), (NaiveDate::from_ymd_res(2021, 7, 25)?, "Constitution Day"), @@ -748,78 +401,32 @@ pub fn build( (NaiveDate::from_ymd_res(2021, 11, 19)?, "Discovery Day"), ], &mut map, - Country::US_PR, - "United States (Puerto Rico)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2022, 1, 6)?, "Epiphany"), - (NaiveDate::from_ymd_res(2022, 2, 21)?, "Presidents' Day"), (NaiveDate::from_ymd_res(2022, 3, 22)?, "Emancipation Day"), (NaiveDate::from_ymd_res(2022, 4, 15)?, "Good Friday"), (NaiveDate::from_ymd_res(2022, 7, 25)?, "Constitution Day"), (NaiveDate::from_ymd_res(2022, 11, 19)?, "Discovery Day"), ], &mut map, - Country::US_PR, - "United States (Puerto Rico)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2023, 1, 6)?, "Epiphany"), - (NaiveDate::from_ymd_res(2023, 2, 20)?, "Presidents' Day"), (NaiveDate::from_ymd_res(2023, 3, 22)?, "Emancipation Day"), (NaiveDate::from_ymd_res(2023, 4, 7)?, "Good Friday"), (NaiveDate::from_ymd_res(2023, 7, 25)?, "Constitution Day"), @@ -830,97 +437,48 @@ pub fn build( ), ], &mut map, - Country::US_PR, - "United States (Puerto Rico)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2024, 1, 6)?, "Epiphany"), - (NaiveDate::from_ymd_res(2024, 2, 19)?, "Presidents' Day"), (NaiveDate::from_ymd_res(2024, 3, 22)?, "Emancipation Day"), (NaiveDate::from_ymd_res(2024, 3, 29)?, "Good Friday"), (NaiveDate::from_ymd_res(2024, 7, 25)?, "Constitution Day"), (NaiveDate::from_ymd_res(2024, 11, 19)?, "Discovery Day"), ], &mut map, - Country::US_PR, - "United States (Puerto Rico)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2025, 1, 6)?, "Epiphany"), - (NaiveDate::from_ymd_res(2025, 2, 17)?, "Presidents' Day"), (NaiveDate::from_ymd_res(2025, 3, 22)?, "Emancipation Day"), (NaiveDate::from_ymd_res(2025, 4, 18)?, "Good Friday"), (NaiveDate::from_ymd_res(2025, 7, 25)?, "Constitution Day"), (NaiveDate::from_ymd_res(2025, 11, 19)?, "Discovery Day"), ], &mut map, - Country::US_PR, - "United States (Puerto Rico)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2026, 1, 6)?, "Epiphany"), - (NaiveDate::from_ymd_res(2026, 2, 16)?, "Presidents' Day"), (NaiveDate::from_ymd_res(2026, 3, 22)?, "Emancipation Day"), ( NaiveDate::from_ymd_res(2026, 3, 23)?, @@ -931,47 +489,16 @@ pub fn build( (NaiveDate::from_ymd_res(2026, 11, 19)?, "Discovery Day"), ], &mut map, - Country::US_PR, - "United States (Puerto Rico)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2027, 1, 6)?, "Epiphany"), - (NaiveDate::from_ymd_res(2027, 2, 15)?, "Presidents' Day"), (NaiveDate::from_ymd_res(2027, 3, 22)?, "Emancipation Day"), (NaiveDate::from_ymd_res(2027, 3, 26)?, "Good Friday"), (NaiveDate::from_ymd_res(2027, 7, 25)?, "Constitution Day"), @@ -982,35 +509,16 @@ pub fn build( (NaiveDate::from_ymd_res(2027, 11, 19)?, "Discovery Day"), ], &mut map, - Country::US_PR, - "United States (Puerto Rico)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2028, 1, 6)?, "Epiphany"), - (NaiveDate::from_ymd_res(2028, 2, 21)?, "Presidents' Day"), (NaiveDate::from_ymd_res(2028, 3, 22)?, "Emancipation Day"), (NaiveDate::from_ymd_res(2028, 4, 14)?, "Good Friday"), (NaiveDate::from_ymd_res(2028, 7, 25)?, "Constitution Day"), @@ -1021,74 +529,40 @@ pub fn build( ), ], &mut map, - Country::US_PR, - "United States (Puerto Rico)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2029, 1, 6)?, "Epiphany"), - (NaiveDate::from_ymd_res(2029, 2, 19)?, "Presidents' Day"), (NaiveDate::from_ymd_res(2029, 3, 22)?, "Emancipation Day"), (NaiveDate::from_ymd_res(2029, 3, 30)?, "Good Friday"), (NaiveDate::from_ymd_res(2029, 7, 25)?, "Constitution Day"), (NaiveDate::from_ymd_res(2029, 11, 19)?, "Discovery Day"), ], &mut map, - Country::US_PR, - "United States (Puerto Rico)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2030, 1, 6)?, "Epiphany"), - (NaiveDate::from_ymd_res(2030, 2, 18)?, "Presidents' Day"), (NaiveDate::from_ymd_res(2030, 3, 22)?, "Emancipation Day"), (NaiveDate::from_ymd_res(2030, 4, 19)?, "Good Friday"), (NaiveDate::from_ymd_res(2030, 7, 25)?, "Constitution Day"), (NaiveDate::from_ymd_res(2030, 11, 19)?, "Discovery Day"), ], &mut map, - Country::US_PR, - "United States (Puerto Rico)", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/us_ri.rs b/src/data/us_ri.rs index 50503c4..b2b9cb7 100644 --- a/src/data/us_ri.rs +++ b/src/data/us_ri.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "United States (Rhode Island)"; +const COUNTY_CODE: Country = Country::US_RI; + /// Generate holiday map for United States (Rhode Island). #[allow( unused_mut, @@ -9,1061 +12,319 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); - build_year( + let mut national_holidays = de::build(years)?; + + build_subdivision_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, 8, 14)?, "Victory Day"), - (NaiveDate::from_ymd_res(2000, 10, 9)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2000, 8, 14)?, "Victory Day")], &mut map, - Country::US_RI, - "United States (Rhode Island)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 8, 13)?, "Victory Day"), - (NaiveDate::from_ymd_res(2001, 10, 8)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2001, 8, 13)?, "Victory Day")], &mut map, - Country::US_RI, - "United States (Rhode Island)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 8, 12)?, "Victory Day"), - (NaiveDate::from_ymd_res(2002, 10, 14)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2002, 8, 12)?, "Victory Day")], &mut map, - Country::US_RI, - "United States (Rhode Island)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 8, 11)?, "Victory Day"), - (NaiveDate::from_ymd_res(2003, 10, 13)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2003, 8, 11)?, "Victory Day")], &mut map, - Country::US_RI, - "United States (Rhode Island)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 8, 9)?, "Victory Day"), - (NaiveDate::from_ymd_res(2004, 10, 11)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2004, 8, 9)?, "Victory Day")], &mut map, - Country::US_RI, - "United States (Rhode Island)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 8, 8)?, "Victory Day"), - (NaiveDate::from_ymd_res(2005, 10, 10)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2005, 8, 8)?, "Victory Day")], &mut map, - Country::US_RI, - "United States (Rhode Island)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 8, 14)?, "Victory Day"), - (NaiveDate::from_ymd_res(2006, 10, 9)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2006, 8, 14)?, "Victory Day")], &mut map, - Country::US_RI, - "United States (Rhode Island)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 8, 13)?, "Victory Day"), - (NaiveDate::from_ymd_res(2007, 10, 8)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2007, 8, 13)?, "Victory Day")], &mut map, - Country::US_RI, - "United States (Rhode Island)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 8, 11)?, "Victory Day"), - (NaiveDate::from_ymd_res(2008, 10, 13)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2008, 8, 11)?, "Victory Day")], &mut map, - Country::US_RI, - "United States (Rhode Island)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 8, 10)?, "Victory Day"), - (NaiveDate::from_ymd_res(2009, 10, 12)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2009, 8, 10)?, "Victory Day")], &mut map, - Country::US_RI, - "United States (Rhode Island)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 8, 9)?, "Victory Day"), - (NaiveDate::from_ymd_res(2010, 10, 11)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2010, 8, 9)?, "Victory Day")], &mut map, - Country::US_RI, - "United States (Rhode Island)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 8, 8)?, "Victory Day"), - (NaiveDate::from_ymd_res(2011, 10, 10)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2011, 8, 8)?, "Victory Day")], &mut map, - Country::US_RI, - "United States (Rhode Island)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 8, 13)?, "Victory Day"), - (NaiveDate::from_ymd_res(2012, 10, 8)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2012, 8, 13)?, "Victory Day")], &mut map, - Country::US_RI, - "United States (Rhode Island)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 8, 12)?, "Victory Day"), - (NaiveDate::from_ymd_res(2013, 10, 14)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2013, 8, 12)?, "Victory Day")], &mut map, - Country::US_RI, - "United States (Rhode Island)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 8, 11)?, "Victory Day"), - (NaiveDate::from_ymd_res(2014, 10, 13)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2014, 8, 11)?, "Victory Day")], &mut map, - Country::US_RI, - "United States (Rhode Island)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 8, 10)?, "Victory Day"), - (NaiveDate::from_ymd_res(2015, 10, 12)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2015, 8, 10)?, "Victory Day")], &mut map, - Country::US_RI, - "United States (Rhode Island)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 8, 8)?, "Victory Day"), - (NaiveDate::from_ymd_res(2016, 10, 10)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2016, 8, 8)?, "Victory Day")], &mut map, - Country::US_RI, - "United States (Rhode Island)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 8, 14)?, "Victory Day"), - (NaiveDate::from_ymd_res(2017, 10, 9)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2017, 8, 14)?, "Victory Day")], &mut map, - Country::US_RI, - "United States (Rhode Island)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 8, 13)?, "Victory Day"), - (NaiveDate::from_ymd_res(2018, 10, 8)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2018, 8, 13)?, "Victory Day")], &mut map, - Country::US_RI, - "United States (Rhode Island)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 8, 12)?, "Victory Day"), - (NaiveDate::from_ymd_res(2019, 10, 14)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2019, 8, 12)?, "Victory Day")], &mut map, - Country::US_RI, - "United States (Rhode Island)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 8, 10)?, "Victory Day"), - (NaiveDate::from_ymd_res(2020, 10, 12)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2020, 8, 10)?, "Victory Day")], &mut map, - Country::US_RI, - "United States (Rhode Island)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 8, 9)?, "Victory Day"), - (NaiveDate::from_ymd_res(2021, 10, 11)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2021, 8, 9)?, "Victory Day")], &mut map, - Country::US_RI, - "United States (Rhode Island)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 8, 8)?, "Victory Day"), - ( - NaiveDate::from_ymd_res(2022, 10, 10)?, - "Indigenous Peoples' Day / Columbus Day", - ), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2022, 8, 8)?, "Victory Day")], &mut map, - Country::US_RI, - "United States (Rhode Island)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 8, 14)?, "Victory Day"), - ( - NaiveDate::from_ymd_res(2023, 10, 9)?, - "Indigenous Peoples' Day / Columbus Day", - ), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2023, 8, 14)?, "Victory Day")], &mut map, - Country::US_RI, - "United States (Rhode Island)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 8, 12)?, "Victory Day"), - ( - NaiveDate::from_ymd_res(2024, 10, 14)?, - "Indigenous Peoples' Day / Columbus Day", - ), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2024, 8, 12)?, "Victory Day")], &mut map, - Country::US_RI, - "United States (Rhode Island)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 8, 11)?, "Victory Day"), - ( - NaiveDate::from_ymd_res(2025, 10, 13)?, - "Indigenous Peoples' Day / Columbus Day", - ), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2025, 8, 11)?, "Victory Day")], &mut map, - Country::US_RI, - "United States (Rhode Island)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 8, 10)?, "Victory Day"), - ( - NaiveDate::from_ymd_res(2026, 10, 12)?, - "Indigenous Peoples' Day / Columbus Day", - ), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2026, 8, 10)?, "Victory Day")], &mut map, - Country::US_RI, - "United States (Rhode Island)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 8, 9)?, "Victory Day"), - ( - NaiveDate::from_ymd_res(2027, 10, 11)?, - "Indigenous Peoples' Day / Columbus Day", - ), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2027, 8, 9)?, "Victory Day")], &mut map, - Country::US_RI, - "United States (Rhode Island)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 8, 14)?, "Victory Day"), - ( - NaiveDate::from_ymd_res(2028, 10, 9)?, - "Indigenous Peoples' Day / Columbus Day", - ), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2028, 8, 14)?, "Victory Day")], &mut map, - Country::US_RI, - "United States (Rhode Island)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 8, 13)?, "Victory Day"), - ( - NaiveDate::from_ymd_res(2029, 10, 8)?, - "Indigenous Peoples' Day / Columbus Day", - ), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2029, 8, 13)?, "Victory Day")], &mut map, - Country::US_RI, - "United States (Rhode Island)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 8, 12)?, "Victory Day"), - ( - NaiveDate::from_ymd_res(2030, 10, 14)?, - "Indigenous Peoples' Day / Columbus Day", - ), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2030, 8, 12)?, "Victory Day")], &mut map, - Country::US_RI, - "United States (Rhode Island)", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/us_sc.rs b/src/data/us_sc.rs index 51d04b4..20ff0c8 100644 --- a/src/data/us_sc.rs +++ b/src/data/us_sc.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "United States (South Carolina)"; +const COUNTY_CODE: Country = Country::US_SC; + /// Generate holiday map for United States (South Carolina). #[allow( unused_mut, @@ -9,1096 +12,412 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); - build_year( + let mut national_holidays = de::build(years)?; + + build_subdivision_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, 4, 24)?, - "Confederate Memorial Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2000, 4, 24)?, + "Confederate Memorial Day", + )], &mut map, - Country::US_SC, - "United States (South Carolina)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 23)?, - "Confederate Memorial Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2001, 4, 23)?, + "Confederate Memorial Day", + )], &mut map, - Country::US_SC, - "United States (South Carolina)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 22)?, - "Confederate Memorial Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2002, 4, 22)?, + "Confederate Memorial Day", + )], &mut map, - Country::US_SC, - "United States (South Carolina)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 28)?, - "Confederate Memorial Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2003, 4, 28)?, + "Confederate Memorial Day", + )], &mut map, - Country::US_SC, - "United States (South Carolina)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 26)?, - "Confederate Memorial Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2004, 4, 26)?, + "Confederate Memorial Day", + )], &mut map, - Country::US_SC, - "United States (South Carolina)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 25)?, - "Confederate Memorial Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2005, 4, 25)?, + "Confederate Memorial Day", + )], &mut map, - Country::US_SC, - "United States (South Carolina)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 24)?, - "Confederate Memorial Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2006, 4, 24)?, + "Confederate Memorial Day", + )], &mut map, - Country::US_SC, - "United States (South Carolina)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 23)?, - "Confederate Memorial Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2007, 4, 23)?, + "Confederate Memorial Day", + )], &mut map, - Country::US_SC, - "United States (South Carolina)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 28)?, - "Confederate Memorial Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2008, 4, 28)?, + "Confederate Memorial Day", + )], &mut map, - Country::US_SC, - "United States (South Carolina)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 27)?, - "Confederate Memorial Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2009, 4, 27)?, + "Confederate Memorial Day", + )], &mut map, - Country::US_SC, - "United States (South Carolina)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 26)?, - "Confederate Memorial Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2010, 4, 26)?, + "Confederate Memorial Day", + )], &mut map, - Country::US_SC, - "United States (South Carolina)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 25)?, - "Confederate Memorial Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2011, 4, 25)?, + "Confederate Memorial Day", + )], &mut map, - Country::US_SC, - "United States (South Carolina)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 23)?, - "Confederate Memorial Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2012, 4, 23)?, + "Confederate Memorial Day", + )], &mut map, - Country::US_SC, - "United States (South Carolina)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 22)?, - "Confederate Memorial Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2013, 4, 22)?, + "Confederate Memorial Day", + )], &mut map, - Country::US_SC, - "United States (South Carolina)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 28)?, - "Confederate Memorial Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2014, 4, 28)?, + "Confederate Memorial Day", + )], &mut map, - Country::US_SC, - "United States (South Carolina)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 27)?, - "Confederate Memorial Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2015, 4, 27)?, + "Confederate Memorial Day", + )], &mut map, - Country::US_SC, - "United States (South Carolina)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 25)?, - "Confederate Memorial Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2016, 4, 25)?, + "Confederate Memorial Day", + )], &mut map, - Country::US_SC, - "United States (South Carolina)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 24)?, - "Confederate Memorial Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2017, 4, 24)?, + "Confederate Memorial Day", + )], &mut map, - Country::US_SC, - "United States (South Carolina)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 23)?, - "Confederate Memorial Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2018, 4, 23)?, + "Confederate Memorial Day", + )], &mut map, - Country::US_SC, - "United States (South Carolina)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 22)?, - "Confederate Memorial Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2019, 4, 22)?, + "Confederate Memorial Day", + )], &mut map, - Country::US_SC, - "United States (South Carolina)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 27)?, - "Confederate Memorial Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2020, 4, 27)?, + "Confederate Memorial Day", + )], &mut map, - Country::US_SC, - "United States (South Carolina)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 26)?, - "Confederate Memorial Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2021, 4, 26)?, + "Confederate Memorial Day", + )], &mut map, - Country::US_SC, - "United States (South Carolina)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 25)?, - "Confederate Memorial Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2022, 4, 25)?, + "Confederate Memorial Day", + )], &mut map, - Country::US_SC, - "United States (South Carolina)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 24)?, - "Confederate Memorial Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2023, 4, 24)?, + "Confederate Memorial Day", + )], &mut map, - Country::US_SC, - "United States (South Carolina)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 22)?, - "Confederate Memorial Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2024, 4, 22)?, + "Confederate Memorial Day", + )], &mut map, - Country::US_SC, - "United States (South Carolina)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 28)?, - "Confederate Memorial Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2025, 4, 28)?, + "Confederate Memorial Day", + )], &mut map, - Country::US_SC, - "United States (South Carolina)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 27)?, - "Confederate Memorial Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2026, 4, 27)?, + "Confederate Memorial Day", + )], &mut map, - Country::US_SC, - "United States (South Carolina)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 26)?, - "Confederate Memorial Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2027, 4, 26)?, + "Confederate Memorial Day", + )], &mut map, - Country::US_SC, - "United States (South Carolina)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 24)?, - "Confederate Memorial Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2028, 4, 24)?, + "Confederate Memorial Day", + )], &mut map, - Country::US_SC, - "United States (South Carolina)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 23)?, - "Confederate Memorial Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2029, 4, 23)?, + "Confederate Memorial Day", + )], &mut map, - Country::US_SC, - "United States (South Carolina)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 22)?, - "Confederate Memorial Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2030, 4, 22)?, + "Confederate Memorial Day", + )], &mut map, - Country::US_SC, - "United States (South Carolina)", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/us_sd.rs b/src/data/us_sd.rs index ceff51e..eb92b5c 100644 --- a/src/data/us_sd.rs +++ b/src/data/us_sd.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "United States (South Dakota)"; +const COUNTY_CODE: Country = Country::US_SD; + /// Generate holiday map for United States (South Dakota). #[allow( unused_mut, @@ -9,1096 +12,319 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); - build_year( + let mut national_holidays = de::build(years)?; + + build_subdivision_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)?, - "Native Americans' Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_SD, - "United States (South Dakota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Native Americans' Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_SD, - "United States (South Dakota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Native Americans' Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_SD, - "United States (South Dakota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Native Americans' Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_SD, - "United States (South Dakota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Native Americans' Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_SD, - "United States (South Dakota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Native Americans' Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_SD, - "United States (South Dakota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Native Americans' Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_SD, - "United States (South Dakota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Native Americans' Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_SD, - "United States (South Dakota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Native Americans' Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_SD, - "United States (South Dakota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Native Americans' Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_SD, - "United States (South Dakota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Native Americans' Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_SD, - "United States (South Dakota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Native Americans' Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_SD, - "United States (South Dakota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Native Americans' Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_SD, - "United States (South Dakota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Native Americans' Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_SD, - "United States (South Dakota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Native Americans' Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_SD, - "United States (South Dakota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Native Americans' Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_SD, - "United States (South Dakota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Native Americans' Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_SD, - "United States (South Dakota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Native Americans' Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_SD, - "United States (South Dakota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Native Americans' Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_SD, - "United States (South Dakota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Native Americans' Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_SD, - "United States (South Dakota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Native Americans' Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_SD, - "United States (South Dakota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Native Americans' Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_SD, - "United States (South Dakota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Native Americans' Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_SD, - "United States (South Dakota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Native Americans' Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_SD, - "United States (South Dakota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Native Americans' Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_SD, - "United States (South Dakota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Native Americans' Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_SD, - "United States (South Dakota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Native Americans' Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_SD, - "United States (South Dakota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Native Americans' Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_SD, - "United States (South Dakota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Native Americans' Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_SD, - "United States (South Dakota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Native Americans' Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_SD, - "United States (South Dakota)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Native Americans' Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_SD, - "United States (South Dakota)", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/us_tn.rs b/src/data/us_tn.rs index 5079ecc..5e2487a 100644 --- a/src/data/us_tn.rs +++ b/src/data/us_tn.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "United States (Tennessee)"; +const COUNTY_CODE: Country = Country::US_TN; + /// Generate holiday map for United States (Tennessee). #[allow( unused_mut, @@ -9,1003 +12,319 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); - build_year( + let mut national_holidays = de::build(years)?; + + build_subdivision_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, 4, 21)?, "Good Friday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2000, 4, 21)?, "Good Friday")], &mut map, - Country::US_TN, - "United States (Tennessee)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 13)?, "Good Friday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2001, 4, 13)?, "Good Friday")], &mut map, - Country::US_TN, - "United States (Tennessee)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 3, 29)?, "Good Friday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2002, 3, 29)?, "Good Friday")], &mut map, - Country::US_TN, - "United States (Tennessee)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 18)?, "Good Friday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2003, 4, 18)?, "Good Friday")], &mut map, - Country::US_TN, - "United States (Tennessee)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 9)?, "Good Friday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2004, 4, 9)?, "Good Friday")], &mut map, - Country::US_TN, - "United States (Tennessee)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 3, 25)?, "Good Friday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2005, 3, 25)?, "Good Friday")], &mut map, - Country::US_TN, - "United States (Tennessee)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 14)?, "Good Friday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2006, 4, 14)?, "Good Friday")], &mut map, - Country::US_TN, - "United States (Tennessee)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 6)?, "Good Friday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2007, 4, 6)?, "Good Friday")], &mut map, - Country::US_TN, - "United States (Tennessee)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 3, 21)?, "Good Friday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2008, 3, 21)?, "Good Friday")], &mut map, - Country::US_TN, - "United States (Tennessee)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 10)?, "Good Friday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2009, 4, 10)?, "Good Friday")], &mut map, - Country::US_TN, - "United States (Tennessee)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 2)?, "Good Friday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2010, 4, 2)?, "Good Friday")], &mut map, - Country::US_TN, - "United States (Tennessee)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 22)?, "Good Friday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2011, 4, 22)?, "Good Friday")], &mut map, - Country::US_TN, - "United States (Tennessee)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 6)?, "Good Friday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2012, 4, 6)?, "Good Friday")], &mut map, - Country::US_TN, - "United States (Tennessee)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 3, 29)?, "Good Friday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2013, 3, 29)?, "Good Friday")], &mut map, - Country::US_TN, - "United States (Tennessee)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 18)?, "Good Friday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2014, 4, 18)?, "Good Friday")], &mut map, - Country::US_TN, - "United States (Tennessee)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 3)?, "Good Friday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2015, 4, 3)?, "Good Friday")], &mut map, - Country::US_TN, - "United States (Tennessee)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 3, 25)?, "Good Friday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2016, 3, 25)?, "Good Friday")], &mut map, - Country::US_TN, - "United States (Tennessee)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 14)?, "Good Friday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2017, 4, 14)?, "Good Friday")], &mut map, - Country::US_TN, - "United States (Tennessee)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 3, 30)?, "Good Friday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2018, 3, 30)?, "Good Friday")], &mut map, - Country::US_TN, - "United States (Tennessee)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 19)?, "Good Friday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2019, 4, 19)?, "Good Friday")], &mut map, - Country::US_TN, - "United States (Tennessee)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 10)?, "Good Friday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2020, 4, 10)?, "Good Friday")], &mut map, - Country::US_TN, - "United States (Tennessee)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 2)?, "Good Friday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2021, 4, 2)?, "Good Friday")], &mut map, - Country::US_TN, - "United States (Tennessee)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 15)?, "Good Friday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2022, 4, 15)?, "Good Friday")], &mut map, - Country::US_TN, - "United States (Tennessee)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 7)?, "Good Friday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2023, 4, 7)?, "Good Friday")], &mut map, - Country::US_TN, - "United States (Tennessee)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 3, 29)?, "Good Friday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2024, 3, 29)?, "Good Friday")], &mut map, - Country::US_TN, - "United States (Tennessee)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 18)?, "Good Friday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2025, 4, 18)?, "Good Friday")], &mut map, - Country::US_TN, - "United States (Tennessee)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 3)?, "Good Friday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2026, 4, 3)?, "Good Friday")], &mut map, - Country::US_TN, - "United States (Tennessee)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 3, 26)?, "Good Friday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2027, 3, 26)?, "Good Friday")], &mut map, - Country::US_TN, - "United States (Tennessee)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 14)?, "Good Friday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2028, 4, 14)?, "Good Friday")], &mut map, - Country::US_TN, - "United States (Tennessee)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 3, 30)?, "Good Friday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2029, 3, 30)?, "Good Friday")], &mut map, - Country::US_TN, - "United States (Tennessee)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 4, 19)?, "Good Friday"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2030, 4, 19)?, "Good Friday")], &mut map, - Country::US_TN, - "United States (Tennessee)", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/us_tx.rs b/src/data/us_tx.rs index 3536f20..f525fd2 100644 --- a/src/data/us_tx.rs +++ b/src/data/us_tx.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "United States (Texas)"; +const COUNTY_CODE: Country = Country::US_TX; + /// Generate holiday map for United States (Texas). #[allow( unused_mut, @@ -9,34 +12,16 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); - build_year( + let mut national_holidays = de::build(years)?; + + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2000, 1, 19)?, "Confederate Memorial Day", @@ -73,33 +58,15 @@ pub fn build( ), ], &mut map, - Country::US_TX, - "United States (Texas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2001, 1, 19)?, "Confederate Memorial Day", @@ -130,29 +97,15 @@ pub fn build( ), ], &mut map, - Country::US_TX, - "United States (Texas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2002, 1, 19)?, "Confederate Memorial Day", @@ -183,29 +136,15 @@ pub fn build( ), ], &mut map, - Country::US_TX, - "United States (Texas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2003, 1, 19)?, "Confederate Memorial Day", @@ -236,41 +175,15 @@ pub fn build( ), ], &mut map, - Country::US_TX, - "United States (Texas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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); Christmas Eve", - ), - ( - NaiveDate::from_ymd_res(2004, 1, 19)?, - "Confederate Memorial Day; Martin Luther King Jr. Day", - ), - ( - NaiveDate::from_ymd_res(2004, 2, 16)?, - "Washington's Birthday", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2004, 3, 2)?, "Texas Independence Day", @@ -300,33 +213,15 @@ pub fn build( ), ], &mut map, - Country::US_TX, - "United States (Texas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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); Day After Christmas", - ), - ( - NaiveDate::from_ymd_res(2005, 1, 17)?, - "Martin Luther King Jr. Day", - ), - ( - NaiveDate::from_ymd_res(2005, 2, 21)?, - "Washington's Birthday", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2005, 1, 19)?, "Confederate Memorial Day", @@ -357,37 +252,15 @@ pub fn build( ), ], &mut map, - Country::US_TX, - "United States (Texas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2006, 1, 19)?, "Confederate Memorial Day", @@ -422,33 +295,15 @@ pub fn build( ), ], &mut map, - Country::US_TX, - "United States (Texas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2007, 1, 19)?, "Confederate Memorial Day", @@ -479,29 +334,15 @@ pub fn build( ), ], &mut map, - Country::US_TX, - "United States (Texas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2008, 1, 19)?, "Confederate Memorial Day", @@ -532,33 +373,15 @@ pub fn build( ), ], &mut map, - Country::US_TX, - "United States (Texas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Confederate Memorial Day; Martin Luther King Jr. Day", - ), - ( - NaiveDate::from_ymd_res(2009, 2, 16)?, - "Washington's Birthday", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2009, 3, 2)?, "Texas Independence Day", @@ -585,41 +408,15 @@ pub fn build( ), ], &mut map, - Country::US_TX, - "United States (Texas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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); Christmas Eve", - ), - ( - NaiveDate::from_ymd_res(2010, 1, 18)?, - "Martin Luther King Jr. Day", - ), - ( - NaiveDate::from_ymd_res(2010, 2, 15)?, - "Washington's Birthday", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2010, 1, 19)?, "Confederate Memorial Day", @@ -653,33 +450,15 @@ pub fn build( ), ], &mut map, - Country::US_TX, - "United States (Texas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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); Day After Christmas", - ), - ( - NaiveDate::from_ymd_res(2011, 1, 17)?, - "Martin Luther King Jr. Day", - ), - ( - NaiveDate::from_ymd_res(2011, 2, 21)?, - "Washington's Birthday", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2011, 1, 19)?, "Confederate Memorial Day", @@ -710,37 +489,15 @@ pub fn build( ), ], &mut map, - Country::US_TX, - "United States (Texas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2012, 1, 19)?, "Confederate Memorial Day", @@ -771,29 +528,15 @@ pub fn build( ), ], &mut map, - Country::US_TX, - "United States (Texas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2013, 1, 19)?, "Confederate Memorial Day", @@ -824,29 +567,15 @@ pub fn build( ), ], &mut map, - Country::US_TX, - "United States (Texas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2014, 1, 19)?, "Confederate Memorial Day", @@ -877,33 +606,15 @@ pub fn build( ), ], &mut map, - Country::US_TX, - "United States (Texas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Confederate Memorial Day; Martin Luther King Jr. Day", - ), - ( - NaiveDate::from_ymd_res(2015, 2, 16)?, - "Washington's Birthday", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2015, 3, 2)?, "Texas Independence Day", @@ -930,33 +641,15 @@ pub fn build( ), ], &mut map, - Country::US_TX, - "United States (Texas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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); Day After Christmas", - ), - ( - NaiveDate::from_ymd_res(2016, 1, 18)?, - "Martin Luther King Jr. Day", - ), - ( - NaiveDate::from_ymd_res(2016, 2, 15)?, - "Washington's Birthday", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2016, 1, 19)?, "Confederate Memorial Day", @@ -987,37 +680,15 @@ pub fn build( ), ], &mut map, - Country::US_TX, - "United States (Texas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2017, 1, 19)?, "Confederate Memorial Day", @@ -1052,33 +723,15 @@ pub fn build( ), ], &mut map, - Country::US_TX, - "United States (Texas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2018, 1, 19)?, "Confederate Memorial Day", @@ -1109,29 +762,15 @@ pub fn build( ), ], &mut map, - Country::US_TX, - "United States (Texas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2019, 1, 19)?, "Confederate Memorial Day", @@ -1162,33 +801,15 @@ pub fn build( ), ], &mut map, - Country::US_TX, - "United States (Texas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2020, 1, 19)?, "Confederate Memorial Day", @@ -1219,49 +840,15 @@ pub fn build( ), ], &mut map, - Country::US_TX, - "United States (Texas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Emancipation Day In Texas; 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); Christmas Eve", - ), - ( - NaiveDate::from_ymd_res(2021, 1, 18)?, - "Martin Luther King Jr. Day", - ), - ( - NaiveDate::from_ymd_res(2021, 2, 15)?, - "Washington's Birthday", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2021, 1, 19)?, "Confederate Memorial Day", @@ -1291,41 +878,15 @@ pub fn build( ), ], &mut map, - Country::US_TX, - "United States (Texas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Emancipation Day In Texas; 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); Day After Christmas", - ), - ( - NaiveDate::from_ymd_res(2022, 1, 17)?, - "Martin Luther King Jr. Day", - ), - ( - NaiveDate::from_ymd_res(2022, 2, 21)?, - "Washington's Birthday", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2022, 1, 19)?, "Confederate Memorial Day", @@ -1352,41 +913,15 @@ pub fn build( ), ], &mut map, - Country::US_TX, - "United States (Texas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Emancipation Day In Texas; 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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2023, 1, 19)?, "Confederate Memorial Day", @@ -1417,33 +952,15 @@ pub fn build( ), ], &mut map, - Country::US_TX, - "United States (Texas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Emancipation Day In Texas; 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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2024, 1, 19)?, "Confederate Memorial Day", @@ -1470,33 +987,15 @@ pub fn build( ), ], &mut map, - Country::US_TX, - "United States (Texas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Emancipation Day In Texas; 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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2025, 1, 19)?, "Confederate Memorial Day", @@ -1523,37 +1022,15 @@ pub fn build( ), ], &mut map, - Country::US_TX, - "United States (Texas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Emancipation Day In Texas; 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)?, - "Confederate Memorial Day; Martin Luther King Jr. Day", - ), - ( - NaiveDate::from_ymd_res(2026, 2, 16)?, - "Washington's Birthday", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2026, 3, 2)?, "Texas Independence Day", @@ -1576,49 +1053,15 @@ pub fn build( ), ], &mut map, - Country::US_TX, - "United States (Texas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Emancipation Day In Texas; 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); Christmas Eve", - ), - ( - NaiveDate::from_ymd_res(2027, 1, 18)?, - "Martin Luther King Jr. Day", - ), - ( - NaiveDate::from_ymd_res(2027, 2, 15)?, - "Washington's Birthday", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2027, 1, 19)?, "Confederate Memorial Day", @@ -1648,37 +1091,15 @@ pub fn build( ), ], &mut map, - Country::US_TX, - "United States (Texas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Emancipation Day In Texas; 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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2028, 1, 19)?, "Confederate Memorial Day", @@ -1709,37 +1130,15 @@ pub fn build( ), ], &mut map, - Country::US_TX, - "United States (Texas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Emancipation Day In Texas; 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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2029, 1, 19)?, "Confederate Memorial Day", @@ -1766,33 +1165,15 @@ pub fn build( ), ], &mut map, - Country::US_TX, - "United States (Texas)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Emancipation Day In Texas; 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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2030, 1, 19)?, "Confederate Memorial Day", @@ -1819,8 +1200,8 @@ pub fn build( ), ], &mut map, - Country::US_TX, - "United States (Texas)", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/us_um.rs b/src/data/us_um.rs index 6887424..d473984 100644 --- a/src/data/us_um.rs +++ b/src/data/us_um.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "United States (United States Minor Outlying Islands)"; +const COUNTY_CODE: Country = Country::US_UM; + /// Generate holiday map for United States (United States Minor Outlying Islands). #[allow( unused_mut, @@ -9,972 +12,319 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); - build_year( + let mut national_holidays = de::build(years)?; + + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_UM, - "United States (United States Minor Outlying Islands)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_UM, - "United States (United States Minor Outlying Islands)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_UM, - "United States (United States Minor Outlying Islands)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_UM, - "United States (United States Minor Outlying Islands)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_UM, - "United States (United States Minor Outlying Islands)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_UM, - "United States (United States Minor Outlying Islands)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_UM, - "United States (United States Minor Outlying Islands)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_UM, - "United States (United States Minor Outlying Islands)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_UM, - "United States (United States Minor Outlying Islands)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_UM, - "United States (United States Minor Outlying Islands)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_UM, - "United States (United States Minor Outlying Islands)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_UM, - "United States (United States Minor Outlying Islands)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_UM, - "United States (United States Minor Outlying Islands)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_UM, - "United States (United States Minor Outlying Islands)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_UM, - "United States (United States Minor Outlying Islands)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_UM, - "United States (United States Minor Outlying Islands)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_UM, - "United States (United States Minor Outlying Islands)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_UM, - "United States (United States Minor Outlying Islands)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_UM, - "United States (United States Minor Outlying Islands)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_UM, - "United States (United States Minor Outlying Islands)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_UM, - "United States (United States Minor Outlying Islands)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_UM, - "United States (United States Minor Outlying Islands)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_UM, - "United States (United States Minor Outlying Islands)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_UM, - "United States (United States Minor Outlying Islands)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_UM, - "United States (United States Minor Outlying Islands)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_UM, - "United States (United States Minor Outlying Islands)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_UM, - "United States (United States Minor Outlying Islands)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_UM, - "United States (United States Minor Outlying Islands)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_UM, - "United States (United States Minor Outlying Islands)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_UM, - "United States (United States Minor Outlying Islands)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_UM, - "United States (United States Minor Outlying Islands)", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/us_ut.rs b/src/data/us_ut.rs index c70bc39..91aac85 100644 --- a/src/data/us_ut.rs +++ b/src/data/us_ut.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "United States (Utah)"; +const COUNTY_CODE: Country = Country::US_UT; + /// Generate holiday map for United States (Utah). #[allow( unused_mut, @@ -9,159 +12,56 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); - build_year( + let mut national_holidays = de::build(years)?; + + build_subdivision_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"), - (NaiveDate::from_ymd_res(2000, 7, 24)?, "Pioneer Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2000, 7, 24)?, "Pioneer Day")], &mut map, - Country::US_UT, - "United States (Utah)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2001, 7, 24)?, "Pioneer Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2001, 7, 24)?, "Pioneer Day")], &mut map, - Country::US_UT, - "United States (Utah)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2002, 7, 24)?, "Pioneer Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2002, 7, 24)?, "Pioneer Day")], &mut map, - Country::US_UT, - "United States (Utah)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2003, 7, 24)?, "Pioneer Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2003, 7, 24)?, "Pioneer Day")], &mut map, - Country::US_UT, - "United States (Utah)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2004, 7, 24)?, "Pioneer Day"), ( NaiveDate::from_ymd_res(2004, 7, 23)?, @@ -169,34 +69,15 @@ pub fn build( ), ], &mut map, - Country::US_UT, - "United States (Utah)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2005, 7, 24)?, "Pioneer Day"), ( NaiveDate::from_ymd_res(2005, 7, 25)?, @@ -204,166 +85,55 @@ pub fn build( ), ], &mut map, - Country::US_UT, - "United States (Utah)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2006, 7, 24)?, "Pioneer Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2006, 7, 24)?, "Pioneer Day")], &mut map, - Country::US_UT, - "United States (Utah)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2007, 7, 24)?, "Pioneer Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2007, 7, 24)?, "Pioneer Day")], &mut map, - Country::US_UT, - "United States (Utah)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2008, 7, 24)?, "Pioneer Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2008, 7, 24)?, "Pioneer Day")], &mut map, - Country::US_UT, - "United States (Utah)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2009, 7, 24)?, "Pioneer Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2009, 7, 24)?, "Pioneer Day")], &mut map, - Country::US_UT, - "United States (Utah)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2010, 7, 24)?, "Pioneer Day"), ( NaiveDate::from_ymd_res(2010, 7, 23)?, @@ -371,34 +141,15 @@ pub fn build( ), ], &mut map, - Country::US_UT, - "United States (Utah)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2011, 7, 24)?, "Pioneer Day"), ( NaiveDate::from_ymd_res(2011, 7, 25)?, @@ -406,154 +157,55 @@ pub fn build( ), ], &mut map, - Country::US_UT, - "United States (Utah)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2012, 7, 24)?, "Pioneer Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2012, 7, 24)?, "Pioneer Day")], &mut map, - Country::US_UT, - "United States (Utah)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2013, 7, 24)?, "Pioneer Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2013, 7, 24)?, "Pioneer Day")], &mut map, - Country::US_UT, - "United States (Utah)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2014, 7, 24)?, "Pioneer Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2014, 7, 24)?, "Pioneer Day")], &mut map, - Country::US_UT, - "United States (Utah)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2015, 7, 24)?, "Pioneer Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2015, 7, 24)?, "Pioneer Day")], &mut map, - Country::US_UT, - "United States (Utah)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2016, 7, 24)?, "Pioneer Day"), ( NaiveDate::from_ymd_res(2016, 7, 25)?, @@ -561,174 +213,55 @@ pub fn build( ), ], &mut map, - Country::US_UT, - "United States (Utah)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2017, 7, 24)?, "Pioneer Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2017, 7, 24)?, "Pioneer Day")], &mut map, - Country::US_UT, - "United States (Utah)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2018, 7, 24)?, "Pioneer Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2018, 7, 24)?, "Pioneer Day")], &mut map, - Country::US_UT, - "United States (Utah)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2019, 7, 24)?, "Pioneer Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2019, 7, 24)?, "Pioneer Day")], &mut map, - Country::US_UT, - "United States (Utah)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2020, 7, 24)?, "Pioneer Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2020, 7, 24)?, "Pioneer Day")], &mut map, - Country::US_UT, - "United States (Utah)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2021, 7, 24)?, "Pioneer Day"), ( NaiveDate::from_ymd_res(2021, 7, 23)?, @@ -736,42 +269,15 @@ pub fn build( ), ], &mut map, - Country::US_UT, - "United States (Utah)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2022, 7, 24)?, "Pioneer Day"), ( NaiveDate::from_ymd_res(2022, 7, 25)?, @@ -779,186 +285,55 @@ pub fn build( ), ], &mut map, - Country::US_UT, - "United States (Utah)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2023, 7, 24)?, "Pioneer Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2023, 7, 24)?, "Pioneer Day")], &mut map, - Country::US_UT, - "United States (Utah)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2024, 7, 24)?, "Pioneer Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2024, 7, 24)?, "Pioneer Day")], &mut map, - Country::US_UT, - "United States (Utah)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2025, 7, 24)?, "Pioneer Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2025, 7, 24)?, "Pioneer Day")], &mut map, - Country::US_UT, - "United States (Utah)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2026, 7, 24)?, "Pioneer Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2026, 7, 24)?, "Pioneer Day")], &mut map, - Country::US_UT, - "United States (Utah)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2027, 7, 24)?, "Pioneer Day"), ( NaiveDate::from_ymd_res(2027, 7, 23)?, @@ -966,109 +341,38 @@ pub fn build( ), ], &mut map, - Country::US_UT, - "United States (Utah)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2028, 7, 24)?, "Pioneer Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2028, 7, 24)?, "Pioneer Day")], &mut map, - Country::US_UT, - "United States (Utah)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2029, 7, 24)?, "Pioneer Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2029, 7, 24)?, "Pioneer Day")], &mut map, - Country::US_UT, - "United States (Utah)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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"), - (NaiveDate::from_ymd_res(2030, 7, 24)?, "Pioneer Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2030, 7, 24)?, "Pioneer Day")], &mut map, - Country::US_UT, - "United States (Utah)", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/us_va.rs b/src/data/us_va.rs index 3acd547..7f68a4c 100644 --- a/src/data/us_va.rs +++ b/src/data/us_va.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "United States (Virginia)"; +const COUNTY_CODE: Country = Country::US_VA; + /// Generate holiday map for United States (Virginia). #[allow( unused_mut, @@ -9,1064 +12,334 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); - build_year( + let mut national_holidays = de::build(years)?; + + build_subdivision_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, 1, 14)?, "Lee Jackson Day"), - (NaiveDate::from_ymd_res(2000, 10, 9)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2000, 1, 14)?, "Lee Jackson Day")], &mut map, - Country::US_VA, - "United States (Virginia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2001, 1, 12)?, "Lee Jackson Day"), (NaiveDate::from_ymd_res(2001, 1, 20)?, "Inauguration Day"), - (NaiveDate::from_ymd_res(2001, 10, 8)?, "Columbus Day"), ], &mut map, - Country::US_VA, - "United States (Virginia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 1, 18)?, "Lee Jackson Day"), - (NaiveDate::from_ymd_res(2002, 10, 14)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2002, 1, 18)?, "Lee Jackson Day")], &mut map, - Country::US_VA, - "United States (Virginia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 1, 17)?, "Lee Jackson Day"), - (NaiveDate::from_ymd_res(2003, 10, 13)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2003, 1, 17)?, "Lee Jackson Day")], &mut map, - Country::US_VA, - "United States (Virginia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 1, 16)?, "Lee Jackson Day"), - (NaiveDate::from_ymd_res(2004, 10, 11)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2004, 1, 16)?, "Lee Jackson Day")], &mut map, - Country::US_VA, - "United States (Virginia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2005, 1, 14)?, "Lee Jackson Day"), (NaiveDate::from_ymd_res(2005, 1, 20)?, "Inauguration Day"), - (NaiveDate::from_ymd_res(2005, 10, 10)?, "Columbus Day"), ], &mut map, - Country::US_VA, - "United States (Virginia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 1, 13)?, "Lee Jackson Day"), - (NaiveDate::from_ymd_res(2006, 10, 9)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2006, 1, 13)?, "Lee Jackson Day")], &mut map, - Country::US_VA, - "United States (Virginia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 1, 12)?, "Lee Jackson Day"), - (NaiveDate::from_ymd_res(2007, 10, 8)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2007, 1, 12)?, "Lee Jackson Day")], &mut map, - Country::US_VA, - "United States (Virginia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 1, 18)?, "Lee Jackson Day"), - (NaiveDate::from_ymd_res(2008, 10, 13)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2008, 1, 18)?, "Lee Jackson Day")], &mut map, - Country::US_VA, - "United States (Virginia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2009, 1, 16)?, "Lee Jackson Day"), (NaiveDate::from_ymd_res(2009, 1, 20)?, "Inauguration Day"), - (NaiveDate::from_ymd_res(2009, 10, 12)?, "Columbus Day"), ], &mut map, - Country::US_VA, - "United States (Virginia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 1, 15)?, "Lee Jackson Day"), - (NaiveDate::from_ymd_res(2010, 10, 11)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2010, 1, 15)?, "Lee Jackson Day")], &mut map, - Country::US_VA, - "United States (Virginia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 1, 14)?, "Lee Jackson Day"), - (NaiveDate::from_ymd_res(2011, 10, 10)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2011, 1, 14)?, "Lee Jackson Day")], &mut map, - Country::US_VA, - "United States (Virginia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 1, 13)?, "Lee Jackson Day"), - (NaiveDate::from_ymd_res(2012, 10, 8)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2012, 1, 13)?, "Lee Jackson Day")], &mut map, - Country::US_VA, - "United States (Virginia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Inauguration Day (observed); Martin Luther King Jr. Day", - ), - ( - NaiveDate::from_ymd_res(2013, 2, 18)?, - "Washington's Birthday", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2013, 1, 18)?, "Lee Jackson Day"), (NaiveDate::from_ymd_res(2013, 1, 20)?, "Inauguration Day"), - (NaiveDate::from_ymd_res(2013, 10, 14)?, "Columbus Day"), ], &mut map, - Country::US_VA, - "United States (Virginia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 1, 17)?, "Lee Jackson Day"), - (NaiveDate::from_ymd_res(2014, 10, 13)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2014, 1, 17)?, "Lee Jackson Day")], &mut map, - Country::US_VA, - "United States (Virginia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 1, 16)?, "Lee Jackson Day"), - (NaiveDate::from_ymd_res(2015, 10, 12)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2015, 1, 16)?, "Lee Jackson Day")], &mut map, - Country::US_VA, - "United States (Virginia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 1, 15)?, "Lee Jackson Day"), - (NaiveDate::from_ymd_res(2016, 10, 10)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2016, 1, 15)?, "Lee Jackson Day")], &mut map, - Country::US_VA, - "United States (Virginia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2017, 1, 13)?, "Lee Jackson Day"), (NaiveDate::from_ymd_res(2017, 1, 20)?, "Inauguration Day"), - (NaiveDate::from_ymd_res(2017, 10, 9)?, "Columbus Day"), ], &mut map, - Country::US_VA, - "United States (Virginia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 1, 12)?, "Lee Jackson Day"), - (NaiveDate::from_ymd_res(2018, 10, 8)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2018, 1, 12)?, "Lee Jackson Day")], &mut map, - Country::US_VA, - "United States (Virginia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 1, 18)?, "Lee Jackson Day"), - (NaiveDate::from_ymd_res(2019, 10, 14)?, "Columbus Day"), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2019, 1, 18)?, "Lee Jackson Day")], &mut map, - Country::US_VA, - "United States (Virginia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 1, 17)?, "Lee Jackson Day"), - ( - NaiveDate::from_ymd_res(2020, 10, 12)?, - "Indigenous Peoples' Day", - ), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2020, 1, 17)?, "Lee Jackson Day")], &mut map, - Country::US_VA, - "United States (Virginia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 1, 20)?, "Inauguration Day"), - ( - NaiveDate::from_ymd_res(2021, 10, 11)?, - "Indigenous Peoples' Day", - ), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2021, 1, 20)?, "Inauguration Day")], &mut map, - Country::US_VA, - "United States (Virginia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Indigenous Peoples' Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_VA, - "United States (Virginia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Indigenous Peoples' Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_VA, - "United States (Virginia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Indigenous Peoples' Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_VA, - "United States (Virginia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Inauguration Day; Martin Luther King Jr. Day", - ), - ( - NaiveDate::from_ymd_res(2025, 2, 17)?, - "Washington's Birthday", - ), - ( - NaiveDate::from_ymd_res(2025, 10, 13)?, - "Indigenous Peoples' Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_VA, - "United States (Virginia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Indigenous Peoples' Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_VA, - "United States (Virginia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Indigenous Peoples' Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_VA, - "United States (Virginia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Indigenous Peoples' Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_VA, - "United States (Virginia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 1, 20)?, "Inauguration Day"), - ( - NaiveDate::from_ymd_res(2029, 10, 8)?, - "Indigenous Peoples' Day", - ), - ], + &mut national_holidays, + [(NaiveDate::from_ymd_res(2029, 1, 20)?, "Inauguration Day")], &mut map, - Country::US_VA, - "United States (Virginia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Indigenous Peoples' Day", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_VA, - "United States (Virginia)", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/us_vi.rs b/src/data/us_vi.rs index e8e9b5e..cf9b4cb 100644 --- a/src/data/us_vi.rs +++ b/src/data/us_vi.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "United States (Virgin Islands, U.S..)"; +const COUNTY_CODE: Country = Country::US_VI; + /// Generate holiday map for United States (Virgin Islands, U.S..). #[allow( unused_mut, @@ -9,41 +12,22 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); - build_year( + let mut national_holidays = de::build(years)?; + + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2000, 1, 6)?, "Three Kings Day"), - (NaiveDate::from_ymd_res(2000, 2, 21)?, "Presidents' Day"), (NaiveDate::from_ymd_res(2000, 3, 31)?, "Transfer Day"), (NaiveDate::from_ymd_res(2000, 4, 20)?, "Holy Thursday"), (NaiveDate::from_ymd_res(2000, 4, 21)?, "Good Friday"), (NaiveDate::from_ymd_res(2000, 4, 24)?, "Easter Monday"), (NaiveDate::from_ymd_res(2000, 7, 3)?, "Emancipation Day"), - ( - NaiveDate::from_ymd_res(2000, 10, 9)?, - "Columbus Day and Puerto Rico Friendship Day", - ), (NaiveDate::from_ymd_res(2000, 11, 1)?, "Liberty Day"), ( NaiveDate::from_ymd_res(2000, 12, 26)?, @@ -51,40 +35,21 @@ pub fn build( ), ], &mut map, - Country::US_VI, - "United States (Virgin Islands, U.S..)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2001, 1, 6)?, "Three Kings Day"), - (NaiveDate::from_ymd_res(2001, 2, 19)?, "Presidents' Day"), (NaiveDate::from_ymd_res(2001, 3, 31)?, "Transfer Day"), (NaiveDate::from_ymd_res(2001, 4, 12)?, "Holy Thursday"), (NaiveDate::from_ymd_res(2001, 4, 13)?, "Good Friday"), (NaiveDate::from_ymd_res(2001, 4, 16)?, "Easter Monday"), (NaiveDate::from_ymd_res(2001, 7, 3)?, "Emancipation Day"), - ( - NaiveDate::from_ymd_res(2001, 10, 8)?, - "Columbus Day and Puerto Rico Friendship Day", - ), (NaiveDate::from_ymd_res(2001, 11, 1)?, "Liberty Day"), ( NaiveDate::from_ymd_res(2001, 12, 26)?, @@ -92,36 +57,21 @@ pub fn build( ), ], &mut map, - Country::US_VI, - "United States (Virgin Islands, U.S..)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2002, 1, 6)?, "Three Kings Day"), - (NaiveDate::from_ymd_res(2002, 2, 18)?, "Presidents' Day"), (NaiveDate::from_ymd_res(2002, 3, 31)?, "Transfer Day"), (NaiveDate::from_ymd_res(2002, 3, 28)?, "Holy Thursday"), (NaiveDate::from_ymd_res(2002, 3, 29)?, "Good Friday"), (NaiveDate::from_ymd_res(2002, 4, 1)?, "Easter Monday"), (NaiveDate::from_ymd_res(2002, 7, 3)?, "Emancipation Day"), - ( - NaiveDate::from_ymd_res(2002, 10, 14)?, - "Columbus Day and Puerto Rico Friendship Day", - ), (NaiveDate::from_ymd_res(2002, 11, 1)?, "Liberty Day"), ( NaiveDate::from_ymd_res(2002, 12, 26)?, @@ -129,36 +79,21 @@ pub fn build( ), ], &mut map, - Country::US_VI, - "United States (Virgin Islands, U.S..)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2003, 1, 6)?, "Three Kings Day"), - (NaiveDate::from_ymd_res(2003, 2, 17)?, "Presidents' Day"), (NaiveDate::from_ymd_res(2003, 3, 31)?, "Transfer Day"), (NaiveDate::from_ymd_res(2003, 4, 17)?, "Holy Thursday"), (NaiveDate::from_ymd_res(2003, 4, 18)?, "Good Friday"), (NaiveDate::from_ymd_res(2003, 4, 21)?, "Easter Monday"), (NaiveDate::from_ymd_res(2003, 7, 3)?, "Emancipation Day"), - ( - NaiveDate::from_ymd_res(2003, 10, 13)?, - "Columbus Day and Puerto Rico Friendship Day", - ), (NaiveDate::from_ymd_res(2003, 11, 1)?, "Liberty Day"), ( NaiveDate::from_ymd_res(2003, 12, 26)?, @@ -166,48 +101,21 @@ pub fn build( ), ], &mut map, - Country::US_VI, - "United States (Virgin Islands, U.S..)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2004, 1, 6)?, "Three Kings Day"), - (NaiveDate::from_ymd_res(2004, 2, 16)?, "Presidents' Day"), (NaiveDate::from_ymd_res(2004, 3, 31)?, "Transfer Day"), (NaiveDate::from_ymd_res(2004, 4, 8)?, "Holy Thursday"), (NaiveDate::from_ymd_res(2004, 4, 9)?, "Good Friday"), (NaiveDate::from_ymd_res(2004, 4, 12)?, "Easter Monday"), (NaiveDate::from_ymd_res(2004, 7, 3)?, "Emancipation Day"), - ( - NaiveDate::from_ymd_res(2004, 10, 11)?, - "Columbus Day and Puerto Rico Friendship Day", - ), (NaiveDate::from_ymd_res(2004, 11, 1)?, "Liberty Day"), ( NaiveDate::from_ymd_res(2004, 12, 26)?, @@ -215,81 +123,39 @@ pub fn build( ), ], &mut map, - Country::US_VI, - "United States (Virgin Islands, U.S..)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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); Christmas Second Day", - ), - ( - NaiveDate::from_ymd_res(2005, 1, 17)?, - "Martin Luther King Jr. Day", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2005, 1, 6)?, "Three Kings Day"), - (NaiveDate::from_ymd_res(2005, 2, 21)?, "Presidents' Day"), (NaiveDate::from_ymd_res(2005, 3, 31)?, "Transfer Day"), (NaiveDate::from_ymd_res(2005, 3, 24)?, "Holy Thursday"), (NaiveDate::from_ymd_res(2005, 3, 25)?, "Good Friday"), (NaiveDate::from_ymd_res(2005, 3, 28)?, "Easter Monday"), (NaiveDate::from_ymd_res(2005, 7, 3)?, "Emancipation Day"), - ( - NaiveDate::from_ymd_res(2005, 10, 10)?, - "Columbus Day and Puerto Rico Friendship Day", - ), (NaiveDate::from_ymd_res(2005, 11, 1)?, "Liberty Day"), ], &mut map, - Country::US_VI, - "United States (Virgin Islands, U.S..)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2006, 1, 6)?, "Three Kings Day"), - (NaiveDate::from_ymd_res(2006, 2, 20)?, "Presidents' Day"), (NaiveDate::from_ymd_res(2006, 3, 31)?, "Transfer Day"), (NaiveDate::from_ymd_res(2006, 4, 13)?, "Holy Thursday"), (NaiveDate::from_ymd_res(2006, 4, 14)?, "Good Friday"), (NaiveDate::from_ymd_res(2006, 4, 17)?, "Easter Monday"), (NaiveDate::from_ymd_res(2006, 7, 3)?, "Emancipation Day"), - ( - NaiveDate::from_ymd_res(2006, 10, 9)?, - "Columbus Day and Puerto Rico Friendship Day", - ), (NaiveDate::from_ymd_res(2006, 11, 1)?, "Liberty Day"), ( NaiveDate::from_ymd_res(2006, 12, 26)?, @@ -297,40 +163,21 @@ pub fn build( ), ], &mut map, - Country::US_VI, - "United States (Virgin Islands, U.S..)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2007, 1, 6)?, "Three Kings Day"), - (NaiveDate::from_ymd_res(2007, 2, 19)?, "Presidents' Day"), (NaiveDate::from_ymd_res(2007, 3, 31)?, "Transfer Day"), (NaiveDate::from_ymd_res(2007, 4, 5)?, "Holy Thursday"), (NaiveDate::from_ymd_res(2007, 4, 6)?, "Good Friday"), (NaiveDate::from_ymd_res(2007, 4, 9)?, "Easter Monday"), (NaiveDate::from_ymd_res(2007, 7, 3)?, "Emancipation Day"), - ( - NaiveDate::from_ymd_res(2007, 10, 8)?, - "Columbus Day and Puerto Rico Friendship Day", - ), (NaiveDate::from_ymd_res(2007, 11, 1)?, "Liberty Day"), ( NaiveDate::from_ymd_res(2007, 12, 26)?, @@ -338,36 +185,21 @@ pub fn build( ), ], &mut map, - Country::US_VI, - "United States (Virgin Islands, U.S..)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2008, 1, 6)?, "Three Kings Day"), - (NaiveDate::from_ymd_res(2008, 2, 18)?, "Presidents' Day"), (NaiveDate::from_ymd_res(2008, 3, 31)?, "Transfer Day"), (NaiveDate::from_ymd_res(2008, 3, 20)?, "Holy Thursday"), (NaiveDate::from_ymd_res(2008, 3, 21)?, "Good Friday"), (NaiveDate::from_ymd_res(2008, 3, 24)?, "Easter Monday"), (NaiveDate::from_ymd_res(2008, 7, 3)?, "Emancipation Day"), - ( - NaiveDate::from_ymd_res(2008, 10, 13)?, - "Columbus Day and Puerto Rico Friendship Day", - ), (NaiveDate::from_ymd_res(2008, 11, 1)?, "Liberty Day"), ( NaiveDate::from_ymd_res(2008, 12, 26)?, @@ -375,39 +207,20 @@ pub fn build( ), ], &mut map, - Country::US_VI, - "United States (Virgin Islands, U.S..)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Emancipation Day; 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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2009, 1, 6)?, "Three Kings Day"), - (NaiveDate::from_ymd_res(2009, 2, 16)?, "Presidents' Day"), (NaiveDate::from_ymd_res(2009, 3, 31)?, "Transfer Day"), (NaiveDate::from_ymd_res(2009, 4, 9)?, "Holy Thursday"), (NaiveDate::from_ymd_res(2009, 4, 10)?, "Good Friday"), (NaiveDate::from_ymd_res(2009, 4, 13)?, "Easter Monday"), - ( - NaiveDate::from_ymd_res(2009, 10, 12)?, - "Columbus Day and Puerto Rico Friendship Day", - ), (NaiveDate::from_ymd_res(2009, 11, 1)?, "Liberty Day"), ( NaiveDate::from_ymd_res(2009, 12, 26)?, @@ -415,48 +228,21 @@ pub fn build( ), ], &mut map, - Country::US_VI, - "United States (Virgin Islands, U.S..)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2010, 1, 6)?, "Three Kings Day"), - (NaiveDate::from_ymd_res(2010, 2, 15)?, "Presidents' Day"), (NaiveDate::from_ymd_res(2010, 3, 31)?, "Transfer Day"), (NaiveDate::from_ymd_res(2010, 4, 1)?, "Holy Thursday"), (NaiveDate::from_ymd_res(2010, 4, 2)?, "Good Friday"), (NaiveDate::from_ymd_res(2010, 4, 5)?, "Easter Monday"), (NaiveDate::from_ymd_res(2010, 7, 3)?, "Emancipation Day"), - ( - NaiveDate::from_ymd_res(2010, 10, 11)?, - "Columbus Day and Puerto Rico Friendship Day", - ), (NaiveDate::from_ymd_res(2010, 11, 1)?, "Liberty Day"), ( NaiveDate::from_ymd_res(2010, 12, 26)?, @@ -464,81 +250,39 @@ pub fn build( ), ], &mut map, - Country::US_VI, - "United States (Virgin Islands, U.S..)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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); Christmas Second Day", - ), - ( - NaiveDate::from_ymd_res(2011, 1, 17)?, - "Martin Luther King Jr. Day", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2011, 1, 6)?, "Three Kings Day"), - (NaiveDate::from_ymd_res(2011, 2, 21)?, "Presidents' Day"), (NaiveDate::from_ymd_res(2011, 3, 31)?, "Transfer Day"), (NaiveDate::from_ymd_res(2011, 4, 21)?, "Holy Thursday"), (NaiveDate::from_ymd_res(2011, 4, 22)?, "Good Friday"), (NaiveDate::from_ymd_res(2011, 4, 25)?, "Easter Monday"), (NaiveDate::from_ymd_res(2011, 7, 3)?, "Emancipation Day"), - ( - NaiveDate::from_ymd_res(2011, 10, 10)?, - "Columbus Day and Puerto Rico Friendship Day", - ), (NaiveDate::from_ymd_res(2011, 11, 1)?, "Liberty Day"), ], &mut map, - Country::US_VI, - "United States (Virgin Islands, U.S..)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2012, 1, 6)?, "Three Kings Day"), - (NaiveDate::from_ymd_res(2012, 2, 20)?, "Presidents' Day"), (NaiveDate::from_ymd_res(2012, 3, 31)?, "Transfer Day"), (NaiveDate::from_ymd_res(2012, 4, 5)?, "Holy Thursday"), (NaiveDate::from_ymd_res(2012, 4, 6)?, "Good Friday"), (NaiveDate::from_ymd_res(2012, 4, 9)?, "Easter Monday"), (NaiveDate::from_ymd_res(2012, 7, 3)?, "Emancipation Day"), - ( - NaiveDate::from_ymd_res(2012, 10, 8)?, - "Columbus Day and Puerto Rico Friendship Day", - ), (NaiveDate::from_ymd_res(2012, 11, 1)?, "Liberty Day"), ( NaiveDate::from_ymd_res(2012, 12, 26)?, @@ -546,36 +290,21 @@ pub fn build( ), ], &mut map, - Country::US_VI, - "United States (Virgin Islands, U.S..)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2013, 1, 6)?, "Three Kings Day"), - (NaiveDate::from_ymd_res(2013, 2, 18)?, "Presidents' Day"), (NaiveDate::from_ymd_res(2013, 3, 31)?, "Transfer Day"), (NaiveDate::from_ymd_res(2013, 3, 28)?, "Holy Thursday"), (NaiveDate::from_ymd_res(2013, 3, 29)?, "Good Friday"), (NaiveDate::from_ymd_res(2013, 4, 1)?, "Easter Monday"), (NaiveDate::from_ymd_res(2013, 7, 3)?, "Emancipation Day"), - ( - NaiveDate::from_ymd_res(2013, 10, 14)?, - "Columbus Day and Puerto Rico Friendship Day", - ), (NaiveDate::from_ymd_res(2013, 11, 1)?, "Liberty Day"), ( NaiveDate::from_ymd_res(2013, 12, 26)?, @@ -583,36 +312,21 @@ pub fn build( ), ], &mut map, - Country::US_VI, - "United States (Virgin Islands, U.S..)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2014, 1, 6)?, "Three Kings Day"), - (NaiveDate::from_ymd_res(2014, 2, 17)?, "Presidents' Day"), (NaiveDate::from_ymd_res(2014, 3, 31)?, "Transfer Day"), (NaiveDate::from_ymd_res(2014, 4, 17)?, "Holy Thursday"), (NaiveDate::from_ymd_res(2014, 4, 18)?, "Good Friday"), (NaiveDate::from_ymd_res(2014, 4, 21)?, "Easter Monday"), (NaiveDate::from_ymd_res(2014, 7, 3)?, "Emancipation Day"), - ( - NaiveDate::from_ymd_res(2014, 10, 13)?, - "Columbus Day and Puerto Rico Friendship Day", - ), (NaiveDate::from_ymd_res(2014, 11, 1)?, "Liberty Day"), ( NaiveDate::from_ymd_res(2014, 12, 26)?, @@ -620,39 +334,20 @@ pub fn build( ), ], &mut map, - Country::US_VI, - "United States (Virgin Islands, U.S..)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Emancipation Day; 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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2015, 1, 6)?, "Three Kings Day"), - (NaiveDate::from_ymd_res(2015, 2, 16)?, "Presidents' Day"), (NaiveDate::from_ymd_res(2015, 3, 31)?, "Transfer Day"), (NaiveDate::from_ymd_res(2015, 4, 2)?, "Holy Thursday"), (NaiveDate::from_ymd_res(2015, 4, 3)?, "Good Friday"), (NaiveDate::from_ymd_res(2015, 4, 6)?, "Easter Monday"), - ( - NaiveDate::from_ymd_res(2015, 10, 12)?, - "Columbus Day and Puerto Rico Friendship Day", - ), (NaiveDate::from_ymd_res(2015, 11, 1)?, "Liberty Day"), ( NaiveDate::from_ymd_res(2015, 12, 26)?, @@ -660,81 +355,39 @@ pub fn build( ), ], &mut map, - Country::US_VI, - "United States (Virgin Islands, U.S..)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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); Christmas Second Day", - ), - ( - NaiveDate::from_ymd_res(2016, 1, 18)?, - "Martin Luther King Jr. Day", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2016, 1, 6)?, "Three Kings Day"), - (NaiveDate::from_ymd_res(2016, 2, 15)?, "Presidents' Day"), (NaiveDate::from_ymd_res(2016, 3, 31)?, "Transfer Day"), (NaiveDate::from_ymd_res(2016, 3, 24)?, "Holy Thursday"), (NaiveDate::from_ymd_res(2016, 3, 25)?, "Good Friday"), (NaiveDate::from_ymd_res(2016, 3, 28)?, "Easter Monday"), (NaiveDate::from_ymd_res(2016, 7, 3)?, "Emancipation Day"), - ( - NaiveDate::from_ymd_res(2016, 10, 10)?, - "Columbus Day and Puerto Rico Friendship Day", - ), (NaiveDate::from_ymd_res(2016, 11, 1)?, "Liberty Day"), ], &mut map, - Country::US_VI, - "United States (Virgin Islands, U.S..)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2017, 1, 6)?, "Three Kings Day"), - (NaiveDate::from_ymd_res(2017, 2, 20)?, "Presidents' Day"), (NaiveDate::from_ymd_res(2017, 3, 31)?, "Transfer Day"), (NaiveDate::from_ymd_res(2017, 4, 13)?, "Holy Thursday"), (NaiveDate::from_ymd_res(2017, 4, 14)?, "Good Friday"), (NaiveDate::from_ymd_res(2017, 4, 17)?, "Easter Monday"), (NaiveDate::from_ymd_res(2017, 7, 3)?, "Emancipation Day"), - ( - NaiveDate::from_ymd_res(2017, 10, 9)?, - "Columbus Day and Puerto Rico Friendship Day", - ), (NaiveDate::from_ymd_res(2017, 11, 1)?, "Liberty Day"), ( NaiveDate::from_ymd_res(2017, 12, 26)?, @@ -742,40 +395,21 @@ pub fn build( ), ], &mut map, - Country::US_VI, - "United States (Virgin Islands, U.S..)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2018, 1, 6)?, "Three Kings Day"), - (NaiveDate::from_ymd_res(2018, 2, 19)?, "Presidents' Day"), (NaiveDate::from_ymd_res(2018, 3, 31)?, "Transfer Day"), (NaiveDate::from_ymd_res(2018, 3, 29)?, "Holy Thursday"), (NaiveDate::from_ymd_res(2018, 3, 30)?, "Good Friday"), (NaiveDate::from_ymd_res(2018, 4, 2)?, "Easter Monday"), (NaiveDate::from_ymd_res(2018, 7, 3)?, "Emancipation Day"), - ( - NaiveDate::from_ymd_res(2018, 10, 8)?, - "Columbus Day and Puerto Rico Friendship Day", - ), (NaiveDate::from_ymd_res(2018, 11, 1)?, "Liberty Day"), ( NaiveDate::from_ymd_res(2018, 12, 26)?, @@ -783,36 +417,21 @@ pub fn build( ), ], &mut map, - Country::US_VI, - "United States (Virgin Islands, U.S..)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2019, 1, 6)?, "Three Kings Day"), - (NaiveDate::from_ymd_res(2019, 2, 18)?, "Presidents' Day"), (NaiveDate::from_ymd_res(2019, 3, 31)?, "Transfer Day"), (NaiveDate::from_ymd_res(2019, 4, 18)?, "Holy Thursday"), (NaiveDate::from_ymd_res(2019, 4, 19)?, "Good Friday"), (NaiveDate::from_ymd_res(2019, 4, 22)?, "Easter Monday"), (NaiveDate::from_ymd_res(2019, 7, 3)?, "Emancipation Day"), - ( - NaiveDate::from_ymd_res(2019, 10, 14)?, - "Columbus Day and Puerto Rico Friendship Day", - ), (NaiveDate::from_ymd_res(2019, 11, 1)?, "Liberty Day"), ( NaiveDate::from_ymd_res(2019, 12, 26)?, @@ -820,39 +439,20 @@ pub fn build( ), ], &mut map, - Country::US_VI, - "United States (Virgin Islands, U.S..)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Emancipation Day; 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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2020, 1, 6)?, "Three Kings Day"), - (NaiveDate::from_ymd_res(2020, 2, 17)?, "Presidents' Day"), (NaiveDate::from_ymd_res(2020, 3, 31)?, "Transfer Day"), (NaiveDate::from_ymd_res(2020, 4, 9)?, "Holy Thursday"), (NaiveDate::from_ymd_res(2020, 4, 10)?, "Good Friday"), (NaiveDate::from_ymd_res(2020, 4, 13)?, "Easter Monday"), - ( - NaiveDate::from_ymd_res(2020, 10, 12)?, - "Columbus Day and Puerto Rico Friendship Day", - ), (NaiveDate::from_ymd_res(2020, 11, 1)?, "Liberty Day"), ( NaiveDate::from_ymd_res(2020, 12, 26)?, @@ -860,56 +460,21 @@ pub fn build( ), ], &mut map, - Country::US_VI, - "United States (Virgin Islands, U.S..)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2021, 1, 6)?, "Three Kings Day"), - (NaiveDate::from_ymd_res(2021, 2, 15)?, "Presidents' Day"), (NaiveDate::from_ymd_res(2021, 3, 31)?, "Transfer Day"), (NaiveDate::from_ymd_res(2021, 4, 1)?, "Holy Thursday"), (NaiveDate::from_ymd_res(2021, 4, 2)?, "Good Friday"), (NaiveDate::from_ymd_res(2021, 4, 5)?, "Easter Monday"), (NaiveDate::from_ymd_res(2021, 7, 3)?, "Emancipation Day"), - ( - NaiveDate::from_ymd_res(2021, 10, 11)?, - "Columbus Day and Puerto Rico Friendship Day", - ), (NaiveDate::from_ymd_res(2021, 11, 1)?, "Liberty Day"), ( NaiveDate::from_ymd_res(2021, 12, 26)?, @@ -917,93 +482,39 @@ pub fn build( ), ], &mut map, - Country::US_VI, - "United States (Virgin Islands, U.S..)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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); Christmas Second Day", - ), - ( - NaiveDate::from_ymd_res(2022, 1, 17)?, - "Martin Luther King Jr. Day", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2022, 1, 6)?, "Three Kings Day"), - (NaiveDate::from_ymd_res(2022, 2, 21)?, "Presidents' Day"), (NaiveDate::from_ymd_res(2022, 3, 31)?, "Transfer Day"), (NaiveDate::from_ymd_res(2022, 4, 14)?, "Holy Thursday"), (NaiveDate::from_ymd_res(2022, 4, 15)?, "Good Friday"), (NaiveDate::from_ymd_res(2022, 4, 18)?, "Easter Monday"), (NaiveDate::from_ymd_res(2022, 7, 3)?, "Emancipation Day"), - ( - NaiveDate::from_ymd_res(2022, 10, 10)?, - "Columbus Day and Puerto Rico Friendship Day", - ), (NaiveDate::from_ymd_res(2022, 11, 1)?, "Liberty Day"), ], &mut map, - Country::US_VI, - "United States (Virgin Islands, U.S..)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2023, 1, 6)?, "Three Kings Day"), - (NaiveDate::from_ymd_res(2023, 2, 20)?, "Presidents' Day"), (NaiveDate::from_ymd_res(2023, 3, 31)?, "Transfer Day"), (NaiveDate::from_ymd_res(2023, 4, 6)?, "Holy Thursday"), (NaiveDate::from_ymd_res(2023, 4, 7)?, "Good Friday"), (NaiveDate::from_ymd_res(2023, 4, 10)?, "Easter Monday"), (NaiveDate::from_ymd_res(2023, 7, 3)?, "Emancipation Day"), - ( - NaiveDate::from_ymd_res(2023, 10, 9)?, - "Columbus Day and Puerto Rico Friendship Day", - ), (NaiveDate::from_ymd_res(2023, 11, 1)?, "Liberty Day"), ( NaiveDate::from_ymd_res(2023, 12, 26)?, @@ -1011,40 +522,21 @@ pub fn build( ), ], &mut map, - Country::US_VI, - "United States (Virgin Islands, U.S..)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2024, 1, 6)?, "Three Kings Day"), - (NaiveDate::from_ymd_res(2024, 2, 19)?, "Presidents' Day"), (NaiveDate::from_ymd_res(2024, 3, 31)?, "Transfer Day"), (NaiveDate::from_ymd_res(2024, 3, 28)?, "Holy Thursday"), (NaiveDate::from_ymd_res(2024, 3, 29)?, "Good Friday"), (NaiveDate::from_ymd_res(2024, 4, 1)?, "Easter Monday"), (NaiveDate::from_ymd_res(2024, 7, 3)?, "Emancipation Day"), - ( - NaiveDate::from_ymd_res(2024, 10, 14)?, - "Columbus Day and Puerto Rico Friendship Day", - ), (NaiveDate::from_ymd_res(2024, 11, 1)?, "Liberty Day"), ( NaiveDate::from_ymd_res(2024, 12, 26)?, @@ -1052,40 +544,21 @@ pub fn build( ), ], &mut map, - Country::US_VI, - "United States (Virgin Islands, U.S..)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2025, 1, 6)?, "Three Kings Day"), - (NaiveDate::from_ymd_res(2025, 2, 17)?, "Presidents' Day"), (NaiveDate::from_ymd_res(2025, 3, 31)?, "Transfer Day"), (NaiveDate::from_ymd_res(2025, 4, 17)?, "Holy Thursday"), (NaiveDate::from_ymd_res(2025, 4, 18)?, "Good Friday"), (NaiveDate::from_ymd_res(2025, 4, 21)?, "Easter Monday"), (NaiveDate::from_ymd_res(2025, 7, 3)?, "Emancipation Day"), - ( - NaiveDate::from_ymd_res(2025, 10, 13)?, - "Columbus Day and Puerto Rico Friendship Day", - ), (NaiveDate::from_ymd_res(2025, 11, 1)?, "Liberty Day"), ( NaiveDate::from_ymd_res(2025, 12, 26)?, @@ -1093,43 +566,20 @@ pub fn build( ), ], &mut map, - Country::US_VI, - "United States (Virgin Islands, U.S..)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Emancipation Day; 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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2026, 1, 6)?, "Three Kings Day"), - (NaiveDate::from_ymd_res(2026, 2, 16)?, "Presidents' Day"), (NaiveDate::from_ymd_res(2026, 3, 31)?, "Transfer Day"), (NaiveDate::from_ymd_res(2026, 4, 2)?, "Holy Thursday"), (NaiveDate::from_ymd_res(2026, 4, 3)?, "Good Friday"), (NaiveDate::from_ymd_res(2026, 4, 6)?, "Easter Monday"), - ( - NaiveDate::from_ymd_res(2026, 10, 12)?, - "Columbus Day and Puerto Rico Friendship Day", - ), (NaiveDate::from_ymd_res(2026, 11, 1)?, "Liberty Day"), ( NaiveDate::from_ymd_res(2026, 12, 26)?, @@ -1137,56 +587,21 @@ pub fn build( ), ], &mut map, - Country::US_VI, - "United States (Virgin Islands, U.S..)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2027, 1, 6)?, "Three Kings Day"), - (NaiveDate::from_ymd_res(2027, 2, 15)?, "Presidents' Day"), (NaiveDate::from_ymd_res(2027, 3, 31)?, "Transfer Day"), (NaiveDate::from_ymd_res(2027, 3, 25)?, "Holy Thursday"), (NaiveDate::from_ymd_res(2027, 3, 26)?, "Good Friday"), (NaiveDate::from_ymd_res(2027, 3, 29)?, "Easter Monday"), (NaiveDate::from_ymd_res(2027, 7, 3)?, "Emancipation Day"), - ( - NaiveDate::from_ymd_res(2027, 10, 11)?, - "Columbus Day and Puerto Rico Friendship Day", - ), (NaiveDate::from_ymd_res(2027, 11, 1)?, "Liberty Day"), ( NaiveDate::from_ymd_res(2027, 12, 26)?, @@ -1194,44 +609,21 @@ pub fn build( ), ], &mut map, - Country::US_VI, - "United States (Virgin Islands, U.S..)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2028, 1, 6)?, "Three Kings Day"), - (NaiveDate::from_ymd_res(2028, 2, 21)?, "Presidents' Day"), (NaiveDate::from_ymd_res(2028, 3, 31)?, "Transfer Day"), (NaiveDate::from_ymd_res(2028, 4, 13)?, "Holy Thursday"), (NaiveDate::from_ymd_res(2028, 4, 14)?, "Good Friday"), (NaiveDate::from_ymd_res(2028, 4, 17)?, "Easter Monday"), (NaiveDate::from_ymd_res(2028, 7, 3)?, "Emancipation Day"), - ( - NaiveDate::from_ymd_res(2028, 10, 9)?, - "Columbus Day and Puerto Rico Friendship Day", - ), (NaiveDate::from_ymd_res(2028, 11, 1)?, "Liberty Day"), ( NaiveDate::from_ymd_res(2028, 12, 26)?, @@ -1239,44 +631,21 @@ pub fn build( ), ], &mut map, - Country::US_VI, - "United States (Virgin Islands, U.S..)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2029, 1, 6)?, "Three Kings Day"), - (NaiveDate::from_ymd_res(2029, 2, 19)?, "Presidents' Day"), (NaiveDate::from_ymd_res(2029, 3, 31)?, "Transfer Day"), (NaiveDate::from_ymd_res(2029, 3, 29)?, "Holy Thursday"), (NaiveDate::from_ymd_res(2029, 3, 30)?, "Good Friday"), (NaiveDate::from_ymd_res(2029, 4, 2)?, "Easter Monday"), (NaiveDate::from_ymd_res(2029, 7, 3)?, "Emancipation Day"), - ( - NaiveDate::from_ymd_res(2029, 10, 8)?, - "Columbus Day and Puerto Rico Friendship Day", - ), (NaiveDate::from_ymd_res(2029, 11, 1)?, "Liberty Day"), ( NaiveDate::from_ymd_res(2029, 12, 26)?, @@ -1284,40 +653,21 @@ pub fn build( ), ], &mut map, - Country::US_VI, - "United States (Virgin Islands, U.S..)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2030, 1, 6)?, "Three Kings Day"), - (NaiveDate::from_ymd_res(2030, 2, 18)?, "Presidents' Day"), (NaiveDate::from_ymd_res(2030, 3, 31)?, "Transfer Day"), (NaiveDate::from_ymd_res(2030, 4, 18)?, "Holy Thursday"), (NaiveDate::from_ymd_res(2030, 4, 19)?, "Good Friday"), (NaiveDate::from_ymd_res(2030, 4, 22)?, "Easter Monday"), (NaiveDate::from_ymd_res(2030, 7, 3)?, "Emancipation Day"), - ( - NaiveDate::from_ymd_res(2030, 10, 14)?, - "Columbus Day and Puerto Rico Friendship Day", - ), (NaiveDate::from_ymd_res(2030, 11, 1)?, "Liberty Day"), ( NaiveDate::from_ymd_res(2030, 12, 26)?, @@ -1325,8 +675,8 @@ pub fn build( ), ], &mut map, - Country::US_VI, - "United States (Virgin Islands, U.S..)", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/us_vt.rs b/src/data/us_vt.rs index 92b01be..d70e9fe 100644 --- a/src/data/us_vt.rs +++ b/src/data/us_vt.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "United States (Vermont)"; +const COUNTY_CODE: Country = Country::US_VT; + /// Generate holiday map for United States (Vermont). #[allow( unused_mut, @@ -9,34 +12,16 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); - build_year( + let mut national_holidays = de::build(years)?; + + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2000, 3, 7)?, "Town Meeting Day"), ( NaiveDate::from_ymd_res(2000, 8, 16)?, @@ -44,33 +29,15 @@ pub fn build( ), ], &mut map, - Country::US_VT, - "United States (Vermont)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2001, 3, 6)?, "Town Meeting Day"), ( NaiveDate::from_ymd_res(2001, 8, 16)?, @@ -78,29 +45,15 @@ pub fn build( ), ], &mut map, - Country::US_VT, - "United States (Vermont)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2002, 3, 5)?, "Town Meeting Day"), ( NaiveDate::from_ymd_res(2002, 8, 16)?, @@ -108,29 +61,15 @@ pub fn build( ), ], &mut map, - Country::US_VT, - "United States (Vermont)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2003, 3, 4)?, "Town Meeting Day"), ( NaiveDate::from_ymd_res(2003, 8, 16)?, @@ -142,41 +81,15 @@ pub fn build( ), ], &mut map, - Country::US_VT, - "United States (Vermont)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2004, 3, 2)?, "Town Meeting Day"), ( NaiveDate::from_ymd_res(2004, 8, 16)?, @@ -184,33 +97,15 @@ pub fn build( ), ], &mut map, - Country::US_VT, - "United States (Vermont)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2005, 3, 1)?, "Town Meeting Day"), ( NaiveDate::from_ymd_res(2005, 8, 16)?, @@ -218,37 +113,15 @@ pub fn build( ), ], &mut map, - Country::US_VT, - "United States (Vermont)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2006, 3, 7)?, "Town Meeting Day"), ( NaiveDate::from_ymd_res(2006, 8, 16)?, @@ -256,33 +129,15 @@ pub fn build( ), ], &mut map, - Country::US_VT, - "United States (Vermont)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2007, 3, 6)?, "Town Meeting Day"), ( NaiveDate::from_ymd_res(2007, 8, 16)?, @@ -290,29 +145,15 @@ pub fn build( ), ], &mut map, - Country::US_VT, - "United States (Vermont)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2008, 3, 4)?, "Town Meeting Day"), ( NaiveDate::from_ymd_res(2008, 8, 16)?, @@ -324,33 +165,15 @@ pub fn build( ), ], &mut map, - Country::US_VT, - "United States (Vermont)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2009, 3, 3)?, "Town Meeting Day"), ( NaiveDate::from_ymd_res(2009, 8, 16)?, @@ -362,41 +185,15 @@ pub fn build( ), ], &mut map, - Country::US_VT, - "United States (Vermont)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2010, 3, 2)?, "Town Meeting Day"), ( NaiveDate::from_ymd_res(2010, 8, 16)?, @@ -404,33 +201,15 @@ pub fn build( ), ], &mut map, - Country::US_VT, - "United States (Vermont)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2011, 3, 1)?, "Town Meeting Day"), ( NaiveDate::from_ymd_res(2011, 8, 16)?, @@ -438,37 +217,15 @@ pub fn build( ), ], &mut map, - Country::US_VT, - "United States (Vermont)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2012, 3, 6)?, "Town Meeting Day"), ( NaiveDate::from_ymd_res(2012, 8, 16)?, @@ -476,29 +233,15 @@ pub fn build( ), ], &mut map, - Country::US_VT, - "United States (Vermont)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2013, 3, 5)?, "Town Meeting Day"), ( NaiveDate::from_ymd_res(2013, 8, 16)?, @@ -506,29 +249,15 @@ pub fn build( ), ], &mut map, - Country::US_VT, - "United States (Vermont)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2014, 3, 4)?, "Town Meeting Day"), ( NaiveDate::from_ymd_res(2014, 8, 16)?, @@ -540,33 +269,15 @@ pub fn build( ), ], &mut map, - Country::US_VT, - "United States (Vermont)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2015, 3, 3)?, "Town Meeting Day"), ( NaiveDate::from_ymd_res(2015, 8, 16)?, @@ -578,33 +289,15 @@ pub fn build( ), ], &mut map, - Country::US_VT, - "United States (Vermont)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2016, 3, 1)?, "Town Meeting Day"), ( NaiveDate::from_ymd_res(2016, 8, 16)?, @@ -612,37 +305,15 @@ pub fn build( ), ], &mut map, - Country::US_VT, - "United States (Vermont)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2017, 3, 7)?, "Town Meeting Day"), ( NaiveDate::from_ymd_res(2017, 8, 16)?, @@ -650,33 +321,15 @@ pub fn build( ), ], &mut map, - Country::US_VT, - "United States (Vermont)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2018, 3, 6)?, "Town Meeting Day"), ( NaiveDate::from_ymd_res(2018, 8, 16)?, @@ -684,29 +337,15 @@ pub fn build( ), ], &mut map, - Country::US_VT, - "United States (Vermont)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2019, 3, 5)?, "Town Meeting Day"), ( NaiveDate::from_ymd_res(2019, 8, 16)?, @@ -714,33 +353,15 @@ pub fn build( ), ], &mut map, - Country::US_VT, - "United States (Vermont)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2020, 3, 3)?, "Town Meeting Day"), ( NaiveDate::from_ymd_res(2020, 8, 16)?, @@ -752,49 +373,15 @@ pub fn build( ), ], &mut map, - Country::US_VT, - "United States (Vermont)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2021, 3, 2)?, "Town Meeting Day"), ( NaiveDate::from_ymd_res(2021, 8, 16)?, @@ -802,41 +389,15 @@ pub fn build( ), ], &mut map, - Country::US_VT, - "United States (Vermont)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2022, 3, 1)?, "Town Meeting Day"), ( NaiveDate::from_ymd_res(2022, 8, 16)?, @@ -844,41 +405,15 @@ pub fn build( ), ], &mut map, - Country::US_VT, - "United States (Vermont)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2023, 3, 7)?, "Town Meeting Day"), ( NaiveDate::from_ymd_res(2023, 8, 16)?, @@ -886,33 +421,15 @@ pub fn build( ), ], &mut map, - Country::US_VT, - "United States (Vermont)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2024, 3, 5)?, "Town Meeting Day"), ( NaiveDate::from_ymd_res(2024, 8, 16)?, @@ -920,33 +437,15 @@ pub fn build( ), ], &mut map, - Country::US_VT, - "United States (Vermont)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2025, 3, 4)?, "Town Meeting Day"), ( NaiveDate::from_ymd_res(2025, 8, 16)?, @@ -958,37 +457,15 @@ pub fn build( ), ], &mut map, - Country::US_VT, - "United States (Vermont)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2026, 3, 3)?, "Town Meeting Day"), ( NaiveDate::from_ymd_res(2026, 8, 16)?, @@ -1000,49 +477,15 @@ pub fn build( ), ], &mut map, - Country::US_VT, - "United States (Vermont)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2027, 3, 2)?, "Town Meeting Day"), ( NaiveDate::from_ymd_res(2027, 8, 16)?, @@ -1050,37 +493,15 @@ pub fn build( ), ], &mut map, - Country::US_VT, - "United States (Vermont)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2028, 3, 7)?, "Town Meeting Day"), ( NaiveDate::from_ymd_res(2028, 8, 16)?, @@ -1088,37 +509,15 @@ pub fn build( ), ], &mut map, - Country::US_VT, - "United States (Vermont)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2029, 3, 6)?, "Town Meeting Day"), ( NaiveDate::from_ymd_res(2029, 8, 16)?, @@ -1126,33 +525,15 @@ pub fn build( ), ], &mut map, - Country::US_VT, - "United States (Vermont)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2030, 3, 5)?, "Town Meeting Day"), ( NaiveDate::from_ymd_res(2030, 8, 16)?, @@ -1160,8 +541,8 @@ pub fn build( ), ], &mut map, - Country::US_VT, - "United States (Vermont)", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/us_wa.rs b/src/data/us_wa.rs index d3dc08e..89078cd 100644 --- a/src/data/us_wa.rs +++ b/src/data/us_wa.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "United States (Washington)"; +const COUNTY_CODE: Country = Country::US_WA; + /// Generate holiday map for United States (Washington). #[allow( unused_mut, @@ -9,972 +12,319 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); - build_year( + let mut national_holidays = de::build(years)?; + + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_WA, - "United States (Washington)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_WA, - "United States (Washington)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_WA, - "United States (Washington)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_WA, - "United States (Washington)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_WA, - "United States (Washington)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_WA, - "United States (Washington)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_WA, - "United States (Washington)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_WA, - "United States (Washington)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_WA, - "United States (Washington)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_WA, - "United States (Washington)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_WA, - "United States (Washington)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_WA, - "United States (Washington)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_WA, - "United States (Washington)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_WA, - "United States (Washington)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_WA, - "United States (Washington)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_WA, - "United States (Washington)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_WA, - "United States (Washington)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_WA, - "United States (Washington)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_WA, - "United States (Washington)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_WA, - "United States (Washington)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_WA, - "United States (Washington)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_WA, - "United States (Washington)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_WA, - "United States (Washington)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_WA, - "United States (Washington)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_WA, - "United States (Washington)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_WA, - "United States (Washington)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_WA, - "United States (Washington)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_WA, - "United States (Washington)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_WA, - "United States (Washington)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_WA, - "United States (Washington)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_WA, - "United States (Washington)", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/us_wi.rs b/src/data/us_wi.rs index f7a7e12..4db0a50 100644 --- a/src/data/us_wi.rs +++ b/src/data/us_wi.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "United States (Wisconsin)"; +const COUNTY_CODE: Country = Country::US_WI; + /// Generate holiday map for United States (Wisconsin). #[allow( unused_mut, @@ -9,438 +12,169 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); - build_year( + let mut national_holidays = de::build(years)?; + + build_subdivision_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, 2, 15)?, - "Susan B. Anthony Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2000, 2, 15)?, + "Susan B. Anthony Day", + )], &mut map, - Country::US_WI, - "United States (Wisconsin)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 15)?, - "Susan B. Anthony Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2001, 2, 15)?, + "Susan B. Anthony Day", + )], &mut map, - Country::US_WI, - "United States (Wisconsin)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 15)?, - "Susan B. Anthony Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2002, 2, 15)?, + "Susan B. Anthony Day", + )], &mut map, - Country::US_WI, - "United States (Wisconsin)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 15)?, - "Susan B. Anthony Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2003, 2, 15)?, + "Susan B. Anthony Day", + )], &mut map, - Country::US_WI, - "United States (Wisconsin)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 15)?, - "Susan B. Anthony Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2004, 2, 15)?, + "Susan B. Anthony Day", + )], &mut map, - Country::US_WI, - "United States (Wisconsin)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 15)?, - "Susan B. Anthony Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2005, 2, 15)?, + "Susan B. Anthony Day", + )], &mut map, - Country::US_WI, - "United States (Wisconsin)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 15)?, - "Susan B. Anthony Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2006, 2, 15)?, + "Susan B. Anthony Day", + )], &mut map, - Country::US_WI, - "United States (Wisconsin)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 15)?, - "Susan B. Anthony Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2007, 2, 15)?, + "Susan B. Anthony Day", + )], &mut map, - Country::US_WI, - "United States (Wisconsin)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 15)?, - "Susan B. Anthony Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2008, 2, 15)?, + "Susan B. Anthony Day", + )], &mut map, - Country::US_WI, - "United States (Wisconsin)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 15)?, - "Susan B. Anthony Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2009, 2, 15)?, + "Susan B. Anthony Day", + )], &mut map, - Country::US_WI, - "United States (Wisconsin)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Susan B. Anthony Day; Washington's Birthday", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_WI, - "United States (Wisconsin)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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, 2, 15)?, - "Susan B. Anthony Day", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2011, 2, 15)?, + "Susan B. Anthony Day", + )], &mut map, - Country::US_WI, - "United States (Wisconsin)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2012, 2, 15)?, "Susan B. Anthony Day", @@ -449,29 +183,15 @@ pub fn build( (NaiveDate::from_ymd_res(2012, 12, 31)?, "New Year's Eve"), ], &mut map, - Country::US_WI, - "United States (Wisconsin)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2013, 2, 15)?, "Susan B. Anthony Day", @@ -480,29 +200,15 @@ pub fn build( (NaiveDate::from_ymd_res(2013, 12, 31)?, "New Year's Eve"), ], &mut map, - Country::US_WI, - "United States (Wisconsin)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2014, 2, 15)?, "Susan B. Anthony Day", @@ -511,33 +217,15 @@ pub fn build( (NaiveDate::from_ymd_res(2014, 12, 31)?, "New Year's Eve"), ], &mut map, - Country::US_WI, - "United States (Wisconsin)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2015, 2, 15)?, "Susan B. Anthony Day", @@ -546,33 +234,15 @@ pub fn build( (NaiveDate::from_ymd_res(2015, 12, 31)?, "New Year's Eve"), ], &mut map, - Country::US_WI, - "United States (Wisconsin)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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)?, - "Susan B. Anthony Day; Washington's Birthday", - ), + &mut national_holidays, + [ (NaiveDate::from_ymd_res(2016, 12, 24)?, "Christmas Eve"), ( NaiveDate::from_ymd_res(2016, 12, 23)?, @@ -585,37 +255,15 @@ pub fn build( ), ], &mut map, - Country::US_WI, - "United States (Wisconsin)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2017, 2, 15)?, "Susan B. Anthony Day", @@ -628,33 +276,15 @@ pub fn build( (NaiveDate::from_ymd_res(2017, 12, 31)?, "New Year's Eve"), ], &mut map, - Country::US_WI, - "United States (Wisconsin)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2018, 2, 15)?, "Susan B. Anthony Day", @@ -663,29 +293,15 @@ pub fn build( (NaiveDate::from_ymd_res(2018, 12, 31)?, "New Year's Eve"), ], &mut map, - Country::US_WI, - "United States (Wisconsin)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2019, 2, 15)?, "Susan B. Anthony Day", @@ -694,33 +310,15 @@ pub fn build( (NaiveDate::from_ymd_res(2019, 12, 31)?, "New Year's Eve"), ], &mut map, - Country::US_WI, - "United States (Wisconsin)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2020, 2, 15)?, "Susan B. Anthony Day", @@ -729,90 +327,28 @@ pub fn build( (NaiveDate::from_ymd_res(2020, 12, 31)?, "New Year's Eve"), ], &mut map, - Country::US_WI, - "United States (Wisconsin)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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); New Year's Eve", - ), - (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); Christmas Eve", - ), - ( - NaiveDate::from_ymd_res(2021, 1, 18)?, - "Martin Luther King Jr. Day", - ), - ( - NaiveDate::from_ymd_res(2021, 2, 15)?, - "Susan B. Anthony Day; Washington's Birthday", - ), - ( - NaiveDate::from_ymd_res(2021, 12, 23)?, - "Christmas Eve (observed)", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2021, 12, 23)?, + "Christmas Eve (observed)", + )], &mut map, - Country::US_WI, - "United States (Wisconsin)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2022, 2, 15)?, "Susan B. Anthony Day", @@ -829,41 +365,15 @@ pub fn build( ), ], &mut map, - Country::US_WI, - "United States (Wisconsin)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2023, 2, 15)?, "Susan B. Anthony Day", @@ -876,33 +386,15 @@ pub fn build( (NaiveDate::from_ymd_res(2023, 12, 31)?, "New Year's Eve"), ], &mut map, - Country::US_WI, - "United States (Wisconsin)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2024, 2, 15)?, "Susan B. Anthony Day", @@ -911,33 +403,15 @@ pub fn build( (NaiveDate::from_ymd_res(2024, 12, 31)?, "New Year's Eve"), ], &mut map, - Country::US_WI, - "United States (Wisconsin)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2025, 2, 15)?, "Susan B. Anthony Day", @@ -946,37 +420,15 @@ pub fn build( (NaiveDate::from_ymd_res(2025, 12, 31)?, "New Year's Eve"), ], &mut map, - Country::US_WI, - "United States (Wisconsin)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2026, 2, 15)?, "Susan B. Anthony Day", @@ -985,86 +437,28 @@ pub fn build( (NaiveDate::from_ymd_res(2026, 12, 31)?, "New Year's Eve"), ], &mut map, - Country::US_WI, - "United States (Wisconsin)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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); New Year's Eve", - ), - (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); Christmas Eve", - ), - ( - NaiveDate::from_ymd_res(2027, 1, 18)?, - "Martin Luther King Jr. Day", - ), - ( - NaiveDate::from_ymd_res(2027, 2, 15)?, - "Susan B. Anthony Day; Washington's Birthday", - ), - ( - NaiveDate::from_ymd_res(2027, 12, 23)?, - "Christmas Eve (observed)", - ), - ], + &mut national_holidays, + [( + NaiveDate::from_ymd_res(2027, 12, 23)?, + "Christmas Eve (observed)", + )], &mut map, - Country::US_WI, - "United States (Wisconsin)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2028, 2, 15)?, "Susan B. Anthony Day", @@ -1077,37 +471,15 @@ pub fn build( (NaiveDate::from_ymd_res(2028, 12, 31)?, "New Year's Eve"), ], &mut map, - Country::US_WI, - "United States (Wisconsin)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2029, 2, 15)?, "Susan B. Anthony Day", @@ -1116,33 +488,15 @@ pub fn build( (NaiveDate::from_ymd_res(2029, 12, 31)?, "New Year's Eve"), ], &mut map, - Country::US_WI, - "United States (Wisconsin)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), + &mut national_holidays, + [ ( NaiveDate::from_ymd_res(2030, 2, 15)?, "Susan B. Anthony Day", @@ -1151,8 +505,8 @@ pub fn build( (NaiveDate::from_ymd_res(2030, 12, 31)?, "New Year's Eve"), ], &mut map, - Country::US_WI, - "United States (Wisconsin)", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/us_wv.rs b/src/data/us_wv.rs index 7f77346..61cc438 100644 --- a/src/data/us_wv.rs +++ b/src/data/us_wv.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "United States (West Virginia)"; +const COUNTY_CODE: Country = Country::US_WV; + /// Generate holiday map for United States (West Virginia). #[allow( unused_mut, @@ -9,35 +12,16 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); - build_year( + let mut national_holidays = de::build(years)?; + + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2000, 6, 20)?, "West Virginia Day"), ( NaiveDate::from_ymd_res(2000, 11, 24)?, @@ -45,34 +29,15 @@ pub fn build( ), ], &mut map, - Country::US_WV, - "United States (West Virginia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2001, 6, 20)?, "West Virginia Day"), ( NaiveDate::from_ymd_res(2001, 11, 23)?, @@ -80,30 +45,15 @@ pub fn build( ), ], &mut map, - Country::US_WV, - "United States (West Virginia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2002, 6, 20)?, "West Virginia Day"), ( NaiveDate::from_ymd_res(2002, 11, 29)?, @@ -111,30 +61,15 @@ pub fn build( ), ], &mut map, - Country::US_WV, - "United States (West Virginia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2003, 6, 20)?, "West Virginia Day"), ( NaiveDate::from_ymd_res(2003, 11, 28)?, @@ -142,42 +77,15 @@ pub fn build( ), ], &mut map, - Country::US_WV, - "United States (West Virginia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2004, 6, 20)?, "West Virginia Day"), ( NaiveDate::from_ymd_res(2004, 6, 21)?, @@ -189,34 +97,15 @@ pub fn build( ), ], &mut map, - Country::US_WV, - "United States (West Virginia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2005, 6, 20)?, "West Virginia Day"), ( NaiveDate::from_ymd_res(2005, 11, 25)?, @@ -224,38 +113,15 @@ pub fn build( ), ], &mut map, - Country::US_WV, - "United States (West Virginia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2006, 6, 20)?, "West Virginia Day"), ( NaiveDate::from_ymd_res(2006, 11, 24)?, @@ -263,34 +129,15 @@ pub fn build( ), ], &mut map, - Country::US_WV, - "United States (West Virginia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2007, 6, 20)?, "West Virginia Day"), ( NaiveDate::from_ymd_res(2007, 11, 23)?, @@ -298,30 +145,15 @@ pub fn build( ), ], &mut map, - Country::US_WV, - "United States (West Virginia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2008, 6, 20)?, "West Virginia Day"), (NaiveDate::from_ymd_res(2008, 11, 4)?, "Election Day"), ( @@ -330,34 +162,15 @@ pub fn build( ), ], &mut map, - Country::US_WV, - "United States (West Virginia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2009, 6, 20)?, "West Virginia Day"), ( NaiveDate::from_ymd_res(2009, 6, 19)?, @@ -369,42 +182,15 @@ pub fn build( ), ], &mut map, - Country::US_WV, - "United States (West Virginia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2010, 6, 20)?, "West Virginia Day"), ( NaiveDate::from_ymd_res(2010, 6, 21)?, @@ -417,34 +203,15 @@ pub fn build( ), ], &mut map, - Country::US_WV, - "United States (West Virginia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2011, 6, 20)?, "West Virginia Day"), ( NaiveDate::from_ymd_res(2011, 11, 25)?, @@ -452,38 +219,15 @@ pub fn build( ), ], &mut map, - Country::US_WV, - "United States (West Virginia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2012, 6, 20)?, "West Virginia Day"), (NaiveDate::from_ymd_res(2012, 11, 6)?, "Election Day"), ( @@ -492,30 +236,15 @@ pub fn build( ), ], &mut map, - Country::US_WV, - "United States (West Virginia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2013, 6, 20)?, "West Virginia Day"), ( NaiveDate::from_ymd_res(2013, 11, 29)?, @@ -523,30 +252,15 @@ pub fn build( ), ], &mut map, - Country::US_WV, - "United States (West Virginia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2014, 6, 20)?, "West Virginia Day"), (NaiveDate::from_ymd_res(2014, 11, 4)?, "Election Day"), ( @@ -555,34 +269,15 @@ pub fn build( ), ], &mut map, - Country::US_WV, - "United States (West Virginia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2015, 6, 20)?, "West Virginia Day"), ( NaiveDate::from_ymd_res(2015, 6, 19)?, @@ -594,34 +289,15 @@ pub fn build( ), ], &mut map, - Country::US_WV, - "United States (West Virginia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2016, 6, 20)?, "West Virginia Day"), (NaiveDate::from_ymd_res(2016, 11, 8)?, "Election Day"), ( @@ -630,38 +306,15 @@ pub fn build( ), ], &mut map, - Country::US_WV, - "United States (West Virginia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2017, 6, 20)?, "West Virginia Day"), ( NaiveDate::from_ymd_res(2017, 11, 24)?, @@ -669,34 +322,15 @@ pub fn build( ), ], &mut map, - Country::US_WV, - "United States (West Virginia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2018, 6, 20)?, "West Virginia Day"), (NaiveDate::from_ymd_res(2018, 11, 6)?, "Election Day"), ( @@ -705,30 +339,15 @@ pub fn build( ), ], &mut map, - Country::US_WV, - "United States (West Virginia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2019, 6, 20)?, "West Virginia Day"), ( NaiveDate::from_ymd_res(2019, 11, 29)?, @@ -736,34 +355,15 @@ pub fn build( ), ], &mut map, - Country::US_WV, - "United States (West Virginia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2020, 6, 20)?, "West Virginia Day"), ( NaiveDate::from_ymd_res(2020, 6, 19)?, @@ -776,50 +376,15 @@ pub fn build( ), ], &mut map, - Country::US_WV, - "United States (West Virginia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2021, 6, 20)?, "West Virginia Day"), ( NaiveDate::from_ymd_res(2021, 6, 21)?, @@ -831,42 +396,15 @@ pub fn build( ), ], &mut map, - Country::US_WV, - "United States (West Virginia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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); West Virginia Day", - ), - (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 national_holidays, + [ (NaiveDate::from_ymd_res(2022, 11, 8)?, "Election Day"), ( NaiveDate::from_ymd_res(2022, 11, 25)?, @@ -874,42 +412,15 @@ pub fn build( ), ], &mut map, - Country::US_WV, - "United States (West Virginia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2023, 6, 20)?, "West Virginia Day"), ( NaiveDate::from_ymd_res(2023, 11, 24)?, @@ -917,34 +428,15 @@ pub fn build( ), ], &mut map, - Country::US_WV, - "United States (West Virginia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2024, 6, 20)?, "West Virginia Day"), (NaiveDate::from_ymd_res(2024, 11, 5)?, "Election Day"), ( @@ -953,34 +445,15 @@ pub fn build( ), ], &mut map, - Country::US_WV, - "United States (West Virginia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2025, 6, 20)?, "West Virginia Day"), ( NaiveDate::from_ymd_res(2025, 11, 28)?, @@ -988,38 +461,15 @@ pub fn build( ), ], &mut map, - Country::US_WV, - "United States (West Virginia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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; West Virginia Day (observed)", - ), - (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 national_holidays, + [ (NaiveDate::from_ymd_res(2026, 6, 20)?, "West Virginia Day"), (NaiveDate::from_ymd_res(2026, 11, 3)?, "Election Day"), ( @@ -1028,50 +478,15 @@ pub fn build( ), ], &mut map, - Country::US_WV, - "United States (West Virginia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2027, 6, 20)?, "West Virginia Day"), ( NaiveDate::from_ymd_res(2027, 6, 21)?, @@ -1083,38 +498,15 @@ pub fn build( ), ], &mut map, - Country::US_WV, - "United States (West Virginia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2028, 6, 20)?, "West Virginia Day"), (NaiveDate::from_ymd_res(2028, 11, 7)?, "Election Day"), ( @@ -1123,38 +515,15 @@ pub fn build( ), ], &mut map, - Country::US_WV, - "United States (West Virginia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2029, 6, 20)?, "West Virginia Day"), ( NaiveDate::from_ymd_res(2029, 11, 23)?, @@ -1162,34 +531,15 @@ pub fn build( ), ], &mut map, - Country::US_WV, - "United States (West Virginia)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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 national_holidays, + [ (NaiveDate::from_ymd_res(2030, 6, 20)?, "West Virginia Day"), (NaiveDate::from_ymd_res(2030, 11, 5)?, "Election Day"), ( @@ -1198,8 +548,8 @@ pub fn build( ), ], &mut map, - Country::US_WV, - "United States (West Virginia)", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/us_wy.rs b/src/data/us_wy.rs index b0a65cc..621effe 100644 --- a/src/data/us_wy.rs +++ b/src/data/us_wy.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "United States (Wyoming)"; +const COUNTY_CODE: Country = Country::US_WY; + /// Generate holiday map for United States (Wyoming). #[allow( unused_mut, @@ -9,972 +12,319 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); - build_year( + let mut national_holidays = de::build(years)?; + + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_WY, - "United States (Wyoming)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_WY, - "United States (Wyoming)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_WY, - "United States (Wyoming)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_WY, - "United States (Wyoming)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_WY, - "United States (Wyoming)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_WY, - "United States (Wyoming)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_WY, - "United States (Wyoming)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_WY, - "United States (Wyoming)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_WY, - "United States (Wyoming)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_WY, - "United States (Wyoming)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_WY, - "United States (Wyoming)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_WY, - "United States (Wyoming)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_WY, - "United States (Wyoming)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_WY, - "United States (Wyoming)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_WY, - "United States (Wyoming)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_WY, - "United States (Wyoming)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_WY, - "United States (Wyoming)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_WY, - "United States (Wyoming)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_WY, - "United States (Wyoming)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_WY, - "United States (Wyoming)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_WY, - "United States (Wyoming)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_WY, - "United States (Wyoming)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_WY, - "United States (Wyoming)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_WY, - "United States (Wyoming)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_WY, - "United States (Wyoming)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_WY, - "United States (Wyoming)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_WY, - "United States (Wyoming)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_WY, - "United States (Wyoming)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_WY, - "United States (Wyoming)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_WY, - "United States (Wyoming)", + COUNTY_CODE, + COUNTY_NAME, ); - build_year( + build_subdivision_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", - ), - ], + &mut national_holidays, + [], &mut map, - Country::US_WY, - "United States (Wyoming)", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/uy.rs b/src/data/uy.rs index 03ed4be..40e3a61 100644 --- a/src/data/uy.rs +++ b/src/data/uy.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Uruguay"; +const COUNTY_CODE: Country = Country::UY; + /// Generate holiday map for Uruguay. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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)?, @@ -38,14 +39,14 @@ pub fn build( ), ], &mut map, - Country::UY, - "Uruguay", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2001, - vec![ + [ (NaiveDate::from_ymd_res(2001, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2001, 5, 1)?, @@ -62,14 +63,14 @@ pub fn build( (NaiveDate::from_ymd_res(2001, 12, 25)?, "Día de la Familia"), ], &mut map, - Country::UY, - "Uruguay", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2002, - vec![ + [ (NaiveDate::from_ymd_res(2002, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2002, 5, 1)?, @@ -86,14 +87,14 @@ pub fn build( (NaiveDate::from_ymd_res(2002, 12, 25)?, "Día de la Familia"), ], &mut map, - Country::UY, - "Uruguay", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2003, - vec![ + [ (NaiveDate::from_ymd_res(2003, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2003, 5, 1)?, @@ -110,14 +111,14 @@ pub fn build( (NaiveDate::from_ymd_res(2003, 12, 25)?, "Día de la Familia"), ], &mut map, - Country::UY, - "Uruguay", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2004, - vec![ + [ (NaiveDate::from_ymd_res(2004, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2004, 5, 1)?, @@ -134,14 +135,14 @@ pub fn build( (NaiveDate::from_ymd_res(2004, 12, 25)?, "Día de la Familia"), ], &mut map, - Country::UY, - "Uruguay", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2005, - vec![ + [ (NaiveDate::from_ymd_res(2005, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2005, 5, 1)?, @@ -162,14 +163,14 @@ pub fn build( ), ], &mut map, - Country::UY, - "Uruguay", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2006, - vec![ + [ (NaiveDate::from_ymd_res(2006, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2006, 5, 1)?, @@ -186,14 +187,14 @@ pub fn build( (NaiveDate::from_ymd_res(2006, 12, 25)?, "Día de la Familia"), ], &mut map, - Country::UY, - "Uruguay", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2007, - vec![ + [ (NaiveDate::from_ymd_res(2007, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2007, 5, 1)?, @@ -210,14 +211,14 @@ pub fn build( (NaiveDate::from_ymd_res(2007, 12, 25)?, "Día de la Familia"), ], &mut map, - Country::UY, - "Uruguay", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2008, - vec![ + [ (NaiveDate::from_ymd_res(2008, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2008, 5, 1)?, @@ -234,14 +235,14 @@ pub fn build( (NaiveDate::from_ymd_res(2008, 12, 25)?, "Día de la Familia"), ], &mut map, - Country::UY, - "Uruguay", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2009, - vec![ + [ (NaiveDate::from_ymd_res(2009, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2009, 5, 1)?, @@ -258,14 +259,14 @@ pub fn build( (NaiveDate::from_ymd_res(2009, 12, 25)?, "Día de la Familia"), ], &mut map, - Country::UY, - "Uruguay", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2010, - vec![ + [ (NaiveDate::from_ymd_res(2010, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2010, 5, 1)?, @@ -286,14 +287,14 @@ pub fn build( ), ], &mut map, - Country::UY, - "Uruguay", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2011, - vec![ + [ (NaiveDate::from_ymd_res(2011, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2011, 5, 1)?, @@ -310,14 +311,14 @@ pub fn build( (NaiveDate::from_ymd_res(2011, 12, 25)?, "Día de la Familia"), ], &mut map, - Country::UY, - "Uruguay", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2012, - vec![ + [ (NaiveDate::from_ymd_res(2012, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2012, 5, 1)?, @@ -334,14 +335,14 @@ pub fn build( (NaiveDate::from_ymd_res(2012, 12, 25)?, "Día de la Familia"), ], &mut map, - Country::UY, - "Uruguay", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2013, - vec![ + [ (NaiveDate::from_ymd_res(2013, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2013, 5, 1)?, @@ -358,14 +359,14 @@ pub fn build( (NaiveDate::from_ymd_res(2013, 12, 25)?, "Día de la Familia"), ], &mut map, - Country::UY, - "Uruguay", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2014, - vec![ + [ (NaiveDate::from_ymd_res(2014, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2014, 5, 1)?, @@ -382,14 +383,14 @@ pub fn build( (NaiveDate::from_ymd_res(2014, 12, 25)?, "Día de la Familia"), ], &mut map, - Country::UY, - "Uruguay", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2015, - vec![ + [ (NaiveDate::from_ymd_res(2015, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2015, 5, 1)?, @@ -410,14 +411,14 @@ pub fn build( ), ], &mut map, - Country::UY, - "Uruguay", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2016, - vec![ + [ (NaiveDate::from_ymd_res(2016, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2016, 5, 1)?, @@ -434,14 +435,14 @@ pub fn build( (NaiveDate::from_ymd_res(2016, 12, 25)?, "Día de la Familia"), ], &mut map, - Country::UY, - "Uruguay", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2017, - vec![ + [ (NaiveDate::from_ymd_res(2017, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2017, 5, 1)?, @@ -458,14 +459,14 @@ pub fn build( (NaiveDate::from_ymd_res(2017, 12, 25)?, "Día de la Familia"), ], &mut map, - Country::UY, - "Uruguay", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2018, - vec![ + [ (NaiveDate::from_ymd_res(2018, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2018, 5, 1)?, @@ -482,14 +483,14 @@ pub fn build( (NaiveDate::from_ymd_res(2018, 12, 25)?, "Día de la Familia"), ], &mut map, - Country::UY, - "Uruguay", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2019, - vec![ + [ (NaiveDate::from_ymd_res(2019, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2019, 5, 1)?, @@ -506,14 +507,14 @@ pub fn build( (NaiveDate::from_ymd_res(2019, 12, 25)?, "Día de la Familia"), ], &mut map, - Country::UY, - "Uruguay", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2020, - vec![ + [ (NaiveDate::from_ymd_res(2020, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2020, 5, 1)?, @@ -534,14 +535,14 @@ pub fn build( ), ], &mut map, - Country::UY, - "Uruguay", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2021, - vec![ + [ (NaiveDate::from_ymd_res(2021, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2021, 5, 1)?, @@ -558,14 +559,14 @@ pub fn build( (NaiveDate::from_ymd_res(2021, 12, 25)?, "Día de la Familia"), ], &mut map, - Country::UY, - "Uruguay", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2022, - vec![ + [ (NaiveDate::from_ymd_res(2022, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2022, 5, 1)?, @@ -582,14 +583,14 @@ pub fn build( (NaiveDate::from_ymd_res(2022, 12, 25)?, "Día de la Familia"), ], &mut map, - Country::UY, - "Uruguay", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2023, - vec![ + [ (NaiveDate::from_ymd_res(2023, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2023, 5, 1)?, @@ -606,14 +607,14 @@ pub fn build( (NaiveDate::from_ymd_res(2023, 12, 25)?, "Día de la Familia"), ], &mut map, - Country::UY, - "Uruguay", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2024, - vec![ + [ (NaiveDate::from_ymd_res(2024, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2024, 5, 1)?, @@ -630,14 +631,14 @@ pub fn build( (NaiveDate::from_ymd_res(2024, 12, 25)?, "Día de la Familia"), ], &mut map, - Country::UY, - "Uruguay", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2025, - vec![ + [ (NaiveDate::from_ymd_res(2025, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2025, 5, 1)?, @@ -654,14 +655,14 @@ pub fn build( (NaiveDate::from_ymd_res(2025, 12, 25)?, "Día de la Familia"), ], &mut map, - Country::UY, - "Uruguay", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2026, - vec![ + [ (NaiveDate::from_ymd_res(2026, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2026, 5, 1)?, @@ -678,14 +679,14 @@ pub fn build( (NaiveDate::from_ymd_res(2026, 12, 25)?, "Día de la Familia"), ], &mut map, - Country::UY, - "Uruguay", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2027, - vec![ + [ (NaiveDate::from_ymd_res(2027, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2027, 5, 1)?, @@ -702,14 +703,14 @@ pub fn build( (NaiveDate::from_ymd_res(2027, 12, 25)?, "Día de la Familia"), ], &mut map, - Country::UY, - "Uruguay", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2028, - vec![ + [ (NaiveDate::from_ymd_res(2028, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2028, 5, 1)?, @@ -726,14 +727,14 @@ pub fn build( (NaiveDate::from_ymd_res(2028, 12, 25)?, "Día de la Familia"), ], &mut map, - Country::UY, - "Uruguay", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2029, - vec![ + [ (NaiveDate::from_ymd_res(2029, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2029, 5, 1)?, @@ -750,14 +751,14 @@ pub fn build( (NaiveDate::from_ymd_res(2029, 12, 25)?, "Día de la Familia"), ], &mut map, - Country::UY, - "Uruguay", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2030, - vec![ + [ (NaiveDate::from_ymd_res(2030, 1, 1)?, "Año Nuevo"), ( NaiveDate::from_ymd_res(2030, 5, 1)?, @@ -774,8 +775,8 @@ pub fn build( (NaiveDate::from_ymd_res(2030, 12, 25)?, "Día de la Familia"), ], &mut map, - Country::UY, - "Uruguay", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/uz.rs b/src/data/uz.rs index 4dbede8..c152f37 100644 --- a/src/data/uz.rs +++ b/src/data/uz.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Uzbekistan"; +const COUNTY_CODE: Country = Country::UZ; + /// Generate holiday map for Uzbekistan. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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"), @@ -48,14 +49,14 @@ pub fn build( ), ], &mut map, - Country::UZ, - "Uzbekistan", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -82,14 +83,14 @@ pub fn build( ), ], &mut map, - Country::UZ, - "Uzbekistan", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -116,14 +117,14 @@ pub fn build( ), ], &mut map, - Country::UZ, - "Uzbekistan", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -150,14 +151,14 @@ pub fn build( ), ], &mut map, - Country::UZ, - "Uzbekistan", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -184,14 +185,14 @@ pub fn build( ), ], &mut map, - Country::UZ, - "Uzbekistan", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -218,14 +219,14 @@ pub fn build( ), ], &mut map, - Country::UZ, - "Uzbekistan", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -247,14 +248,14 @@ pub fn build( (NaiveDate::from_ymd_res(2006, 12, 30)?, "Qurbon hayit"), ], &mut map, - Country::UZ, - "Uzbekistan", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -275,14 +276,14 @@ pub fn build( (NaiveDate::from_ymd_res(2007, 12, 19)?, "Qurbon hayit"), ], &mut map, - Country::UZ, - "Uzbekistan", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -301,14 +302,14 @@ pub fn build( ), ], &mut map, - Country::UZ, - "Uzbekistan", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -329,14 +330,14 @@ pub fn build( (NaiveDate::from_ymd_res(2009, 11, 27)?, "Qurbon hayit"), ], &mut map, - Country::UZ, - "Uzbekistan", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -357,14 +358,14 @@ pub fn build( (NaiveDate::from_ymd_res(2010, 11, 16)?, "Qurbon hayit"), ], &mut map, - Country::UZ, - "Uzbekistan", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -385,14 +386,14 @@ pub fn build( (NaiveDate::from_ymd_res(2011, 11, 6)?, "Qurbon hayit"), ], &mut map, - Country::UZ, - "Uzbekistan", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -413,14 +414,14 @@ pub fn build( (NaiveDate::from_ymd_res(2012, 10, 26)?, "Qurbon hayit"), ], &mut map, - Country::UZ, - "Uzbekistan", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -441,14 +442,14 @@ pub fn build( (NaiveDate::from_ymd_res(2013, 10, 15)?, "Qurbon hayit"), ], &mut map, - Country::UZ, - "Uzbekistan", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -469,14 +470,14 @@ pub fn build( (NaiveDate::from_ymd_res(2014, 10, 4)?, "Qurbon hayit"), ], &mut map, - Country::UZ, - "Uzbekistan", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -497,14 +498,14 @@ pub fn build( (NaiveDate::from_ymd_res(2015, 9, 24)?, "Qurbon hayit"), ], &mut map, - Country::UZ, - "Uzbekistan", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -525,14 +526,14 @@ pub fn build( (NaiveDate::from_ymd_res(2016, 9, 12)?, "Qurbon hayit"), ], &mut map, - Country::UZ, - "Uzbekistan", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -555,14 +556,14 @@ pub fn build( (NaiveDate::from_ymd_res(2017, 6, 26)?, "Ro‘za hayit"), ], &mut map, - Country::UZ, - "Uzbekistan", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -627,14 +628,14 @@ pub fn build( ), ], &mut map, - Country::UZ, - "Uzbekistan", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -683,14 +684,14 @@ pub fn build( ), ], &mut map, - Country::UZ, - "Uzbekistan", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -723,14 +724,14 @@ pub fn build( ), ], &mut map, - Country::UZ, - "Uzbekistan", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -779,14 +780,14 @@ pub fn build( ), ], &mut map, - Country::UZ, - "Uzbekistan", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -843,14 +844,14 @@ pub fn build( ), ], &mut map, - Country::UZ, - "Uzbekistan", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -903,14 +904,14 @@ pub fn build( ), ], &mut map, - Country::UZ, - "Uzbekistan", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -978,14 +979,14 @@ pub fn build( ), ], &mut map, - Country::UZ, - "Uzbekistan", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1020,14 +1021,14 @@ pub fn build( ), ], &mut map, - Country::UZ, - "Uzbekistan", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1066,14 +1067,14 @@ pub fn build( ), ], &mut map, - Country::UZ, - "Uzbekistan", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1112,14 +1113,14 @@ pub fn build( ), ], &mut map, - Country::UZ, - "Uzbekistan", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1158,14 +1159,14 @@ pub fn build( ), ], &mut map, - Country::UZ, - "Uzbekistan", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1200,14 +1201,14 @@ pub fn build( ), ], &mut map, - Country::UZ, - "Uzbekistan", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1246,8 +1247,8 @@ pub fn build( ), ], &mut map, - Country::UZ, - "Uzbekistan", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/ve.rs b/src/data/ve.rs index d098be0..9f7831b 100644 --- a/src/data/ve.rs +++ b/src/data/ve.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Venezuela"; +const COUNTY_CODE: Country = Country::VE; + /// Generate holiday map for Venezuela. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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"), @@ -49,14 +50,14 @@ pub fn build( ), ], &mut map, - Country::VE, - "Venezuela", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -88,14 +89,14 @@ pub fn build( ), ], &mut map, - Country::VE, - "Venezuela", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -130,14 +131,14 @@ pub fn build( ), ], &mut map, - Country::VE, - "Venezuela", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -172,14 +173,14 @@ pub fn build( ), ], &mut map, - Country::VE, - "Venezuela", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -214,14 +215,14 @@ pub fn build( ), ], &mut map, - Country::VE, - "Venezuela", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -256,14 +257,14 @@ pub fn build( ), ], &mut map, - Country::VE, - "Venezuela", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -298,14 +299,14 @@ pub fn build( ), ], &mut map, - Country::VE, - "Venezuela", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -340,14 +341,14 @@ pub fn build( ), ], &mut map, - Country::VE, - "Venezuela", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -382,14 +383,14 @@ pub fn build( ), ], &mut map, - Country::VE, - "Venezuela", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -424,14 +425,14 @@ pub fn build( ), ], &mut map, - Country::VE, - "Venezuela", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -466,14 +467,14 @@ pub fn build( ), ], &mut map, - Country::VE, - "Venezuela", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -508,14 +509,14 @@ pub fn build( ), ], &mut map, - Country::VE, - "Venezuela", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -550,14 +551,14 @@ pub fn build( ), ], &mut map, - Country::VE, - "Venezuela", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -592,14 +593,14 @@ pub fn build( ), ], &mut map, - Country::VE, - "Venezuela", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -634,14 +635,14 @@ pub fn build( ), ], &mut map, - Country::VE, - "Venezuela", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -676,14 +677,14 @@ pub fn build( ), ], &mut map, - Country::VE, - "Venezuela", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -718,14 +719,14 @@ pub fn build( ), ], &mut map, - Country::VE, - "Venezuela", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -760,14 +761,14 @@ pub fn build( ), ], &mut map, - Country::VE, - "Venezuela", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -802,14 +803,14 @@ pub fn build( ), ], &mut map, - Country::VE, - "Venezuela", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -843,14 +844,14 @@ pub fn build( ), ], &mut map, - Country::VE, - "Venezuela", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -885,14 +886,14 @@ pub fn build( ), ], &mut map, - Country::VE, - "Venezuela", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -927,14 +928,14 @@ pub fn build( ), ], &mut map, - Country::VE, - "Venezuela", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -969,14 +970,14 @@ pub fn build( ), ], &mut map, - Country::VE, - "Venezuela", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1011,14 +1012,14 @@ pub fn build( ), ], &mut map, - Country::VE, - "Venezuela", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1053,14 +1054,14 @@ pub fn build( ), ], &mut map, - Country::VE, - "Venezuela", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1095,14 +1096,14 @@ pub fn build( ), ], &mut map, - Country::VE, - "Venezuela", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1137,14 +1138,14 @@ pub fn build( ), ], &mut map, - Country::VE, - "Venezuela", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1179,14 +1180,14 @@ pub fn build( ), ], &mut map, - Country::VE, - "Venezuela", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1221,14 +1222,14 @@ pub fn build( ), ], &mut map, - Country::VE, - "Venezuela", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1263,14 +1264,14 @@ pub fn build( ), ], &mut map, - Country::VE, - "Venezuela", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1304,8 +1305,8 @@ pub fn build( ), ], &mut map, - Country::VE, - "Venezuela", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/vn.rs b/src/data/vn.rs index d6b84aa..1aaa293 100644 --- a/src/data/vn.rs +++ b/src/data/vn.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Vietnam"; +const COUNTY_CODE: Country = Country::VN; + /// Generate holiday map for Vietnam. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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", @@ -66,14 +67,14 @@ pub fn build( ), ], &mut map, - Country::VN, - "Vietnam", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2001, - vec![ + [ ( NaiveDate::from_ymd_res(2001, 1, 1)?, "International New Year's Day", @@ -114,14 +115,14 @@ pub fn build( ), ], &mut map, - Country::VN, - "Vietnam", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2002, - vec![ + [ ( NaiveDate::from_ymd_res(2002, 1, 1)?, "International New Year's Day", @@ -158,14 +159,14 @@ pub fn build( (NaiveDate::from_ymd_res(2002, 9, 2)?, "Independence Day"), ], &mut map, - Country::VN, - "Vietnam", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2003, - vec![ + [ ( NaiveDate::from_ymd_res(2003, 1, 1)?, "International New Year's Day", @@ -202,14 +203,14 @@ pub fn build( (NaiveDate::from_ymd_res(2003, 9, 2)?, "Independence Day"), ], &mut map, - Country::VN, - "Vietnam", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2004, - vec![ + [ ( NaiveDate::from_ymd_res(2004, 1, 1)?, "International New Year's Day", @@ -250,14 +251,14 @@ pub fn build( ), ], &mut map, - Country::VN, - "Vietnam", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2005, - vec![ + [ ( NaiveDate::from_ymd_res(2005, 1, 1)?, "International New Year's Day", @@ -306,14 +307,14 @@ pub fn build( ), ], &mut map, - Country::VN, - "Vietnam", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2006, - vec![ + [ ( NaiveDate::from_ymd_res(2006, 1, 1)?, "International New Year's Day", @@ -362,14 +363,14 @@ pub fn build( ), ], &mut map, - Country::VN, - "Vietnam", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2007, - vec![ + [ ( NaiveDate::from_ymd_res(2007, 1, 1)?, "International New Year's Day", @@ -414,14 +415,14 @@ pub fn build( ), ], &mut map, - Country::VN, - "Vietnam", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2008, - vec![ + [ ( NaiveDate::from_ymd_res(2008, 1, 1)?, "International New Year's Day", @@ -462,14 +463,14 @@ pub fn build( (NaiveDate::from_ymd_res(2008, 9, 2)?, "Independence Day"), ], &mut map, - Country::VN, - "Vietnam", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2009, - vec![ + [ ( NaiveDate::from_ymd_res(2009, 1, 1)?, "International New Year's Day", @@ -514,14 +515,14 @@ pub fn build( ), ], &mut map, - Country::VN, - "Vietnam", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2010, - vec![ + [ ( NaiveDate::from_ymd_res(2010, 1, 1)?, "International New Year's Day", @@ -566,14 +567,14 @@ pub fn build( ), ], &mut map, - Country::VN, - "Vietnam", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2011, - vec![ + [ ( NaiveDate::from_ymd_res(2011, 1, 1)?, "International New Year's Day", @@ -626,14 +627,14 @@ pub fn build( ), ], &mut map, - Country::VN, - "Vietnam", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2012, - vec![ + [ ( NaiveDate::from_ymd_res(2012, 1, 1)?, "International New Year's Day", @@ -686,14 +687,14 @@ pub fn build( ), ], &mut map, - Country::VN, - "Vietnam", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2013, - vec![ + [ ( NaiveDate::from_ymd_res(2013, 1, 1)?, "International New Year's Day", @@ -734,14 +735,14 @@ pub fn build( (NaiveDate::from_ymd_res(2013, 9, 2)?, "Independence Day"), ], &mut map, - Country::VN, - "Vietnam", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2014, - vec![ + [ ( NaiveDate::from_ymd_res(2014, 1, 1)?, "International New Year's Day", @@ -782,14 +783,14 @@ pub fn build( (NaiveDate::from_ymd_res(2014, 9, 2)?, "Independence Day"), ], &mut map, - Country::VN, - "Vietnam", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2015, - vec![ + [ ( NaiveDate::from_ymd_res(2015, 1, 1)?, "International New Year's Day", @@ -830,14 +831,14 @@ pub fn build( (NaiveDate::from_ymd_res(2015, 9, 2)?, "Independence Day"), ], &mut map, - Country::VN, - "Vietnam", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2016, - vec![ + [ ( NaiveDate::from_ymd_res(2016, 1, 1)?, "International New Year's Day", @@ -890,14 +891,14 @@ pub fn build( ), ], &mut map, - Country::VN, - "Vietnam", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2017, - vec![ + [ ( NaiveDate::from_ymd_res(2017, 1, 1)?, "International New Year's Day", @@ -950,14 +951,14 @@ pub fn build( ), ], &mut map, - Country::VN, - "Vietnam", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2018, - vec![ + [ ( NaiveDate::from_ymd_res(2018, 1, 1)?, "International New Year's Day", @@ -1002,14 +1003,14 @@ pub fn build( ), ], &mut map, - Country::VN, - "Vietnam", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2019, - vec![ + [ ( NaiveDate::from_ymd_res(2019, 1, 1)?, "International New Year's Day", @@ -1054,14 +1055,14 @@ pub fn build( ), ], &mut map, - Country::VN, - "Vietnam", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2020, - vec![ + [ ( NaiveDate::from_ymd_res(2020, 1, 1)?, "International New Year's Day", @@ -1102,14 +1103,14 @@ pub fn build( (NaiveDate::from_ymd_res(2020, 9, 2)?, "Independence Day"), ], &mut map, - Country::VN, - "Vietnam", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2021, - vec![ + [ ( NaiveDate::from_ymd_res(2021, 1, 1)?, "International New Year's Day", @@ -1154,14 +1155,14 @@ pub fn build( ), ], &mut map, - Country::VN, - "Vietnam", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2022, - vec![ + [ ( NaiveDate::from_ymd_res(2022, 1, 1)?, "International New Year's Day", @@ -1218,14 +1219,14 @@ pub fn build( ), ], &mut map, - Country::VN, - "Vietnam", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2023, - vec![ + [ ( NaiveDate::from_ymd_res(2023, 1, 1)?, "International New Year's Day", @@ -1282,14 +1283,14 @@ pub fn build( ), ], &mut map, - Country::VN, - "Vietnam", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2024, - vec![ + [ ( NaiveDate::from_ymd_res(2024, 1, 1)?, "International New Year's Day", @@ -1330,14 +1331,14 @@ pub fn build( (NaiveDate::from_ymd_res(2024, 9, 2)?, "Independence Day"), ], &mut map, - Country::VN, - "Vietnam", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2025, - vec![ + [ ( NaiveDate::from_ymd_res(2025, 1, 1)?, "International New Year's Day", @@ -1378,14 +1379,14 @@ pub fn build( (NaiveDate::from_ymd_res(2025, 9, 2)?, "Independence Day"), ], &mut map, - Country::VN, - "Vietnam", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2026, - vec![ + [ ( NaiveDate::from_ymd_res(2026, 1, 1)?, "International New Year's Day", @@ -1430,14 +1431,14 @@ pub fn build( ), ], &mut map, - Country::VN, - "Vietnam", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2027, - vec![ + [ ( NaiveDate::from_ymd_res(2027, 1, 1)?, "International New Year's Day", @@ -1482,14 +1483,14 @@ pub fn build( ), ], &mut map, - Country::VN, - "Vietnam", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2028, - vec![ + [ ( NaiveDate::from_ymd_res(2028, 1, 1)?, "International New Year's Day", @@ -1542,14 +1543,14 @@ pub fn build( ), ], &mut map, - Country::VN, - "Vietnam", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2029, - vec![ + [ ( NaiveDate::from_ymd_res(2029, 1, 1)?, "International New Year's Day", @@ -1594,14 +1595,14 @@ pub fn build( ), ], &mut map, - Country::VN, - "Vietnam", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2030, - vec![ + [ ( NaiveDate::from_ymd_res(2030, 1, 1)?, "International New Year's Day", @@ -1642,8 +1643,8 @@ pub fn build( (NaiveDate::from_ymd_res(2030, 9, 2)?, "Independence Day"), ], &mut map, - Country::VN, - "Vietnam", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/za.rs b/src/data/za.rs index 47b31e9..74ed46a 100644 --- a/src/data/za.rs +++ b/src/data/za.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "South Africa"; +const COUNTY_CODE: Country = Country::ZA; + /// Generate holiday map for South Africa. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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"), @@ -44,14 +45,14 @@ pub fn build( ), ], &mut map, - Country::ZA, - "South Africa", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -73,14 +74,14 @@ pub fn build( (NaiveDate::from_ymd_res(2001, 9, 24)?, "Heritage Day"), ], &mut map, - Country::ZA, - "South Africa", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -102,14 +103,14 @@ pub fn build( (NaiveDate::from_ymd_res(2002, 9, 24)?, "Heritage Day"), ], &mut map, - Country::ZA, - "South Africa", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -131,14 +132,14 @@ pub fn build( (NaiveDate::from_ymd_res(2003, 9, 24)?, "Heritage Day"), ], &mut map, - Country::ZA, - "South Africa", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -168,14 +169,14 @@ pub fn build( ), ], &mut map, - Country::ZA, - "South Africa", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -197,14 +198,14 @@ pub fn build( (NaiveDate::from_ymd_res(2005, 9, 24)?, "Heritage Day"), ], &mut map, - Country::ZA, - "South Africa", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2006, - vec![ + [ (NaiveDate::from_ymd_res(2006, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2006, 1, 2)?, @@ -234,14 +235,14 @@ pub fn build( ), ], &mut map, - Country::ZA, - "South Africa", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -263,14 +264,14 @@ pub fn build( (NaiveDate::from_ymd_res(2007, 9, 24)?, "Heritage Day"), ], &mut map, - Country::ZA, - "South Africa", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2008, - vec![ + [ (NaiveDate::from_ymd_res(2008, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2008, 3, 21)?, @@ -298,14 +299,14 @@ pub fn build( ), ], &mut map, - Country::ZA, - "South Africa", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -331,14 +332,14 @@ pub fn build( ), ], &mut map, - Country::ZA, - "South Africa", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -364,14 +365,14 @@ pub fn build( (NaiveDate::from_ymd_res(2010, 9, 24)?, "Heritage Day"), ], &mut map, - Country::ZA, - "South Africa", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -401,14 +402,14 @@ pub fn build( ), ], &mut map, - Country::ZA, - "South Africa", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2012, - vec![ + [ (NaiveDate::from_ymd_res(2012, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2012, 1, 2)?, @@ -434,14 +435,14 @@ pub fn build( (NaiveDate::from_ymd_res(2012, 9, 24)?, "Heritage Day"), ], &mut map, - Country::ZA, - "South Africa", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -463,14 +464,14 @@ pub fn build( (NaiveDate::from_ymd_res(2013, 9, 24)?, "Heritage Day"), ], &mut map, - Country::ZA, - "South Africa", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -496,14 +497,14 @@ pub fn build( ), ], &mut map, - Country::ZA, - "South Africa", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -525,14 +526,14 @@ pub fn build( (NaiveDate::from_ymd_res(2015, 9, 24)?, "Heritage Day"), ], &mut map, - Country::ZA, - "South Africa", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -562,14 +563,14 @@ pub fn build( ), ], &mut map, - Country::ZA, - "South Africa", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2017, - vec![ + [ (NaiveDate::from_ymd_res(2017, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2017, 1, 2)?, @@ -595,14 +596,14 @@ pub fn build( ), ], &mut map, - Country::ZA, - "South Africa", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -624,14 +625,14 @@ pub fn build( (NaiveDate::from_ymd_res(2018, 9, 24)?, "Heritage Day"), ], &mut map, - Country::ZA, - "South Africa", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -657,14 +658,14 @@ pub fn build( ), ], &mut map, - Country::ZA, - "South Africa", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -686,14 +687,14 @@ pub fn build( (NaiveDate::from_ymd_res(2020, 9, 24)?, "Heritage Day"), ], &mut map, - Country::ZA, - "South Africa", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -720,14 +721,14 @@ pub fn build( (NaiveDate::from_ymd_res(2021, 11, 1)?, "Municipal elections"), ], &mut map, - Country::ZA, - "South Africa", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -753,14 +754,14 @@ pub fn build( ), ], &mut map, - Country::ZA, - "South Africa", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2023, - vec![ + [ (NaiveDate::from_ymd_res(2023, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2023, 1, 2)?, @@ -790,14 +791,14 @@ pub fn build( ), ], &mut map, - Country::ZA, - "South Africa", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -823,14 +824,14 @@ pub fn build( ), ], &mut map, - Country::ZA, - "South Africa", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -852,14 +853,14 @@ pub fn build( (NaiveDate::from_ymd_res(2025, 9, 24)?, "Heritage Day"), ], &mut map, - Country::ZA, - "South Africa", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -881,14 +882,14 @@ pub fn build( (NaiveDate::from_ymd_res(2026, 9, 24)?, "Heritage Day"), ], &mut map, - Country::ZA, - "South Africa", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -914,14 +915,14 @@ pub fn build( (NaiveDate::from_ymd_res(2027, 9, 24)?, "Heritage Day"), ], &mut map, - Country::ZA, - "South Africa", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -943,14 +944,14 @@ pub fn build( ), ], &mut map, - Country::ZA, - "South Africa", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -972,14 +973,14 @@ pub fn build( (NaiveDate::from_ymd_res(2029, 9, 24)?, "Heritage Day"), ], &mut map, - Country::ZA, - "South Africa", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -1001,8 +1002,8 @@ pub fn build( (NaiveDate::from_ymd_res(2030, 9, 24)?, "Heritage Day"), ], &mut map, - Country::ZA, - "South Africa", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/zm.rs b/src/data/zm.rs index 9e4cf3b..e812b37 100644 --- a/src/data/zm.rs +++ b/src/data/zm.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Zambia"; +const COUNTY_CODE: Country = Country::ZM; + /// Generate holiday map for Zambia. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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)?, @@ -40,14 +41,14 @@ pub fn build( (NaiveDate::from_ymd_res(2000, 12, 25)?, "Christmas Day"), ], &mut map, - Country::ZM, - "Zambia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2001, - vec![ + [ (NaiveDate::from_ymd_res(2001, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2001, 3, 8)?, @@ -66,14 +67,14 @@ pub fn build( (NaiveDate::from_ymd_res(2001, 12, 25)?, "Christmas Day"), ], &mut map, - Country::ZM, - "Zambia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2002, - vec![ + [ (NaiveDate::from_ymd_res(2002, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2002, 3, 8)?, @@ -92,14 +93,14 @@ pub fn build( (NaiveDate::from_ymd_res(2002, 12, 25)?, "Christmas Day"), ], &mut map, - Country::ZM, - "Zambia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2003, - vec![ + [ (NaiveDate::from_ymd_res(2003, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2003, 3, 8)?, @@ -122,14 +123,14 @@ pub fn build( (NaiveDate::from_ymd_res(2003, 12, 25)?, "Christmas Day"), ], &mut map, - Country::ZM, - "Zambia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2004, - vec![ + [ (NaiveDate::from_ymd_res(2004, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2004, 3, 8)?, @@ -152,14 +153,14 @@ pub fn build( (NaiveDate::from_ymd_res(2004, 12, 25)?, "Christmas Day"), ], &mut map, - Country::ZM, - "Zambia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2005, - vec![ + [ (NaiveDate::from_ymd_res(2005, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2005, 3, 8)?, @@ -186,14 +187,14 @@ pub fn build( ), ], &mut map, - Country::ZM, - "Zambia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2006, - vec![ + [ (NaiveDate::from_ymd_res(2006, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2006, 1, 2)?, @@ -220,14 +221,14 @@ pub fn build( (NaiveDate::from_ymd_res(2006, 12, 25)?, "Christmas Day"), ], &mut map, - Country::ZM, - "Zambia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2007, - vec![ + [ (NaiveDate::from_ymd_res(2007, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2007, 3, 8)?, @@ -246,14 +247,14 @@ pub fn build( (NaiveDate::from_ymd_res(2007, 12, 25)?, "Christmas Day"), ], &mut map, - Country::ZM, - "Zambia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2008, - vec![ + [ (NaiveDate::from_ymd_res(2008, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2008, 3, 8)?, @@ -276,14 +277,14 @@ pub fn build( (NaiveDate::from_ymd_res(2008, 12, 25)?, "Christmas Day"), ], &mut map, - Country::ZM, - "Zambia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2009, - vec![ + [ (NaiveDate::from_ymd_res(2009, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2009, 3, 8)?, @@ -306,14 +307,14 @@ pub fn build( (NaiveDate::from_ymd_res(2009, 12, 25)?, "Christmas Day"), ], &mut map, - Country::ZM, - "Zambia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2010, - vec![ + [ (NaiveDate::from_ymd_res(2010, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2010, 3, 8)?, @@ -336,14 +337,14 @@ pub fn build( (NaiveDate::from_ymd_res(2010, 12, 25)?, "Christmas Day"), ], &mut map, - Country::ZM, - "Zambia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2011, - vec![ + [ (NaiveDate::from_ymd_res(2011, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2011, 3, 8)?, @@ -370,14 +371,14 @@ pub fn build( ), ], &mut map, - Country::ZM, - "Zambia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2012, - vec![ + [ (NaiveDate::from_ymd_res(2012, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2012, 1, 2)?, @@ -400,14 +401,14 @@ pub fn build( (NaiveDate::from_ymd_res(2012, 12, 25)?, "Christmas Day"), ], &mut map, - Country::ZM, - "Zambia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2013, - vec![ + [ (NaiveDate::from_ymd_res(2013, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2013, 3, 8)?, @@ -426,14 +427,14 @@ pub fn build( (NaiveDate::from_ymd_res(2013, 12, 25)?, "Christmas Day"), ], &mut map, - Country::ZM, - "Zambia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2014, - vec![ + [ (NaiveDate::from_ymd_res(2014, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2014, 3, 8)?, @@ -456,14 +457,14 @@ pub fn build( (NaiveDate::from_ymd_res(2014, 12, 25)?, "Christmas Day"), ], &mut map, - Country::ZM, - "Zambia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2015, - vec![ + [ (NaiveDate::from_ymd_res(2015, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2015, 3, 8)?, @@ -494,14 +495,14 @@ pub fn build( (NaiveDate::from_ymd_res(2015, 12, 25)?, "Christmas Day"), ], &mut map, - Country::ZM, - "Zambia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2016, - vec![ + [ (NaiveDate::from_ymd_res(2016, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2016, 3, 8)?, @@ -540,14 +541,14 @@ pub fn build( ), ], &mut map, - Country::ZM, - "Zambia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2017, - vec![ + [ (NaiveDate::from_ymd_res(2017, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2017, 1, 2)?, @@ -578,14 +579,14 @@ pub fn build( (NaiveDate::from_ymd_res(2017, 12, 25)?, "Christmas Day"), ], &mut map, - Country::ZM, - "Zambia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2018, - vec![ + [ (NaiveDate::from_ymd_res(2018, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2018, 3, 8)?, @@ -613,14 +614,14 @@ pub fn build( ), ], &mut map, - Country::ZM, - "Zambia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2019, - vec![ + [ (NaiveDate::from_ymd_res(2019, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2019, 3, 8)?, @@ -643,14 +644,14 @@ pub fn build( (NaiveDate::from_ymd_res(2019, 12, 25)?, "Christmas Day"), ], &mut map, - Country::ZM, - "Zambia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2020, - vec![ + [ (NaiveDate::from_ymd_res(2020, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2020, 3, 8)?, @@ -681,14 +682,14 @@ pub fn build( (NaiveDate::from_ymd_res(2020, 12, 25)?, "Christmas Day"), ], &mut map, - Country::ZM, - "Zambia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2021, - vec![ + [ (NaiveDate::from_ymd_res(2021, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2021, 3, 8)?, @@ -732,14 +733,14 @@ pub fn build( ), ], &mut map, - Country::ZM, - "Zambia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2022, - vec![ + [ (NaiveDate::from_ymd_res(2022, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2022, 3, 8)?, @@ -775,14 +776,14 @@ pub fn build( ), ], &mut map, - Country::ZM, - "Zambia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2023, - vec![ + [ (NaiveDate::from_ymd_res(2023, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2023, 1, 2)?, @@ -814,14 +815,14 @@ pub fn build( (NaiveDate::from_ymd_res(2023, 12, 25)?, "Christmas Day"), ], &mut map, - Country::ZM, - "Zambia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2024, - vec![ + [ (NaiveDate::from_ymd_res(2024, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2024, 3, 8)?, @@ -849,14 +850,14 @@ pub fn build( (NaiveDate::from_ymd_res(2024, 12, 25)?, "Christmas Day"), ], &mut map, - Country::ZM, - "Zambia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2025, - vec![ + [ (NaiveDate::from_ymd_res(2025, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2025, 3, 8)?, @@ -884,14 +885,14 @@ pub fn build( (NaiveDate::from_ymd_res(2025, 12, 25)?, "Christmas Day"), ], &mut map, - Country::ZM, - "Zambia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2026, - vec![ + [ (NaiveDate::from_ymd_res(2026, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2026, 3, 8)?, @@ -923,14 +924,14 @@ pub fn build( (NaiveDate::from_ymd_res(2026, 12, 25)?, "Christmas Day"), ], &mut map, - Country::ZM, - "Zambia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2027, - vec![ + [ (NaiveDate::from_ymd_res(2027, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2027, 3, 8)?, @@ -958,14 +959,14 @@ pub fn build( (NaiveDate::from_ymd_res(2027, 12, 25)?, "Christmas Day"), ], &mut map, - Country::ZM, - "Zambia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2028, - vec![ + [ (NaiveDate::from_ymd_res(2028, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2028, 3, 8)?, @@ -993,14 +994,14 @@ pub fn build( (NaiveDate::from_ymd_res(2028, 12, 25)?, "Christmas Day"), ], &mut map, - Country::ZM, - "Zambia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2029, - vec![ + [ (NaiveDate::from_ymd_res(2029, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2029, 3, 8)?, @@ -1024,14 +1025,14 @@ pub fn build( (NaiveDate::from_ymd_res(2029, 12, 25)?, "Christmas Day"), ], &mut map, - Country::ZM, - "Zambia", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2030, - vec![ + [ (NaiveDate::from_ymd_res(2030, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2030, 3, 8)?, @@ -1059,8 +1060,8 @@ pub fn build( (NaiveDate::from_ymd_res(2030, 12, 25)?, "Christmas Day"), ], &mut map, - Country::ZM, - "Zambia", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/src/data/zw.rs b/src/data/zw.rs index 8c43b48..e10c03e 100644 --- a/src/data/zw.rs +++ b/src/data/zw.rs @@ -2,6 +2,9 @@ #[allow(clippy::wildcard_imports)] use super::*; +const COUNTY_NAME: &str = "Zimbabwe"; +const COUNTY_CODE: Country = Country::ZW; + /// Generate holiday map for Zimbabwe. #[allow( unused_mut, @@ -9,15 +12,13 @@ use super::*; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build( - years: Option<&std::ops::Range>, -) -> Result>> { +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"), @@ -35,14 +36,14 @@ pub fn build( (NaiveDate::from_ymd_res(2000, 12, 26)?, "Boxing Day"), ], &mut map, - Country::ZW, - "Zimbabwe", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -60,14 +61,14 @@ pub fn build( (NaiveDate::from_ymd_res(2001, 12, 26)?, "Boxing Day"), ], &mut map, - Country::ZW, - "Zimbabwe", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -89,14 +90,14 @@ pub fn build( (NaiveDate::from_ymd_res(2002, 12, 26)?, "Boxing Day"), ], &mut map, - Country::ZW, - "Zimbabwe", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2003, - vec![ + [ (NaiveDate::from_ymd_res(2003, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2003, 4, 18)?, @@ -120,14 +121,14 @@ pub fn build( (NaiveDate::from_ymd_res(2003, 12, 26)?, "Boxing Day"), ], &mut map, - Country::ZW, - "Zimbabwe", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -150,14 +151,14 @@ pub fn build( ), ], &mut map, - Country::ZW, - "Zimbabwe", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -180,14 +181,14 @@ pub fn build( (NaiveDate::from_ymd_res(2005, 12, 26)?, "Boxing Day"), ], &mut map, - Country::ZW, - "Zimbabwe", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2006, - vec![ + [ (NaiveDate::from_ymd_res(2006, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2006, 1, 2)?, @@ -209,14 +210,14 @@ pub fn build( (NaiveDate::from_ymd_res(2006, 12, 26)?, "Boxing Day"), ], &mut map, - Country::ZW, - "Zimbabwe", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -234,14 +235,14 @@ pub fn build( (NaiveDate::from_ymd_res(2007, 12, 26)?, "Boxing Day"), ], &mut map, - Country::ZW, - "Zimbabwe", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -263,14 +264,14 @@ pub fn build( (NaiveDate::from_ymd_res(2008, 12, 26)?, "Boxing Day"), ], &mut map, - Country::ZW, - "Zimbabwe", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -288,14 +289,14 @@ pub fn build( (NaiveDate::from_ymd_res(2009, 12, 26)?, "Boxing Day"), ], &mut map, - Country::ZW, - "Zimbabwe", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -318,14 +319,14 @@ pub fn build( ), ], &mut map, - Country::ZW, - "Zimbabwe", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -348,14 +349,14 @@ pub fn build( (NaiveDate::from_ymd_res(2011, 12, 26)?, "Boxing Day"), ], &mut map, - Country::ZW, - "Zimbabwe", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2012, - vec![ + [ (NaiveDate::from_ymd_res(2012, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2012, 1, 2)?, @@ -377,14 +378,14 @@ pub fn build( (NaiveDate::from_ymd_res(2012, 12, 26)?, "Boxing Day"), ], &mut map, - Country::ZW, - "Zimbabwe", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -406,14 +407,14 @@ pub fn build( (NaiveDate::from_ymd_res(2013, 12, 26)?, "Boxing Day"), ], &mut map, - Country::ZW, - "Zimbabwe", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2014, - vec![ + [ (NaiveDate::from_ymd_res(2014, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2014, 4, 18)?, @@ -437,14 +438,14 @@ pub fn build( (NaiveDate::from_ymd_res(2014, 12, 26)?, "Boxing Day"), ], &mut map, - Country::ZW, - "Zimbabwe", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -462,14 +463,14 @@ pub fn build( (NaiveDate::from_ymd_res(2015, 12, 26)?, "Boxing Day"), ], &mut map, - Country::ZW, - "Zimbabwe", + COUNTY_CODE, + COUNTY_NAME, ); 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"), @@ -492,14 +493,14 @@ pub fn build( (NaiveDate::from_ymd_res(2016, 12, 26)?, "Boxing Day"), ], &mut map, - Country::ZW, - "Zimbabwe", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2017, - vec![ + [ (NaiveDate::from_ymd_res(2017, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2017, 1, 2)?, @@ -521,14 +522,14 @@ pub fn build( (NaiveDate::from_ymd_res(2017, 12, 26)?, "Boxing Day"), ], &mut map, - Country::ZW, - "Zimbabwe", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2018, - vec![ + [ (NaiveDate::from_ymd_res(2018, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2018, 2, 21)?, @@ -550,14 +551,14 @@ pub fn build( (NaiveDate::from_ymd_res(2018, 12, 26)?, "Boxing Day"), ], &mut map, - Country::ZW, - "Zimbabwe", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2019, - vec![ + [ (NaiveDate::from_ymd_res(2019, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2019, 2, 21)?, @@ -583,14 +584,14 @@ pub fn build( (NaiveDate::from_ymd_res(2019, 12, 26)?, "Boxing Day"), ], &mut map, - Country::ZW, - "Zimbabwe", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2020, - vec![ + [ (NaiveDate::from_ymd_res(2020, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2020, 2, 21)?, @@ -612,14 +613,14 @@ pub fn build( (NaiveDate::from_ymd_res(2020, 12, 26)?, "Boxing Day"), ], &mut map, - Country::ZW, - "Zimbabwe", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2021, - vec![ + [ (NaiveDate::from_ymd_res(2021, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2021, 2, 21)?, @@ -650,14 +651,14 @@ pub fn build( ), ], &mut map, - Country::ZW, - "Zimbabwe", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2022, - vec![ + [ (NaiveDate::from_ymd_res(2022, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2022, 2, 21)?, @@ -686,14 +687,14 @@ pub fn build( (NaiveDate::from_ymd_res(2022, 12, 26)?, "Boxing Day"), ], &mut map, - Country::ZW, - "Zimbabwe", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2023, - vec![ + [ (NaiveDate::from_ymd_res(2023, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2023, 1, 2)?, @@ -719,14 +720,14 @@ pub fn build( (NaiveDate::from_ymd_res(2023, 12, 26)?, "Boxing Day"), ], &mut map, - Country::ZW, - "Zimbabwe", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2024, - vec![ + [ (NaiveDate::from_ymd_res(2024, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2024, 2, 21)?, @@ -752,14 +753,14 @@ pub fn build( (NaiveDate::from_ymd_res(2024, 12, 26)?, "Boxing Day"), ], &mut map, - Country::ZW, - "Zimbabwe", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2025, - vec![ + [ (NaiveDate::from_ymd_res(2025, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2025, 2, 21)?, @@ -787,14 +788,14 @@ pub fn build( (NaiveDate::from_ymd_res(2025, 12, 26)?, "Boxing Day"), ], &mut map, - Country::ZW, - "Zimbabwe", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2026, - vec![ + [ (NaiveDate::from_ymd_res(2026, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2026, 2, 21)?, @@ -816,14 +817,14 @@ pub fn build( (NaiveDate::from_ymd_res(2026, 12, 26)?, "Boxing Day"), ], &mut map, - Country::ZW, - "Zimbabwe", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2027, - vec![ + [ (NaiveDate::from_ymd_res(2027, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2027, 2, 21)?, @@ -854,14 +855,14 @@ pub fn build( ), ], &mut map, - Country::ZW, - "Zimbabwe", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2028, - vec![ + [ (NaiveDate::from_ymd_res(2028, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2028, 2, 21)?, @@ -883,14 +884,14 @@ pub fn build( (NaiveDate::from_ymd_res(2028, 12, 26)?, "Boxing Day"), ], &mut map, - Country::ZW, - "Zimbabwe", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2029, - vec![ + [ (NaiveDate::from_ymd_res(2029, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2029, 2, 21)?, @@ -912,14 +913,14 @@ pub fn build( (NaiveDate::from_ymd_res(2029, 12, 26)?, "Boxing Day"), ], &mut map, - Country::ZW, - "Zimbabwe", + COUNTY_CODE, + COUNTY_NAME, ); build_year( years, 2030, - vec![ + [ (NaiveDate::from_ymd_res(2030, 1, 1)?, "New Year's Day"), ( NaiveDate::from_ymd_res(2030, 2, 21)?, @@ -945,8 +946,8 @@ pub fn build( (NaiveDate::from_ymd_res(2030, 12, 26)?, "Boxing Day"), ], &mut map, - Country::ZW, - "Zimbabwe", + COUNTY_CODE, + COUNTY_NAME, ); Ok(map) diff --git a/tests/test.rs b/tests/test.rs index e21507a..fbc915a 100644 --- a/tests/test.rs +++ b/tests/test.rs @@ -46,8 +46,11 @@ fn build_by_country_with_subdivision() -> anyhow::Result<()> { .years(2024..2025) .init()?; - let d = NaiveDate::from_ymd_res(2024, 5, 30)?; + let d = NaiveDate::from_ymd_res(2024, 5, 1)?; + assert_eq!("Erster Mai", get(Country::DE, d)?.unwrap().name); + assert_eq!("Erster Mai", get(Country::DE_NW, d)?.unwrap().name); + let d = NaiveDate::from_ymd_res(2024, 5, 30)?; assert!(get(Country::DE, d)?.is_none()); assert_eq!("Fronleichnam", get(Country::DE_NW, d)?.unwrap().name); From 54641858027533d432bb4dfdaddc5f4dfb3be31d Mon Sep 17 00:00:00 2001 From: AD4MANTIS <31745687+AD4MANTIS@users.noreply.github.com> Date: Sat, 6 Jul 2024 01:02:40 +0200 Subject: [PATCH 5/6] merge map for subdivs at runtime --- gen.py | 63 +++++--- src/country.rs | 85 +++++++++++ src/data/ae.rs | 2 +- src/data/am.rs | 2 +- src/data/ao.rs | 2 +- src/data/ar.rs | 2 +- src/data/at.rs | 2 +- src/data/au.rs | 2 +- src/data/aw.rs | 2 +- src/data/az.rs | 2 +- src/data/ba.rs | 2 +- src/data/bd.rs | 2 +- src/data/be.rs | 2 +- src/data/bg.rs | 2 +- src/data/bi.rs | 2 +- src/data/bo.rs | 2 +- src/data/br.rs | 2 +- src/data/bw.rs | 2 +- src/data/by.rs | 2 +- src/data/ca.rs | 2 +- src/data/ch.rs | 2 +- src/data/cl.rs | 2 +- src/data/cn.rs | 2 +- src/data/co.rs | 2 +- src/data/cu.rs | 2 +- src/data/cw.rs | 2 +- src/data/cy.rs | 2 +- src/data/cz.rs | 2 +- src/data/de.rs | 2 +- src/data/de_bb.rs | 95 ++++-------- src/data/de_be.rs | 228 ++++----------------------- src/data/de_bw.rs | 95 ++++-------- src/data/de_by.rs | 95 ++++-------- src/data/de_byp.rs | 95 ++++-------- src/data/de_hb.rs | 221 ++++----------------------- src/data/de_he.rs | 95 ++++-------- src/data/de_hh.rs | 221 ++++----------------------- src/data/de_mv.rs | 102 ++++--------- src/data/de_ni.rs | 221 ++++----------------------- src/data/de_nw.rs | 95 ++++-------- src/data/de_rp.rs | 95 ++++-------- src/data/de_sh.rs | 221 ++++----------------------- src/data/de_sl.rs | 95 ++++-------- src/data/de_sn.rs | 95 ++++-------- src/data/de_st.rs | 95 ++++-------- src/data/de_th.rs | 102 ++++--------- src/data/dj.rs | 2 +- src/data/dk.rs | 2 +- src/data/do.rs | 2 +- src/data/ee.rs | 2 +- src/data/eg.rs | 2 +- src/data/es.rs | 2 +- src/data/et.rs | 2 +- src/data/fi.rs | 2 +- src/data/fr.rs | 2 +- src/data/gb.rs | 2 +- src/data/ge.rs | 2 +- src/data/gr.rs | 2 +- src/data/helper.rs | 33 +--- src/data/hk.rs | 2 +- src/data/hn.rs | 2 +- src/data/hr.rs | 2 +- src/data/hu.rs | 2 +- src/data/id.rs | 2 +- src/data/ie.rs | 2 +- src/data/il.rs | 2 +- src/data/im.rs | 2 +- src/data/in.rs | 2 +- src/data/is.rs | 2 +- src/data/it.rs | 2 +- src/data/jm.rs | 2 +- src/data/jp.rs | 2 +- src/data/ke.rs | 2 +- src/data/kr.rs | 2 +- src/data/kz.rs | 2 +- src/data/li.rs | 2 +- src/data/ls.rs | 2 +- src/data/lt.rs | 2 +- src/data/lu.rs | 2 +- src/data/lv.rs | 2 +- src/data/ma.rs | 2 +- src/data/md.rs | 2 +- src/data/mg.rs | 2 +- src/data/mk.rs | 2 +- src/data/mod.rs | 4 +- src/data/mt.rs | 2 +- src/data/mw.rs | 2 +- src/data/mx.rs | 2 +- src/data/my.rs | 2 +- src/data/mz.rs | 2 +- src/data/na.rs | 2 +- src/data/ng.rs | 2 +- src/data/ni.rs | 2 +- src/data/nl.rs | 2 +- src/data/no.rs | 2 +- src/data/nz.rs | 2 +- src/data/pe.rs | 2 +- src/data/pk.rs | 2 +- src/data/pl.rs | 2 +- src/data/pt.rs | 2 +- src/data/py.rs | 2 +- src/data/ro.rs | 2 +- src/data/rs.rs | 2 +- src/data/ru.rs | 2 +- src/data/sa.rs | 2 +- src/data/se.rs | 2 +- src/data/sg.rs | 2 +- src/data/si.rs | 2 +- src/data/sk.rs | 2 +- src/data/sz.rs | 2 +- src/data/tn.rs | 2 +- src/data/tr.rs | 2 +- src/data/tw.rs | 2 +- src/data/ua.rs | 2 +- src/data/us.rs | 2 +- src/data/us_ak.rs | 95 ++++-------- src/data/us_al.rs | 95 ++++-------- src/data/us_ar.rs | 372 ++++++++------------------------------------- src/data/us_as.rs | 95 ++++-------- src/data/us_az.rs | 372 ++++++++------------------------------------- src/data/us_ca.rs | 95 ++++-------- src/data/us_co.rs | 102 ++++--------- src/data/us_ct.rs | 95 ++++-------- src/data/us_dc.rs | 123 ++++----------- src/data/us_de.rs | 95 ++++-------- src/data/us_fl.rs | 95 ++++-------- src/data/us_ga.rs | 95 ++++-------- src/data/us_gu.rs | 95 ++++-------- src/data/us_hi.rs | 95 ++++-------- src/data/us_ia.rs | 95 ++++-------- src/data/us_id.rs | 372 ++++++++------------------------------------- src/data/us_il.rs | 95 ++++-------- src/data/us_in.rs | 95 ++++-------- src/data/us_ks.rs | 186 ++++------------------- src/data/us_ky.rs | 95 ++++-------- src/data/us_la.rs | 95 ++++-------- src/data/us_ma.rs | 95 ++++-------- src/data/us_md.rs | 137 ++++------------- src/data/us_me.rs | 95 ++++-------- src/data/us_mi.rs | 186 ++++------------------- src/data/us_mn.rs | 372 ++++++++------------------------------------- src/data/us_mo.rs | 95 ++++-------- src/data/us_mp.rs | 95 ++++-------- src/data/us_ms.rs | 95 ++++-------- src/data/us_mt.rs | 228 ++++----------------------- src/data/us_nc.rs | 95 ++++-------- src/data/us_nd.rs | 372 ++++++++------------------------------------- src/data/us_ne.rs | 95 ++++-------- src/data/us_nh.rs | 95 ++++-------- src/data/us_nj.rs | 95 ++++-------- src/data/us_nm.rs | 95 ++++-------- src/data/us_nv.rs | 95 ++++-------- src/data/us_ny.rs | 95 ++++-------- src/data/us_oh.rs | 372 ++++++++------------------------------------- src/data/us_ok.rs | 95 ++++-------- src/data/us_or.rs | 372 ++++++++------------------------------------- src/data/us_pa.rs | 95 ++++-------- src/data/us_pr.rs | 95 ++++-------- src/data/us_ri.rs | 95 ++++-------- src/data/us_sc.rs | 95 ++++-------- src/data/us_sd.rs | 372 ++++++++------------------------------------- src/data/us_tn.rs | 95 ++++-------- src/data/us_tx.rs | 95 ++++-------- src/data/us_um.rs | 372 ++++++++------------------------------------- src/data/us_ut.rs | 95 ++++-------- src/data/us_va.rs | 151 ++++-------------- src/data/us_vi.rs | 95 ++++-------- src/data/us_vt.rs | 95 ++++-------- src/data/us_wa.rs | 372 ++++++++------------------------------------- src/data/us_wi.rs | 102 ++++--------- src/data/us_wv.rs | 95 ++++-------- src/data/us_wy.rs | 372 ++++++++------------------------------------- src/data/uy.rs | 2 +- src/data/uz.rs | 2 +- src/data/ve.rs | 2 +- src/data/vn.rs | 2 +- src/data/za.rs | 2 +- src/data/zm.rs | 2 +- src/data/zw.rs | 2 +- src/iter.rs | 37 +++-- src/lib.rs | 36 ++++- tests/test.rs | 25 +++ 182 files changed, 3010 insertions(+), 8658 deletions(-) diff --git a/gen.py b/gen.py index 2d327ae..fffbab4 100644 --- a/gen.py +++ b/gen.py @@ -7,9 +7,8 @@ class Country: code: str name: str - subdivision_code: str = None - subdivision_name: str = None - + subdivision_code: str | None = None + subdivision_name: str | None = None countries = [ Country("AO", "Angola"), @@ -239,6 +238,24 @@ class Country: } } +impl Country { + #[must_use] + pub fn country_from_subdivision(subdivision: Country) -> Option { + Some(match subdivision { +{%- for country in countries %} +{%- if country.subdivision_code == None and subdivisionsPerCountry[country.code] %} + #[cfg(feature = "{{country.code}}")] +{%- for subdiv in subdivisionsPerCountry[country.code] %} + | Country::{{subdiv|enum_name}} +{%- endfor %} + => Country::{{country|enum_name}}, +{%- endif %} +{%- endfor %} + _ => return None, + }) + } +} + """ build = """ @@ -273,8 +290,8 @@ class Country: country_mod = """ mod helper; -use crate::{prelude::*, HolidayPerCountryMap, NaiveDateExt, Result, Year}; -use helper::{build_subdivision_year, build_year}; +use crate::{prelude::*, HolidayPerYearMap, NaiveDateExt, Result, Year}; +use helper::build_year; use chrono::NaiveDate; use std::collections::HashMap; @@ -295,25 +312,18 @@ class Country: /// Generate holiday map for {{country|display_name}}. #[allow(unused_mut, unused_variables, clippy::too_many_lines, clippy::missing_errors_doc)] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); -{% if country.subdivision_code != None %} +{% if country.subdivision_code %} let mut national_holidays = de::build(years)?; {%- endif %} {%- for year in years %} {% if holiday(years=year, subdiv=country.subdivision_code) %} -{%- if country.subdivision_code != None %} - build_subdivision_year( - years, - {{year}}, - &mut national_holidays, -{%- else %} build_year( years, {{year}}, -{%- endif %} [ {%- for date, name in holiday(years=year, subdiv=country.subdivision_code).items() %} {%- if country.subdivision_code == None or date not in holiday(years=year) %} @@ -345,19 +355,27 @@ def escape(code: str) -> str: return lower def enum_name(country: Country) -> str: - if country.subdivision_code == None: - return country.code + if country.subdivision_code: + return f"{country.code}_{country.subdivision_code}" else: - return country.code + "_" + country.subdivision_code + return country.code def mod_name(country: Country) -> str: return enum_name(country).lower() def display_name(country: Country) -> str: - if country.subdivision_name == None: - return country.name + if country.subdivision_name: + return f"{country.name} ({country.subdivision_name})" else: - return country.name + " (" + country.subdivision_name + ")" + return country.name + +def subdivisionsPerCountry(countries: list[Country]) -> dict[str, list[Country]]: + subdivisionsPerCountry = {} + for country in countries: + if country.subdivision_code == None: + subdivisionsPerCountry[country.code] = list(filter(lambda c: c.subdivision_code and c.code == country.code, countries)) + + return subdivisionsPerCountry if __name__ == "__main__": env = Environment() @@ -370,7 +388,9 @@ def display_name(country: Country) -> str: env.filters["display_name"] = display_name with open("src/country.rs", "w") as f: - rendered = env.from_string(country).render(countries=countries) + rendered = env.from_string(country).render( + countries=countries, + subdivisionsPerCountry=subdivisionsPerCountry(countries)) f.write(rendered) with open("src/build.rs", "w") as f: @@ -383,7 +403,6 @@ def display_name(country: Country) -> str: for country in countries: with open("src/data/{}.rs".format(mod_name(country)), "w") as f: - # Could use `getattr(holidays, country.code, {}).subdivisions` but this only has the codes and not the names. holiday = getattr(holidays, country.code, {}) rendered = env.from_string(build_country).render( country=country, diff --git a/src/country.rs b/src/country.rs index e5a9cdd..f865a8e 100644 --- a/src/country.rs +++ b/src/country.rs @@ -1256,3 +1256,88 @@ impl std::str::FromStr for Country { }) } } + +impl Country { + #[must_use] + pub fn country_from_subdivision(subdivision: Country) -> Option { + Some(match subdivision { + #[cfg(feature = "DE")] + Country::DE_BB + | Country::DE_BE + | Country::DE_BW + | Country::DE_BY + | Country::DE_BYP + | Country::DE_HB + | Country::DE_HE + | Country::DE_HH + | Country::DE_MV + | Country::DE_NI + | Country::DE_NW + | Country::DE_RP + | Country::DE_SH + | Country::DE_SL + | Country::DE_SN + | Country::DE_ST + | Country::DE_TH => Country::DE, + #[cfg(feature = "US")] + Country::US_AK + | Country::US_AL + | Country::US_AR + | Country::US_AS + | Country::US_AZ + | Country::US_CA + | Country::US_CO + | Country::US_CT + | Country::US_DC + | Country::US_DE + | Country::US_FL + | Country::US_GA + | Country::US_GU + | Country::US_HI + | Country::US_IA + | Country::US_ID + | Country::US_IL + | Country::US_IN + | Country::US_KS + | Country::US_KY + | Country::US_LA + | Country::US_MA + | Country::US_MD + | Country::US_ME + | Country::US_MI + | Country::US_MN + | Country::US_MO + | Country::US_MP + | Country::US_MS + | Country::US_MT + | Country::US_NC + | Country::US_ND + | Country::US_NE + | Country::US_NH + | Country::US_NJ + | Country::US_NM + | Country::US_NV + | Country::US_NY + | Country::US_OH + | Country::US_OK + | Country::US_OR + | Country::US_PA + | Country::US_PR + | Country::US_RI + | Country::US_SC + | Country::US_SD + | Country::US_TN + | Country::US_TX + | Country::US_UM + | Country::US_UT + | Country::US_VA + | Country::US_VI + | Country::US_VT + | Country::US_WA + | Country::US_WI + | Country::US_WV + | Country::US_WY => Country::US, + _ => return None, + }) + } +} diff --git a/src/data/ae.rs b/src/data/ae.rs index 8d81da6..51694a4 100644 --- a/src/data/ae.rs +++ b/src/data/ae.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::AE; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/am.rs b/src/data/am.rs index 8cc8e8a..fcdd2f7 100644 --- a/src/data/am.rs +++ b/src/data/am.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::AM; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/ao.rs b/src/data/ao.rs index df78424..1f0276f 100644 --- a/src/data/ao.rs +++ b/src/data/ao.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::AO; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/ar.rs b/src/data/ar.rs index cab02bc..99f4612 100644 --- a/src/data/ar.rs +++ b/src/data/ar.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::AR; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/at.rs b/src/data/at.rs index 0dfd666..9bd9fce 100644 --- a/src/data/at.rs +++ b/src/data/at.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::AT; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/au.rs b/src/data/au.rs index a44947e..5951e41 100644 --- a/src/data/au.rs +++ b/src/data/au.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::AU; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/aw.rs b/src/data/aw.rs index 0e8c64e..ce08f3d 100644 --- a/src/data/aw.rs +++ b/src/data/aw.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::AW; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/az.rs b/src/data/az.rs index 47fde5d..6f332cf 100644 --- a/src/data/az.rs +++ b/src/data/az.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::AZ; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/ba.rs b/src/data/ba.rs index 1d60f6d..14b83e6 100644 --- a/src/data/ba.rs +++ b/src/data/ba.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::BA; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/bd.rs b/src/data/bd.rs index 810ac9a..9a4f4d1 100644 --- a/src/data/bd.rs +++ b/src/data/bd.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::BD; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/be.rs b/src/data/be.rs index 8f020f9..d09dc84 100644 --- a/src/data/be.rs +++ b/src/data/be.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::BE; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/bg.rs b/src/data/bg.rs index 9073e96..10b5cb7 100644 --- a/src/data/bg.rs +++ b/src/data/bg.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::BG; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/bi.rs b/src/data/bi.rs index edae9c6..9f52112 100644 --- a/src/data/bi.rs +++ b/src/data/bi.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::BI; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/bo.rs b/src/data/bo.rs index b7e57ca..4ef0feb 100644 --- a/src/data/bo.rs +++ b/src/data/bo.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::BO; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/br.rs b/src/data/br.rs index 9cb5322..bf761cf 100644 --- a/src/data/br.rs +++ b/src/data/br.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::BR; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/bw.rs b/src/data/bw.rs index 58ac461..afb1cd1 100644 --- a/src/data/bw.rs +++ b/src/data/bw.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::BW; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/by.rs b/src/data/by.rs index ef5c867..ca6a767 100644 --- a/src/data/by.rs +++ b/src/data/by.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::BY; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/ca.rs b/src/data/ca.rs index 079be47..1e7aed5 100644 --- a/src/data/ca.rs +++ b/src/data/ca.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::CA; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/ch.rs b/src/data/ch.rs index 7b9bb51..ea411f3 100644 --- a/src/data/ch.rs +++ b/src/data/ch.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::CH; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/cl.rs b/src/data/cl.rs index 66fd4e1..43ca56d 100644 --- a/src/data/cl.rs +++ b/src/data/cl.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::CL; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/cn.rs b/src/data/cn.rs index 694189b..efb8c28 100644 --- a/src/data/cn.rs +++ b/src/data/cn.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::CN; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/co.rs b/src/data/co.rs index f411c31..8eaaaf4 100644 --- a/src/data/co.rs +++ b/src/data/co.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::CO; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/cu.rs b/src/data/cu.rs index 97b1049..f0fa486 100644 --- a/src/data/cu.rs +++ b/src/data/cu.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::CU; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/cw.rs b/src/data/cw.rs index 5333c94..507afc5 100644 --- a/src/data/cw.rs +++ b/src/data/cw.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::CW; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/cy.rs b/src/data/cy.rs index e98be44..2072884 100644 --- a/src/data/cy.rs +++ b/src/data/cy.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::CY; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/cz.rs b/src/data/cz.rs index 0a2b6aa..584c8fa 100644 --- a/src/data/cz.rs +++ b/src/data/cz.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::CZ; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/de.rs b/src/data/de.rs index 73fb8ac..5496a7a 100644 --- a/src/data/de.rs +++ b/src/data/de.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::DE; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/de_bb.rs b/src/data/de_bb.rs index 9ae907b..5856549 100644 --- a/src/data/de_bb.rs +++ b/src/data/de_bb.rs @@ -12,15 +12,14 @@ const COUNTY_CODE: Country = Country::DE_BB; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); let mut national_holidays = de::build(years)?; - build_subdivision_year( + build_year( years, 2000, - &mut national_holidays, [ (NaiveDate::from_ymd_res(2000, 4, 23)?, "Ostersonntag"), (NaiveDate::from_ymd_res(2000, 6, 11)?, "Pfingstsonntag"), @@ -31,10 +30,9 @@ pub fn build(years: Option<&std::ops::Range>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); let mut national_holidays = de::build(years)?; - build_subdivision_year( - years, - 2000, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2000, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2001, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2001, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2002, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2002, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2003, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2003, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2004, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2004, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2005, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2005, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2006, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2006, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2007, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2007, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2008, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2008, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2009, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2009, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2010, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2010, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2011, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2011, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2012, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2012, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2013, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2013, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2014, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2014, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2015, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2015, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2016, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2016, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2017, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2017, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2018, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2018, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( + build_year( years, 2019, - &mut national_holidays, [( NaiveDate::from_ymd_res(2019, 3, 8)?, "Internationaler Frauentag", @@ -220,10 +67,9 @@ pub fn build(years: Option<&std::ops::Range>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); let mut national_holidays = de::build(years)?; - build_subdivision_year( + build_year( years, 2000, - &mut national_holidays, [ (NaiveDate::from_ymd_res(2000, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2000, 6, 22)?, "Fronleichnam"), @@ -31,10 +30,9 @@ pub fn build(years: Option<&std::ops::Range>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); let mut national_holidays = de::build(years)?; - build_subdivision_year( + build_year( years, 2000, - &mut national_holidays, [ (NaiveDate::from_ymd_res(2000, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2000, 6, 22)?, "Fronleichnam"), @@ -32,10 +31,9 @@ pub fn build(years: Option<&std::ops::Range>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); let mut national_holidays = de::build(years)?; - build_subdivision_year( + build_year( years, 2000, - &mut national_holidays, [ (NaiveDate::from_ymd_res(2000, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2000, 6, 22)?, "Fronleichnam"), @@ -31,10 +30,9 @@ pub fn build(years: Option<&std::ops::Range>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); let mut national_holidays = de::build(years)?; - build_subdivision_year( - years, - 2000, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2000, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2001, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2001, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2002, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2002, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2003, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2003, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2004, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2004, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2005, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2005, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2006, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2006, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2007, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2007, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2008, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2008, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2009, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2009, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2010, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2010, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2011, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2011, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2012, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2012, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2013, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2013, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2014, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2014, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2015, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2015, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2016, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2016, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2017, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2017, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( + build_year( years, 2018, - &mut national_holidays, [(NaiveDate::from_ymd_res(2018, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2019, - &mut national_holidays, [(NaiveDate::from_ymd_res(2019, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2020, - &mut national_holidays, [(NaiveDate::from_ymd_res(2020, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2021, - &mut national_holidays, [(NaiveDate::from_ymd_res(2021, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2022, - &mut national_holidays, [(NaiveDate::from_ymd_res(2022, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2023, - &mut national_holidays, [(NaiveDate::from_ymd_res(2023, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2024, - &mut national_holidays, [(NaiveDate::from_ymd_res(2024, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2025, - &mut national_holidays, [(NaiveDate::from_ymd_res(2025, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2026, - &mut national_holidays, [(NaiveDate::from_ymd_res(2026, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2027, - &mut national_holidays, [(NaiveDate::from_ymd_res(2027, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2028, - &mut national_holidays, [(NaiveDate::from_ymd_res(2028, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2029, - &mut national_holidays, [(NaiveDate::from_ymd_res(2029, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2030, - &mut national_holidays, [(NaiveDate::from_ymd_res(2030, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, diff --git a/src/data/de_he.rs b/src/data/de_he.rs index edb1b9f..a83a050 100644 --- a/src/data/de_he.rs +++ b/src/data/de_he.rs @@ -12,315 +12,284 @@ const COUNTY_CODE: Country = Country::DE_HE; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); let mut national_holidays = de::build(years)?; - build_subdivision_year( + build_year( years, 2000, - &mut national_holidays, [(NaiveDate::from_ymd_res(2000, 6, 22)?, "Fronleichnam")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2001, - &mut national_holidays, [(NaiveDate::from_ymd_res(2001, 6, 14)?, "Fronleichnam")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2002, - &mut national_holidays, [(NaiveDate::from_ymd_res(2002, 5, 30)?, "Fronleichnam")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2003, - &mut national_holidays, [(NaiveDate::from_ymd_res(2003, 6, 19)?, "Fronleichnam")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2004, - &mut national_holidays, [(NaiveDate::from_ymd_res(2004, 6, 10)?, "Fronleichnam")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2005, - &mut national_holidays, [(NaiveDate::from_ymd_res(2005, 5, 26)?, "Fronleichnam")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2006, - &mut national_holidays, [(NaiveDate::from_ymd_res(2006, 6, 15)?, "Fronleichnam")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2007, - &mut national_holidays, [(NaiveDate::from_ymd_res(2007, 6, 7)?, "Fronleichnam")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2008, - &mut national_holidays, [(NaiveDate::from_ymd_res(2008, 5, 22)?, "Fronleichnam")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2009, - &mut national_holidays, [(NaiveDate::from_ymd_res(2009, 6, 11)?, "Fronleichnam")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2010, - &mut national_holidays, [(NaiveDate::from_ymd_res(2010, 6, 3)?, "Fronleichnam")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2011, - &mut national_holidays, [(NaiveDate::from_ymd_res(2011, 6, 23)?, "Fronleichnam")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2012, - &mut national_holidays, [(NaiveDate::from_ymd_res(2012, 6, 7)?, "Fronleichnam")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2013, - &mut national_holidays, [(NaiveDate::from_ymd_res(2013, 5, 30)?, "Fronleichnam")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2014, - &mut national_holidays, [(NaiveDate::from_ymd_res(2014, 6, 19)?, "Fronleichnam")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2015, - &mut national_holidays, [(NaiveDate::from_ymd_res(2015, 6, 4)?, "Fronleichnam")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2016, - &mut national_holidays, [(NaiveDate::from_ymd_res(2016, 5, 26)?, "Fronleichnam")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2017, - &mut national_holidays, [(NaiveDate::from_ymd_res(2017, 6, 15)?, "Fronleichnam")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2018, - &mut national_holidays, [(NaiveDate::from_ymd_res(2018, 5, 31)?, "Fronleichnam")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2019, - &mut national_holidays, [(NaiveDate::from_ymd_res(2019, 6, 20)?, "Fronleichnam")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2020, - &mut national_holidays, [(NaiveDate::from_ymd_res(2020, 6, 11)?, "Fronleichnam")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2021, - &mut national_holidays, [(NaiveDate::from_ymd_res(2021, 6, 3)?, "Fronleichnam")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2022, - &mut national_holidays, [(NaiveDate::from_ymd_res(2022, 6, 16)?, "Fronleichnam")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2023, - &mut national_holidays, [(NaiveDate::from_ymd_res(2023, 6, 8)?, "Fronleichnam")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2024, - &mut national_holidays, [(NaiveDate::from_ymd_res(2024, 5, 30)?, "Fronleichnam")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2025, - &mut national_holidays, [(NaiveDate::from_ymd_res(2025, 6, 19)?, "Fronleichnam")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2026, - &mut national_holidays, [(NaiveDate::from_ymd_res(2026, 6, 4)?, "Fronleichnam")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2027, - &mut national_holidays, [(NaiveDate::from_ymd_res(2027, 5, 27)?, "Fronleichnam")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2028, - &mut national_holidays, [(NaiveDate::from_ymd_res(2028, 6, 15)?, "Fronleichnam")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2029, - &mut national_holidays, [(NaiveDate::from_ymd_res(2029, 5, 31)?, "Fronleichnam")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2030, - &mut national_holidays, [(NaiveDate::from_ymd_res(2030, 6, 20)?, "Fronleichnam")], &mut map, COUNTY_CODE, diff --git a/src/data/de_hh.rs b/src/data/de_hh.rs index bdad2eb..10c3987 100644 --- a/src/data/de_hh.rs +++ b/src/data/de_hh.rs @@ -12,315 +12,158 @@ const COUNTY_CODE: Country = Country::DE_HH; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); let mut national_holidays = de::build(years)?; - build_subdivision_year( - years, - 2000, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2000, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2001, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2001, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2002, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2002, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2003, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2003, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2004, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2004, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2005, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2005, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2006, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2006, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2007, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2007, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2008, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2008, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2009, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2009, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2010, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2010, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2011, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2011, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2012, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2012, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2013, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2013, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2014, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2014, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2015, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2015, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2016, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2016, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2017, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2017, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( + build_year( years, 2018, - &mut national_holidays, [(NaiveDate::from_ymd_res(2018, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2019, - &mut national_holidays, [(NaiveDate::from_ymd_res(2019, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2020, - &mut national_holidays, [(NaiveDate::from_ymd_res(2020, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2021, - &mut national_holidays, [(NaiveDate::from_ymd_res(2021, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2022, - &mut national_holidays, [(NaiveDate::from_ymd_res(2022, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2023, - &mut national_holidays, [(NaiveDate::from_ymd_res(2023, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2024, - &mut national_holidays, [(NaiveDate::from_ymd_res(2024, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2025, - &mut national_holidays, [(NaiveDate::from_ymd_res(2025, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2026, - &mut national_holidays, [(NaiveDate::from_ymd_res(2026, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2027, - &mut national_holidays, [(NaiveDate::from_ymd_res(2027, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2028, - &mut national_holidays, [(NaiveDate::from_ymd_res(2028, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2029, - &mut national_holidays, [(NaiveDate::from_ymd_res(2029, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2030, - &mut national_holidays, [(NaiveDate::from_ymd_res(2030, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, diff --git a/src/data/de_mv.rs b/src/data/de_mv.rs index af9102a..28fccbd 100644 --- a/src/data/de_mv.rs +++ b/src/data/de_mv.rs @@ -12,245 +12,214 @@ const COUNTY_CODE: Country = Country::DE_MV; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); let mut national_holidays = de::build(years)?; - build_subdivision_year( + build_year( years, 2000, - &mut national_holidays, [(NaiveDate::from_ymd_res(2000, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2001, - &mut national_holidays, [(NaiveDate::from_ymd_res(2001, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2002, - &mut national_holidays, [(NaiveDate::from_ymd_res(2002, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2003, - &mut national_holidays, [(NaiveDate::from_ymd_res(2003, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2004, - &mut national_holidays, [(NaiveDate::from_ymd_res(2004, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2005, - &mut national_holidays, [(NaiveDate::from_ymd_res(2005, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2006, - &mut national_holidays, [(NaiveDate::from_ymd_res(2006, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2007, - &mut national_holidays, [(NaiveDate::from_ymd_res(2007, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2008, - &mut national_holidays, [(NaiveDate::from_ymd_res(2008, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2009, - &mut national_holidays, [(NaiveDate::from_ymd_res(2009, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2010, - &mut national_holidays, [(NaiveDate::from_ymd_res(2010, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2011, - &mut national_holidays, [(NaiveDate::from_ymd_res(2011, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2012, - &mut national_holidays, [(NaiveDate::from_ymd_res(2012, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2013, - &mut national_holidays, [(NaiveDate::from_ymd_res(2013, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2014, - &mut national_holidays, [(NaiveDate::from_ymd_res(2014, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2015, - &mut national_holidays, [(NaiveDate::from_ymd_res(2015, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2016, - &mut national_holidays, [(NaiveDate::from_ymd_res(2016, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( - years, - 2017, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2017, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( + build_year( years, 2018, - &mut national_holidays, [(NaiveDate::from_ymd_res(2018, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2019, - &mut national_holidays, [(NaiveDate::from_ymd_res(2019, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2020, - &mut national_holidays, [(NaiveDate::from_ymd_res(2020, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2021, - &mut national_holidays, [(NaiveDate::from_ymd_res(2021, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2022, - &mut national_holidays, [(NaiveDate::from_ymd_res(2022, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2023, - &mut national_holidays, [ ( NaiveDate::from_ymd_res(2023, 3, 8)?, @@ -263,10 +232,9 @@ pub fn build(years: Option<&std::ops::Range>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); let mut national_holidays = de::build(years)?; - build_subdivision_year( - years, - 2000, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2000, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2001, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2001, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2002, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2002, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2003, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2003, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2004, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2004, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2005, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2005, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2006, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2006, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2007, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2007, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2008, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2008, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2009, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2009, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2010, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2010, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2011, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2011, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2012, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2012, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2013, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2013, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2014, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2014, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2015, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2015, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2016, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2016, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2017, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2017, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( + build_year( years, 2018, - &mut national_holidays, [(NaiveDate::from_ymd_res(2018, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2019, - &mut national_holidays, [(NaiveDate::from_ymd_res(2019, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2020, - &mut national_holidays, [(NaiveDate::from_ymd_res(2020, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2021, - &mut national_holidays, [(NaiveDate::from_ymd_res(2021, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2022, - &mut national_holidays, [(NaiveDate::from_ymd_res(2022, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2023, - &mut national_holidays, [(NaiveDate::from_ymd_res(2023, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2024, - &mut national_holidays, [(NaiveDate::from_ymd_res(2024, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2025, - &mut national_holidays, [(NaiveDate::from_ymd_res(2025, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2026, - &mut national_holidays, [(NaiveDate::from_ymd_res(2026, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2027, - &mut national_holidays, [(NaiveDate::from_ymd_res(2027, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2028, - &mut national_holidays, [(NaiveDate::from_ymd_res(2028, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2029, - &mut national_holidays, [(NaiveDate::from_ymd_res(2029, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2030, - &mut national_holidays, [(NaiveDate::from_ymd_res(2030, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, diff --git a/src/data/de_nw.rs b/src/data/de_nw.rs index 5768128..6f9058f 100644 --- a/src/data/de_nw.rs +++ b/src/data/de_nw.rs @@ -12,15 +12,14 @@ const COUNTY_CODE: Country = Country::DE_NW; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); let mut national_holidays = de::build(years)?; - build_subdivision_year( + build_year( years, 2000, - &mut national_holidays, [ (NaiveDate::from_ymd_res(2000, 6, 22)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2000, 11, 1)?, "Allerheiligen"), @@ -30,10 +29,9 @@ pub fn build(years: Option<&std::ops::Range>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); let mut national_holidays = de::build(years)?; - build_subdivision_year( + build_year( years, 2000, - &mut national_holidays, [ (NaiveDate::from_ymd_res(2000, 6, 22)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2000, 11, 1)?, "Allerheiligen"), @@ -30,10 +29,9 @@ pub fn build(years: Option<&std::ops::Range>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); let mut national_holidays = de::build(years)?; - build_subdivision_year( - years, - 2000, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2000, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2001, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2001, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2002, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2002, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2003, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2003, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2004, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2004, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2005, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2005, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2006, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2006, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2007, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2007, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2008, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2008, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2009, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2009, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2010, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2010, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2011, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2011, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2012, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2012, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2013, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2013, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2014, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2014, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2015, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2015, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2016, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2016, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2017, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2017, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( + build_year( years, 2018, - &mut national_holidays, [(NaiveDate::from_ymd_res(2018, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2019, - &mut national_holidays, [(NaiveDate::from_ymd_res(2019, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2020, - &mut national_holidays, [(NaiveDate::from_ymd_res(2020, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2021, - &mut national_holidays, [(NaiveDate::from_ymd_res(2021, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2022, - &mut national_holidays, [(NaiveDate::from_ymd_res(2022, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2023, - &mut national_holidays, [(NaiveDate::from_ymd_res(2023, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2024, - &mut national_holidays, [(NaiveDate::from_ymd_res(2024, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2025, - &mut national_holidays, [(NaiveDate::from_ymd_res(2025, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2026, - &mut national_holidays, [(NaiveDate::from_ymd_res(2026, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2027, - &mut national_holidays, [(NaiveDate::from_ymd_res(2027, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2028, - &mut national_holidays, [(NaiveDate::from_ymd_res(2028, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2029, - &mut national_holidays, [(NaiveDate::from_ymd_res(2029, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2030, - &mut national_holidays, [(NaiveDate::from_ymd_res(2030, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, diff --git a/src/data/de_sl.rs b/src/data/de_sl.rs index 304684d..be100eb 100644 --- a/src/data/de_sl.rs +++ b/src/data/de_sl.rs @@ -12,15 +12,14 @@ const COUNTY_CODE: Country = Country::DE_SL; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); let mut national_holidays = de::build(years)?; - build_subdivision_year( + build_year( years, 2000, - &mut national_holidays, [ (NaiveDate::from_ymd_res(2000, 6, 22)?, "Fronleichnam"), (NaiveDate::from_ymd_res(2000, 8, 15)?, "Mariä Himmelfahrt"), @@ -31,10 +30,9 @@ pub fn build(years: Option<&std::ops::Range>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); let mut national_holidays = de::build(years)?; - build_subdivision_year( + build_year( years, 2000, - &mut national_holidays, [ (NaiveDate::from_ymd_res(2000, 10, 31)?, "Reformationstag"), (NaiveDate::from_ymd_res(2000, 11, 22)?, "Buß- und Bettag"), @@ -30,10 +29,9 @@ pub fn build(years: Option<&std::ops::Range>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); let mut national_holidays = de::build(years)?; - build_subdivision_year( + build_year( years, 2000, - &mut national_holidays, [ (NaiveDate::from_ymd_res(2000, 1, 6)?, "Heilige Drei Könige"), (NaiveDate::from_ymd_res(2000, 10, 31)?, "Reformationstag"), @@ -30,10 +29,9 @@ pub fn build(years: Option<&std::ops::Range>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); let mut national_holidays = de::build(years)?; - build_subdivision_year( + build_year( years, 2000, - &mut national_holidays, [(NaiveDate::from_ymd_res(2000, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2001, - &mut national_holidays, [(NaiveDate::from_ymd_res(2001, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2002, - &mut national_holidays, [(NaiveDate::from_ymd_res(2002, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2003, - &mut national_holidays, [(NaiveDate::from_ymd_res(2003, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2004, - &mut national_holidays, [(NaiveDate::from_ymd_res(2004, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2005, - &mut national_holidays, [(NaiveDate::from_ymd_res(2005, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2006, - &mut national_holidays, [(NaiveDate::from_ymd_res(2006, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2007, - &mut national_holidays, [(NaiveDate::from_ymd_res(2007, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2008, - &mut national_holidays, [(NaiveDate::from_ymd_res(2008, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2009, - &mut national_holidays, [(NaiveDate::from_ymd_res(2009, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2010, - &mut national_holidays, [(NaiveDate::from_ymd_res(2010, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2011, - &mut national_holidays, [(NaiveDate::from_ymd_res(2011, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2012, - &mut national_holidays, [(NaiveDate::from_ymd_res(2012, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2013, - &mut national_holidays, [(NaiveDate::from_ymd_res(2013, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2014, - &mut national_holidays, [(NaiveDate::from_ymd_res(2014, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2015, - &mut national_holidays, [(NaiveDate::from_ymd_res(2015, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2016, - &mut national_holidays, [(NaiveDate::from_ymd_res(2016, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( - years, - 2017, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2017, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( + build_year( years, 2018, - &mut national_holidays, [(NaiveDate::from_ymd_res(2018, 10, 31)?, "Reformationstag")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2019, - &mut national_holidays, [ (NaiveDate::from_ymd_res(2019, 9, 20)?, "Weltkindertag"), (NaiveDate::from_ymd_res(2019, 10, 31)?, "Reformationstag"), @@ -220,10 +193,9 @@ pub fn build(years: Option<&std::ops::Range>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/dk.rs b/src/data/dk.rs index 9886bb0..0905f66 100644 --- a/src/data/dk.rs +++ b/src/data/dk.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::DK; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/do.rs b/src/data/do.rs index ea174c3..c118e7f 100644 --- a/src/data/do.rs +++ b/src/data/do.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::DO; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/ee.rs b/src/data/ee.rs index cabb404..1be87d1 100644 --- a/src/data/ee.rs +++ b/src/data/ee.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::EE; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/eg.rs b/src/data/eg.rs index 9b24ceb..60c84b3 100644 --- a/src/data/eg.rs +++ b/src/data/eg.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::EG; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/es.rs b/src/data/es.rs index 8358d8e..3de5d3d 100644 --- a/src/data/es.rs +++ b/src/data/es.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::ES; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/et.rs b/src/data/et.rs index 199bb82..10d9643 100644 --- a/src/data/et.rs +++ b/src/data/et.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::ET; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/fi.rs b/src/data/fi.rs index 42148e7..ad80182 100644 --- a/src/data/fi.rs +++ b/src/data/fi.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::FI; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/fr.rs b/src/data/fr.rs index 6b35bd7..2b817ef 100644 --- a/src/data/fr.rs +++ b/src/data/fr.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::FR; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/gb.rs b/src/data/gb.rs index a6207b3..bf33124 100644 --- a/src/data/gb.rs +++ b/src/data/gb.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::GB; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/ge.rs b/src/data/ge.rs index b8523cb..48117ae 100644 --- a/src/data/ge.rs +++ b/src/data/ge.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::GE; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/gr.rs b/src/data/gr.rs index 9f0491e..20167ac 100644 --- a/src/data/gr.rs +++ b/src/data/gr.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::GR; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/helper.rs b/src/data/helper.rs index c964318..bc17777 100644 --- a/src/data/helper.rs +++ b/src/data/helper.rs @@ -1,6 +1,6 @@ use chrono::NaiveDate; -use crate::{prelude::*, Holiday, HolidayPerCountryMap, Year}; +use crate::{prelude::*, Holiday, HolidayPerYearMap, Year}; pub fn should_build_year(years: Option<&std::ops::Range>, year: Year) -> bool { years.map_or(true, |r| r.contains(&year)) @@ -11,7 +11,7 @@ pub fn build_year( years: Option<&std::ops::Range>, year: Year, holidays: impl IntoIterator, - map: &mut HolidayPerCountryMap, + map: &mut HolidayPerYearMap, country: Country, county_name: &(impl ToString + ?Sized), ) { @@ -31,32 +31,3 @@ pub fn build_year( map.insert(year, m); } - -#[allow(clippy::needless_pass_by_value)] -pub fn build_subdivision_year( - years: Option<&std::ops::Range>, - year: Year, - national_holidays: &mut HolidayPerCountryMap, - subdivision_holidays: impl IntoIterator, - map: &mut HolidayPerCountryMap, - country: Country, - county_name: &(impl ToString + ?Sized), -) { - if !should_build_year(years, year) { - return; - } - - let m = national_holidays - .remove(&year) - .unwrap_or_default() - .into_iter() - .chain(subdivision_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 index 7ba8b85..583192a 100644 --- a/src/data/hk.rs +++ b/src/data/hk.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::HK; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/hn.rs b/src/data/hn.rs index f8098a1..3e60a89 100644 --- a/src/data/hn.rs +++ b/src/data/hn.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::HN; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/hr.rs b/src/data/hr.rs index 46a24f9..329c4f4 100644 --- a/src/data/hr.rs +++ b/src/data/hr.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::HR; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/hu.rs b/src/data/hu.rs index fdf84c0..cf7eebf 100644 --- a/src/data/hu.rs +++ b/src/data/hu.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::HU; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/id.rs b/src/data/id.rs index 6b1cdf9..5fe4808 100644 --- a/src/data/id.rs +++ b/src/data/id.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::ID; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/ie.rs b/src/data/ie.rs index 18e39b3..9592ab1 100644 --- a/src/data/ie.rs +++ b/src/data/ie.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::IE; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/il.rs b/src/data/il.rs index 0cbbd13..30724fd 100644 --- a/src/data/il.rs +++ b/src/data/il.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::IL; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/im.rs b/src/data/im.rs index 2e1613f..7cc8925 100644 --- a/src/data/im.rs +++ b/src/data/im.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::IM; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/in.rs b/src/data/in.rs index 86c0d99..fd2a716 100644 --- a/src/data/in.rs +++ b/src/data/in.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::IN; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/is.rs b/src/data/is.rs index 13074b1..93db4ac 100644 --- a/src/data/is.rs +++ b/src/data/is.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::IS; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/it.rs b/src/data/it.rs index cfd11fe..fa1997a 100644 --- a/src/data/it.rs +++ b/src/data/it.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::IT; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/jm.rs b/src/data/jm.rs index 0755057..6a2b4e6 100644 --- a/src/data/jm.rs +++ b/src/data/jm.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::JM; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/jp.rs b/src/data/jp.rs index 134d409..6b9377c 100644 --- a/src/data/jp.rs +++ b/src/data/jp.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::JP; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/ke.rs b/src/data/ke.rs index a0adef2..2d5ebbe 100644 --- a/src/data/ke.rs +++ b/src/data/ke.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::KE; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/kr.rs b/src/data/kr.rs index df735f8..d380b1d 100644 --- a/src/data/kr.rs +++ b/src/data/kr.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::KR; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/kz.rs b/src/data/kz.rs index a197410..23a47e9 100644 --- a/src/data/kz.rs +++ b/src/data/kz.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::KZ; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/li.rs b/src/data/li.rs index f5b308d..d85bde3 100644 --- a/src/data/li.rs +++ b/src/data/li.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::LI; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/ls.rs b/src/data/ls.rs index 63a7e0b..3090ac2 100644 --- a/src/data/ls.rs +++ b/src/data/ls.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::LS; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/lt.rs b/src/data/lt.rs index 0fdf4e1..b5867b4 100644 --- a/src/data/lt.rs +++ b/src/data/lt.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::LT; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/lu.rs b/src/data/lu.rs index d6a8ce1..b7d6a1f 100644 --- a/src/data/lu.rs +++ b/src/data/lu.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::LU; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/lv.rs b/src/data/lv.rs index 71b1616..4ef05ed 100644 --- a/src/data/lv.rs +++ b/src/data/lv.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::LV; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/ma.rs b/src/data/ma.rs index d8b293a..c683eb6 100644 --- a/src/data/ma.rs +++ b/src/data/ma.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::MA; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/md.rs b/src/data/md.rs index 04f9449..3784c3e 100644 --- a/src/data/md.rs +++ b/src/data/md.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::MD; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/mg.rs b/src/data/mg.rs index 8ffbb33..6d80fc1 100644 --- a/src/data/mg.rs +++ b/src/data/mg.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::MG; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/mk.rs b/src/data/mk.rs index 9f508e2..1014715 100644 --- a/src/data/mk.rs +++ b/src/data/mk.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::MK; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/mod.rs b/src/data/mod.rs index c96817c..bb96c1d 100644 --- a/src/data/mod.rs +++ b/src/data/mod.rs @@ -1,7 +1,7 @@ mod helper; -use crate::{prelude::*, HolidayPerCountryMap, NaiveDateExt, Result, Year}; -use helper::{build_subdivision_year, build_year}; +use crate::{prelude::*, HolidayPerYearMap, NaiveDateExt, Result, Year}; +use helper::build_year; use chrono::NaiveDate; use std::collections::HashMap; diff --git a/src/data/mt.rs b/src/data/mt.rs index 9c64341..cc85b1b 100644 --- a/src/data/mt.rs +++ b/src/data/mt.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::MT; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/mw.rs b/src/data/mw.rs index 7919a4a..858651a 100644 --- a/src/data/mw.rs +++ b/src/data/mw.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::MW; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/mx.rs b/src/data/mx.rs index 1203b1c..0773be1 100644 --- a/src/data/mx.rs +++ b/src/data/mx.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::MX; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/my.rs b/src/data/my.rs index 4cbfaee..3d00e3c 100644 --- a/src/data/my.rs +++ b/src/data/my.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::MY; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/mz.rs b/src/data/mz.rs index 27ff951..b75c403 100644 --- a/src/data/mz.rs +++ b/src/data/mz.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::MZ; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/na.rs b/src/data/na.rs index eab5669..9c5d645 100644 --- a/src/data/na.rs +++ b/src/data/na.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::NA; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/ng.rs b/src/data/ng.rs index e3463de..2c7e77d 100644 --- a/src/data/ng.rs +++ b/src/data/ng.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::NG; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/ni.rs b/src/data/ni.rs index 5031b4f..c7bcb86 100644 --- a/src/data/ni.rs +++ b/src/data/ni.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::NI; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/nl.rs b/src/data/nl.rs index bd6904c..414c97f 100644 --- a/src/data/nl.rs +++ b/src/data/nl.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::NL; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/no.rs b/src/data/no.rs index ce02bf9..658d016 100644 --- a/src/data/no.rs +++ b/src/data/no.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::NO; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/nz.rs b/src/data/nz.rs index 1d396d2..42ea6b6 100644 --- a/src/data/nz.rs +++ b/src/data/nz.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::NZ; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/pe.rs b/src/data/pe.rs index 11cd867..0fedbd4 100644 --- a/src/data/pe.rs +++ b/src/data/pe.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::PE; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/pk.rs b/src/data/pk.rs index de83ca2..426d2e9 100644 --- a/src/data/pk.rs +++ b/src/data/pk.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::PK; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/pl.rs b/src/data/pl.rs index d840b9e..f0846c4 100644 --- a/src/data/pl.rs +++ b/src/data/pl.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::PL; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/pt.rs b/src/data/pt.rs index 380d002..da831be 100644 --- a/src/data/pt.rs +++ b/src/data/pt.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::PT; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/py.rs b/src/data/py.rs index ed174b1..3d18c49 100644 --- a/src/data/py.rs +++ b/src/data/py.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::PY; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/ro.rs b/src/data/ro.rs index c3b9acf..7665572 100644 --- a/src/data/ro.rs +++ b/src/data/ro.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::RO; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/rs.rs b/src/data/rs.rs index 095c402..37a189e 100644 --- a/src/data/rs.rs +++ b/src/data/rs.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::RS; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/ru.rs b/src/data/ru.rs index c124d58..96e0aad 100644 --- a/src/data/ru.rs +++ b/src/data/ru.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::RU; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/sa.rs b/src/data/sa.rs index 7c00907..d78c5fb 100644 --- a/src/data/sa.rs +++ b/src/data/sa.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::SA; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/se.rs b/src/data/se.rs index e77b1a5..9cd5e95 100644 --- a/src/data/se.rs +++ b/src/data/se.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::SE; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/sg.rs b/src/data/sg.rs index a27741b..b4f1e2b 100644 --- a/src/data/sg.rs +++ b/src/data/sg.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::SG; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/si.rs b/src/data/si.rs index b42b23c..64c95e0 100644 --- a/src/data/si.rs +++ b/src/data/si.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::SI; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/sk.rs b/src/data/sk.rs index 5e91d2e..2fac5bf 100644 --- a/src/data/sk.rs +++ b/src/data/sk.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::SK; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/sz.rs b/src/data/sz.rs index 83dfc14..edf5e89 100644 --- a/src/data/sz.rs +++ b/src/data/sz.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::SZ; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/tn.rs b/src/data/tn.rs index 27e06d8..b6d4b4b 100644 --- a/src/data/tn.rs +++ b/src/data/tn.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::TN; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/tr.rs b/src/data/tr.rs index b1890f5..b42f99f 100644 --- a/src/data/tr.rs +++ b/src/data/tr.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::TR; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/tw.rs b/src/data/tw.rs index 96f42e7..7485a4f 100644 --- a/src/data/tw.rs +++ b/src/data/tw.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::TW; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/ua.rs b/src/data/ua.rs index 7924953..691aacf 100644 --- a/src/data/ua.rs +++ b/src/data/ua.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::UA; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/us.rs b/src/data/us.rs index 89e2fec..fb06f93 100644 --- a/src/data/us.rs +++ b/src/data/us.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::US; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/us_ak.rs b/src/data/us_ak.rs index ecd8a1a..aa6d4a7 100644 --- a/src/data/us_ak.rs +++ b/src/data/us_ak.rs @@ -12,15 +12,14 @@ const COUNTY_CODE: Country = Country::US_AK; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); let mut national_holidays = de::build(years)?; - build_subdivision_year( + build_year( years, 2000, - &mut national_holidays, [ (NaiveDate::from_ymd_res(2000, 3, 27)?, "Seward's Day"), (NaiveDate::from_ymd_res(2000, 10, 18)?, "Alaska Day"), @@ -30,10 +29,9 @@ pub fn build(years: Option<&std::ops::Range>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); let mut national_holidays = de::build(years)?; - build_subdivision_year( + build_year( years, 2000, - &mut national_holidays, [ ( NaiveDate::from_ymd_res(2000, 4, 24)?, @@ -36,10 +35,9 @@ pub fn build(years: Option<&std::ops::Range>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); let mut national_holidays = de::build(years)?; - build_subdivision_year( - years, - 2000, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2001, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2002, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2003, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2004, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2005, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2006, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2007, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2008, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2009, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2010, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2011, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2012, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2013, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2014, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2015, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2016, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2017, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2018, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2019, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2020, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2021, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2022, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2023, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2024, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2025, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2026, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2027, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2028, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2029, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2030, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2000, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2001, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2002, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2003, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2004, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2005, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2006, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2007, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2008, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2009, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2010, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2011, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2012, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2013, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2014, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2015, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2016, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2017, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2018, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2019, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2020, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2021, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2022, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2023, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2024, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2025, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2026, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2027, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2028, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2029, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2030, [], &mut map, COUNTY_CODE, COUNTY_NAME); Ok(map) } diff --git a/src/data/us_as.rs b/src/data/us_as.rs index 1ac2a8e..c6c1e9d 100644 --- a/src/data/us_as.rs +++ b/src/data/us_as.rs @@ -12,15 +12,14 @@ const COUNTY_CODE: Country = Country::US_AS; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); let mut national_holidays = de::build(years)?; - build_subdivision_year( + build_year( years, 2000, - &mut national_holidays, [ (NaiveDate::from_ymd_res(2000, 12, 24)?, "Christmas Eve"), ( @@ -33,40 +32,36 @@ pub fn build(years: Option<&std::ops::Range>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); let mut national_holidays = de::build(years)?; - build_subdivision_year( - years, - 2000, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2001, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2002, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2003, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2004, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2005, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2006, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2007, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2008, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2009, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2010, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2011, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2012, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2013, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2014, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2015, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2016, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2017, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2018, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2019, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2020, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2021, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2022, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2023, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2024, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2025, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2026, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2027, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2028, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2029, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2030, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2000, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2001, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2002, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2003, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2004, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2005, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2006, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2007, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2008, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2009, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2010, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2011, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2012, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2013, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2014, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2015, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2016, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2017, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2018, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2019, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2020, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2021, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2022, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2023, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2024, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2025, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2026, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2027, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2028, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2029, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2030, [], &mut map, COUNTY_CODE, COUNTY_NAME); Ok(map) } diff --git a/src/data/us_ca.rs b/src/data/us_ca.rs index 715d2c5..80caf29 100644 --- a/src/data/us_ca.rs +++ b/src/data/us_ca.rs @@ -12,15 +12,14 @@ const COUNTY_CODE: Country = Country::US_CA; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); let mut national_holidays = de::build(years)?; - build_subdivision_year( + build_year( years, 2000, - &mut national_holidays, [ (NaiveDate::from_ymd_res(2000, 2, 12)?, "Lincoln's Birthday"), ( @@ -38,10 +37,9 @@ pub fn build(years: Option<&std::ops::Range>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); let mut national_holidays = de::build(years)?; - build_subdivision_year( - years, - 2000, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2000, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( + build_year( years, 2001, - &mut national_holidays, [(NaiveDate::from_ymd_res(2001, 3, 31)?, "Cesar Chavez Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2002, - &mut national_holidays, [(NaiveDate::from_ymd_res(2002, 3, 31)?, "Cesar Chavez Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2003, - &mut national_holidays, [(NaiveDate::from_ymd_res(2003, 3, 31)?, "Cesar Chavez Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2004, - &mut national_holidays, [(NaiveDate::from_ymd_res(2004, 3, 31)?, "Cesar Chavez Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2005, - &mut national_holidays, [(NaiveDate::from_ymd_res(2005, 3, 31)?, "Cesar Chavez Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2006, - &mut national_holidays, [(NaiveDate::from_ymd_res(2006, 3, 31)?, "Cesar Chavez Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2007, - &mut national_holidays, [(NaiveDate::from_ymd_res(2007, 3, 31)?, "Cesar Chavez Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2008, - &mut national_holidays, [(NaiveDate::from_ymd_res(2008, 3, 31)?, "Cesar Chavez Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2009, - &mut national_holidays, [(NaiveDate::from_ymd_res(2009, 3, 31)?, "Cesar Chavez Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2010, - &mut national_holidays, [(NaiveDate::from_ymd_res(2010, 3, 31)?, "Cesar Chavez Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2011, - &mut national_holidays, [(NaiveDate::from_ymd_res(2011, 3, 31)?, "Cesar Chavez Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2012, - &mut national_holidays, [(NaiveDate::from_ymd_res(2012, 3, 31)?, "Cesar Chavez Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2013, - &mut national_holidays, [(NaiveDate::from_ymd_res(2013, 3, 31)?, "Cesar Chavez Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2014, - &mut national_holidays, [(NaiveDate::from_ymd_res(2014, 3, 31)?, "Cesar Chavez Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2015, - &mut national_holidays, [(NaiveDate::from_ymd_res(2015, 3, 31)?, "Cesar Chavez Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2016, - &mut national_holidays, [(NaiveDate::from_ymd_res(2016, 3, 31)?, "Cesar Chavez Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2017, - &mut national_holidays, [(NaiveDate::from_ymd_res(2017, 3, 31)?, "Cesar Chavez Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2018, - &mut national_holidays, [(NaiveDate::from_ymd_res(2018, 3, 31)?, "Cesar Chavez Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2019, - &mut national_holidays, [(NaiveDate::from_ymd_res(2019, 3, 31)?, "Cesar Chavez Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2020, - &mut national_holidays, [(NaiveDate::from_ymd_res(2020, 3, 31)?, "Cesar Chavez Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2021, - &mut national_holidays, [(NaiveDate::from_ymd_res(2021, 3, 31)?, "Cesar Chavez Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2022, - &mut national_holidays, [(NaiveDate::from_ymd_res(2022, 3, 31)?, "Cesar Chavez Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2023, - &mut national_holidays, [(NaiveDate::from_ymd_res(2023, 3, 31)?, "Cesar Chavez Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2024, - &mut national_holidays, [(NaiveDate::from_ymd_res(2024, 3, 31)?, "Cesar Chavez Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2025, - &mut national_holidays, [(NaiveDate::from_ymd_res(2025, 3, 31)?, "Cesar Chavez Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2026, - &mut national_holidays, [(NaiveDate::from_ymd_res(2026, 3, 31)?, "Cesar Chavez Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2027, - &mut national_holidays, [(NaiveDate::from_ymd_res(2027, 3, 31)?, "Cesar Chavez Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2028, - &mut national_holidays, [(NaiveDate::from_ymd_res(2028, 3, 31)?, "Cesar Chavez Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2029, - &mut national_holidays, [(NaiveDate::from_ymd_res(2029, 3, 31)?, "Cesar Chavez Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2030, - &mut national_holidays, [(NaiveDate::from_ymd_res(2030, 3, 31)?, "Cesar Chavez Day")], &mut map, COUNTY_CODE, diff --git a/src/data/us_ct.rs b/src/data/us_ct.rs index 624c4b2..7240bb6 100644 --- a/src/data/us_ct.rs +++ b/src/data/us_ct.rs @@ -12,15 +12,14 @@ const COUNTY_CODE: Country = Country::US_CT; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); let mut national_holidays = de::build(years)?; - build_subdivision_year( + build_year( years, 2000, - &mut national_holidays, [ (NaiveDate::from_ymd_res(2000, 2, 12)?, "Lincoln's Birthday"), ( @@ -34,10 +33,9 @@ pub fn build(years: Option<&std::ops::Range>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); let mut national_holidays = de::build(years)?; - build_subdivision_year( - years, - 2000, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2000, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( + build_year( years, 2001, - &mut national_holidays, [(NaiveDate::from_ymd_res(2001, 1, 20)?, "Inauguration Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( - years, - 2002, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2002, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2003, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2003, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2004, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2004, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( + build_year( years, 2005, - &mut national_holidays, [ (NaiveDate::from_ymd_res(2005, 1, 20)?, "Inauguration Day"), (NaiveDate::from_ymd_res(2005, 4, 16)?, "Emancipation Day"), @@ -84,10 +50,9 @@ pub fn build(years: Option<&std::ops::Range>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); let mut national_holidays = de::build(years)?; - build_subdivision_year( + build_year( years, 2000, - &mut national_holidays, [ (NaiveDate::from_ymd_res(2000, 4, 21)?, "Good Friday"), ( @@ -33,10 +32,9 @@ pub fn build(years: Option<&std::ops::Range>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); let mut national_holidays = de::build(years)?; - build_subdivision_year( + build_year( years, 2000, - &mut national_holidays, [( NaiveDate::from_ymd_res(2000, 11, 24)?, "Friday After Thanksgiving", @@ -30,10 +29,9 @@ pub fn build(years: Option<&std::ops::Range>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); let mut national_holidays = de::build(years)?; - build_subdivision_year( + build_year( years, 2000, - &mut national_holidays, [ ( NaiveDate::from_ymd_res(2000, 4, 24)?, @@ -40,10 +39,9 @@ pub fn build(years: Option<&std::ops::Range>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); let mut national_holidays = de::build(years)?; - build_subdivision_year( + build_year( years, 2000, - &mut national_holidays, [ (NaiveDate::from_ymd_res(2000, 3, 6)?, "Guam Discovery Day"), (NaiveDate::from_ymd_res(2000, 4, 21)?, "Good Friday"), @@ -36,10 +35,9 @@ pub fn build(years: Option<&std::ops::Range>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); let mut national_holidays = de::build(years)?; - build_subdivision_year( + build_year( years, 2000, - &mut national_holidays, [ ( NaiveDate::from_ymd_res(2000, 3, 26)?, @@ -38,10 +37,9 @@ pub fn build(years: Option<&std::ops::Range>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); let mut national_holidays = de::build(years)?; - build_subdivision_year( + build_year( years, 2000, - &mut national_holidays, [ (NaiveDate::from_ymd_res(2000, 2, 12)?, "Lincoln's Birthday"), ( @@ -33,50 +32,45 @@ pub fn build(years: Option<&std::ops::Range>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); let mut national_holidays = de::build(years)?; - build_subdivision_year( - years, - 2000, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2001, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2002, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2003, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2004, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2005, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2006, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2007, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2008, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2009, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2010, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2011, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2012, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2013, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2014, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2015, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2016, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2017, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2018, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2019, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2020, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2021, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2022, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2023, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2024, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2025, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2026, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2027, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2028, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2029, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2030, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2000, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2001, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2002, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2003, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2004, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2005, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2006, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2007, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2008, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2009, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2010, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2011, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2012, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2013, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2014, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2015, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2016, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2017, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2018, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2019, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2020, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2021, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2022, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2023, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2024, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2025, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2026, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2027, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2028, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2029, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2030, [], &mut map, COUNTY_CODE, COUNTY_NAME); Ok(map) } diff --git a/src/data/us_il.rs b/src/data/us_il.rs index a664d1f..52f7c6f 100644 --- a/src/data/us_il.rs +++ b/src/data/us_il.rs @@ -12,15 +12,14 @@ const COUNTY_CODE: Country = Country::US_IL; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); let mut national_holidays = de::build(years)?; - build_subdivision_year( + build_year( years, 2000, - &mut national_holidays, [ (NaiveDate::from_ymd_res(2000, 2, 12)?, "Lincoln's Birthday"), ( @@ -34,10 +33,9 @@ pub fn build(years: Option<&std::ops::Range>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); let mut national_holidays = de::build(years)?; - build_subdivision_year( + build_year( years, 2000, - &mut national_holidays, [(NaiveDate::from_ymd_res(2000, 4, 21)?, "Good Friday")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2001, - &mut national_holidays, [(NaiveDate::from_ymd_res(2001, 4, 13)?, "Good Friday")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2002, - &mut national_holidays, [(NaiveDate::from_ymd_res(2002, 3, 29)?, "Good Friday")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2003, - &mut national_holidays, [(NaiveDate::from_ymd_res(2003, 4, 18)?, "Good Friday")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2004, - &mut national_holidays, [(NaiveDate::from_ymd_res(2004, 4, 9)?, "Good Friday")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2005, - &mut national_holidays, [(NaiveDate::from_ymd_res(2005, 3, 25)?, "Good Friday")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2006, - &mut national_holidays, [ (NaiveDate::from_ymd_res(2006, 4, 14)?, "Good Friday"), (NaiveDate::from_ymd_res(2006, 5, 2)?, "Primary Election Day"), @@ -90,20 +83,18 @@ pub fn build(years: Option<&std::ops::Range>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); let mut national_holidays = de::build(years)?; - build_subdivision_year( - years, - 2000, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2000, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2001, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2001, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2002, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2002, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2003, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2003, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2004, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2004, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2005, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2005, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2006, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2006, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2007, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2007, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2008, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2008, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2009, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2009, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2010, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2010, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2011, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2011, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2012, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2012, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( + build_year( years, 2013, - &mut national_holidays, [(NaiveDate::from_ymd_res(2013, 12, 24)?, "Christmas Eve")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2014, - &mut national_holidays, [(NaiveDate::from_ymd_res(2014, 12, 24)?, "Christmas Eve")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2015, - &mut national_holidays, [(NaiveDate::from_ymd_res(2015, 12, 24)?, "Christmas Eve")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2016, - &mut national_holidays, [ (NaiveDate::from_ymd_res(2016, 12, 24)?, "Christmas Eve"), ( @@ -193,10 +85,9 @@ pub fn build(years: Option<&std::ops::Range>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); let mut national_holidays = de::build(years)?; - build_subdivision_year( + build_year( years, 2000, - &mut national_holidays, [(NaiveDate::from_ymd_res(2000, 4, 21)?, "Good Friday")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2001, - &mut national_holidays, [(NaiveDate::from_ymd_res(2001, 4, 13)?, "Good Friday")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2002, - &mut national_holidays, [(NaiveDate::from_ymd_res(2002, 3, 29)?, "Good Friday")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2003, - &mut national_holidays, [(NaiveDate::from_ymd_res(2003, 4, 18)?, "Good Friday")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2004, - &mut national_holidays, [(NaiveDate::from_ymd_res(2004, 4, 9)?, "Good Friday")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2005, - &mut national_holidays, [(NaiveDate::from_ymd_res(2005, 3, 25)?, "Good Friday")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2006, - &mut national_holidays, [(NaiveDate::from_ymd_res(2006, 4, 14)?, "Good Friday")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2007, - &mut national_holidays, [(NaiveDate::from_ymd_res(2007, 4, 6)?, "Good Friday")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2008, - &mut national_holidays, [(NaiveDate::from_ymd_res(2008, 3, 21)?, "Good Friday")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2009, - &mut national_holidays, [(NaiveDate::from_ymd_res(2009, 4, 10)?, "Good Friday")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2010, - &mut national_holidays, [(NaiveDate::from_ymd_res(2010, 4, 2)?, "Good Friday")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2011, - &mut national_holidays, [(NaiveDate::from_ymd_res(2011, 4, 22)?, "Good Friday")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2012, - &mut national_holidays, [(NaiveDate::from_ymd_res(2012, 4, 6)?, "Good Friday")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2013, - &mut national_holidays, [ (NaiveDate::from_ymd_res(2013, 3, 29)?, "Good Friday"), (NaiveDate::from_ymd_res(2013, 12, 31)?, "New Year's Eve"), @@ -160,10 +146,9 @@ pub fn build(years: Option<&std::ops::Range>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); let mut national_holidays = de::build(years)?; - build_subdivision_year( + build_year( years, 2000, - &mut national_holidays, [ (NaiveDate::from_ymd_res(2000, 3, 7)?, "Mardi Gras"), (NaiveDate::from_ymd_res(2000, 4, 21)?, "Good Friday"), @@ -30,10 +29,9 @@ pub fn build(years: Option<&std::ops::Range>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); let mut national_holidays = de::build(years)?; - build_subdivision_year( + build_year( years, 2000, - &mut national_holidays, [ (NaiveDate::from_ymd_res(2000, 3, 17)?, "Evacuation Day"), (NaiveDate::from_ymd_res(2000, 4, 17)?, "Patriots' Day"), @@ -30,10 +29,9 @@ pub fn build(years: Option<&std::ops::Range>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); let mut national_holidays = de::build(years)?; - build_subdivision_year( - years, - 2000, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2000, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( + build_year( years, 2001, - &mut national_holidays, [(NaiveDate::from_ymd_res(2001, 1, 20)?, "Inauguration Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( - years, - 2002, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2002, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2003, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2003, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2004, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2004, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( + build_year( years, 2005, - &mut national_holidays, [(NaiveDate::from_ymd_res(2005, 1, 20)?, "Inauguration Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( - years, - 2006, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2006, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2007, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2007, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( + build_year( years, 2008, - &mut national_holidays, [( NaiveDate::from_ymd_res(2008, 11, 28)?, "American Indian Heritage Day", @@ -110,10 +59,9 @@ pub fn build(years: Option<&std::ops::Range>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); let mut national_holidays = de::build(years)?; - build_subdivision_year( + build_year( years, 2000, - &mut national_holidays, [(NaiveDate::from_ymd_res(2000, 4, 17)?, "Patriots' Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2001, - &mut national_holidays, [(NaiveDate::from_ymd_res(2001, 4, 16)?, "Patriots' Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2002, - &mut national_holidays, [(NaiveDate::from_ymd_res(2002, 4, 15)?, "Patriots' Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2003, - &mut national_holidays, [(NaiveDate::from_ymd_res(2003, 4, 21)?, "Patriots' Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2004, - &mut national_holidays, [(NaiveDate::from_ymd_res(2004, 4, 19)?, "Patriots' Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2005, - &mut national_holidays, [(NaiveDate::from_ymd_res(2005, 4, 18)?, "Patriots' Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2006, - &mut national_holidays, [(NaiveDate::from_ymd_res(2006, 4, 17)?, "Patriots' Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2007, - &mut national_holidays, [(NaiveDate::from_ymd_res(2007, 4, 16)?, "Patriots' Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2008, - &mut national_holidays, [(NaiveDate::from_ymd_res(2008, 4, 21)?, "Patriots' Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2009, - &mut national_holidays, [(NaiveDate::from_ymd_res(2009, 4, 20)?, "Patriots' Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2010, - &mut national_holidays, [(NaiveDate::from_ymd_res(2010, 4, 19)?, "Patriots' Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2011, - &mut national_holidays, [(NaiveDate::from_ymd_res(2011, 4, 18)?, "Patriots' Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2012, - &mut national_holidays, [(NaiveDate::from_ymd_res(2012, 4, 16)?, "Patriots' Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2013, - &mut national_holidays, [(NaiveDate::from_ymd_res(2013, 4, 15)?, "Patriots' Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2014, - &mut national_holidays, [(NaiveDate::from_ymd_res(2014, 4, 21)?, "Patriots' Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2015, - &mut national_holidays, [(NaiveDate::from_ymd_res(2015, 4, 20)?, "Patriots' Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2016, - &mut national_holidays, [(NaiveDate::from_ymd_res(2016, 4, 18)?, "Patriots' Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2017, - &mut national_holidays, [(NaiveDate::from_ymd_res(2017, 4, 17)?, "Patriots' Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2018, - &mut national_holidays, [(NaiveDate::from_ymd_res(2018, 4, 16)?, "Patriots' Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2019, - &mut national_holidays, [(NaiveDate::from_ymd_res(2019, 4, 15)?, "Patriots' Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2020, - &mut national_holidays, [(NaiveDate::from_ymd_res(2020, 4, 20)?, "Patriots' Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2021, - &mut national_holidays, [(NaiveDate::from_ymd_res(2021, 4, 19)?, "Patriots' Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2022, - &mut national_holidays, [(NaiveDate::from_ymd_res(2022, 4, 18)?, "Patriots' Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2023, - &mut national_holidays, [(NaiveDate::from_ymd_res(2023, 4, 17)?, "Patriots' Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2024, - &mut national_holidays, [(NaiveDate::from_ymd_res(2024, 4, 15)?, "Patriots' Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2025, - &mut national_holidays, [(NaiveDate::from_ymd_res(2025, 4, 21)?, "Patriots' Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2026, - &mut national_holidays, [(NaiveDate::from_ymd_res(2026, 4, 20)?, "Patriots' Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2027, - &mut national_holidays, [(NaiveDate::from_ymd_res(2027, 4, 19)?, "Patriots' Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2028, - &mut national_holidays, [(NaiveDate::from_ymd_res(2028, 4, 17)?, "Patriots' Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2029, - &mut national_holidays, [(NaiveDate::from_ymd_res(2029, 4, 16)?, "Patriots' Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2030, - &mut national_holidays, [(NaiveDate::from_ymd_res(2030, 4, 15)?, "Patriots' Day")], &mut map, COUNTY_CODE, diff --git a/src/data/us_mi.rs b/src/data/us_mi.rs index 3e36019..767c366 100644 --- a/src/data/us_mi.rs +++ b/src/data/us_mi.rs @@ -12,145 +12,40 @@ const COUNTY_CODE: Country = Country::US_MI; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); let mut national_holidays = de::build(years)?; - build_subdivision_year( - years, - 2000, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2000, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2001, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2001, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2002, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2002, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2003, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2003, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2004, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2004, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2005, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2005, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2006, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2006, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2007, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2007, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2008, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2008, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2009, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2009, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2010, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2010, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2011, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2011, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2012, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2012, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( + build_year( years, 2013, - &mut national_holidays, [ (NaiveDate::from_ymd_res(2013, 12, 24)?, "Christmas Eve"), (NaiveDate::from_ymd_res(2013, 12, 31)?, "New Year's Eve"), @@ -160,10 +55,9 @@ pub fn build(years: Option<&std::ops::Range>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); let mut national_holidays = de::build(years)?; - build_subdivision_year( - years, - 2000, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2001, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2002, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2003, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2004, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2005, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2006, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2007, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2008, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2009, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2010, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2011, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2012, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2013, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2014, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2015, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2016, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2017, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2018, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2019, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2020, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2021, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2022, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2023, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2024, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2025, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2026, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2027, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2028, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2029, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2030, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2000, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2001, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2002, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2003, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2004, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2005, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2006, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2007, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2008, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2009, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2010, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2011, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2012, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2013, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2014, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2015, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2016, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2017, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2018, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2019, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2020, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2021, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2022, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2023, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2024, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2025, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2026, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2027, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2028, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2029, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2030, [], &mut map, COUNTY_CODE, COUNTY_NAME); Ok(map) } diff --git a/src/data/us_mo.rs b/src/data/us_mo.rs index 754462f..4c91baf 100644 --- a/src/data/us_mo.rs +++ b/src/data/us_mo.rs @@ -12,55 +12,50 @@ const COUNTY_CODE: Country = Country::US_MO; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); let mut national_holidays = de::build(years)?; - build_subdivision_year( + build_year( years, 2000, - &mut national_holidays, [(NaiveDate::from_ymd_res(2000, 5, 8)?, "Truman Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2001, - &mut national_holidays, [(NaiveDate::from_ymd_res(2001, 5, 8)?, "Truman Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2002, - &mut national_holidays, [(NaiveDate::from_ymd_res(2002, 5, 8)?, "Truman Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2003, - &mut national_holidays, [(NaiveDate::from_ymd_res(2003, 5, 8)?, "Truman Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2004, - &mut national_holidays, [ (NaiveDate::from_ymd_res(2004, 5, 8)?, "Truman Day"), ( @@ -73,10 +68,9 @@ pub fn build(years: Option<&std::ops::Range>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); let mut national_holidays = de::build(years)?; - build_subdivision_year( + build_year( years, 2000, - &mut national_holidays, [ ( NaiveDate::from_ymd_res(2000, 3, 24)?, @@ -39,10 +38,9 @@ pub fn build(years: Option<&std::ops::Range>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); let mut national_holidays = de::build(years)?; - build_subdivision_year( + build_year( years, 2000, - &mut national_holidays, [( NaiveDate::from_ymd_res(2000, 4, 24)?, "Confederate Memorial Day", @@ -30,10 +29,9 @@ pub fn build(years: Option<&std::ops::Range>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); let mut national_holidays = de::build(years)?; - build_subdivision_year( - years, - 2000, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2000, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2001, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2001, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2002, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2002, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2003, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2003, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2004, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2004, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2005, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2005, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2006, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2006, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( - years, - 2007, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2007, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( + build_year( years, 2008, - &mut national_holidays, [(NaiveDate::from_ymd_res(2008, 11, 4)?, "Election Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( - years, - 2009, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2009, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( + build_year( years, 2010, - &mut national_holidays, [(NaiveDate::from_ymd_res(2010, 11, 2)?, "Election Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( - years, - 2011, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2011, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( + build_year( years, 2012, - &mut national_holidays, [(NaiveDate::from_ymd_res(2012, 11, 6)?, "Election Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( - years, - 2013, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2013, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( + build_year( years, 2014, - &mut national_holidays, [(NaiveDate::from_ymd_res(2014, 11, 4)?, "Election Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( - years, - 2015, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2015, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( + build_year( years, 2016, - &mut national_holidays, [(NaiveDate::from_ymd_res(2016, 11, 8)?, "Election Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( - years, - 2017, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2017, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( + build_year( years, 2018, - &mut national_holidays, [(NaiveDate::from_ymd_res(2018, 11, 6)?, "Election Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( - years, - 2019, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2019, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( + build_year( years, 2020, - &mut national_holidays, [(NaiveDate::from_ymd_res(2020, 11, 3)?, "Election Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( - years, - 2021, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2021, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( + build_year( years, 2022, - &mut national_holidays, [(NaiveDate::from_ymd_res(2022, 11, 8)?, "Election Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( - years, - 2023, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2023, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( + build_year( years, 2024, - &mut national_holidays, [(NaiveDate::from_ymd_res(2024, 11, 5)?, "Election Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( - years, - 2025, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2025, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( + build_year( years, 2026, - &mut national_holidays, [(NaiveDate::from_ymd_res(2026, 11, 3)?, "Election Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( - years, - 2027, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2027, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( + build_year( years, 2028, - &mut national_holidays, [(NaiveDate::from_ymd_res(2028, 11, 7)?, "Election Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( - years, - 2029, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2029, [], &mut map, COUNTY_CODE, COUNTY_NAME); - build_subdivision_year( + build_year( years, 2030, - &mut national_holidays, [(NaiveDate::from_ymd_res(2030, 11, 5)?, "Election Day")], &mut map, COUNTY_CODE, diff --git a/src/data/us_nc.rs b/src/data/us_nc.rs index ca38724..5fb021b 100644 --- a/src/data/us_nc.rs +++ b/src/data/us_nc.rs @@ -12,15 +12,14 @@ const COUNTY_CODE: Country = Country::US_NC; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); let mut national_holidays = de::build(years)?; - build_subdivision_year( + build_year( years, 2000, - &mut national_holidays, [ (NaiveDate::from_ymd_res(2000, 4, 21)?, "Good Friday"), ( @@ -33,10 +32,9 @@ pub fn build(years: Option<&std::ops::Range>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); let mut national_holidays = de::build(years)?; - build_subdivision_year( - years, - 2000, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2001, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2002, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2003, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2004, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2005, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2006, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2007, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2008, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2009, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2010, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2011, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2012, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2013, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2014, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2015, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2016, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2017, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2018, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2019, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2020, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2021, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2022, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2023, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2024, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2025, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2026, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2027, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2028, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2029, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2030, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2000, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2001, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2002, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2003, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2004, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2005, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2006, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2007, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2008, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2009, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2010, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2011, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2012, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2013, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2014, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2015, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2016, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2017, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2018, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2019, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2020, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2021, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2022, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2023, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2024, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2025, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2026, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2027, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2028, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2029, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2030, [], &mut map, COUNTY_CODE, COUNTY_NAME); Ok(map) } diff --git a/src/data/us_ne.rs b/src/data/us_ne.rs index 11fdd14..d885411 100644 --- a/src/data/us_ne.rs +++ b/src/data/us_ne.rs @@ -12,315 +12,284 @@ const COUNTY_CODE: Country = Country::US_NE; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); let mut national_holidays = de::build(years)?; - build_subdivision_year( + build_year( years, 2000, - &mut national_holidays, [(NaiveDate::from_ymd_res(2000, 4, 28)?, "Arbor Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2001, - &mut national_holidays, [(NaiveDate::from_ymd_res(2001, 4, 27)?, "Arbor Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2002, - &mut national_holidays, [(NaiveDate::from_ymd_res(2002, 4, 26)?, "Arbor Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2003, - &mut national_holidays, [(NaiveDate::from_ymd_res(2003, 4, 25)?, "Arbor Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2004, - &mut national_holidays, [(NaiveDate::from_ymd_res(2004, 4, 30)?, "Arbor Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2005, - &mut national_holidays, [(NaiveDate::from_ymd_res(2005, 4, 29)?, "Arbor Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2006, - &mut national_holidays, [(NaiveDate::from_ymd_res(2006, 4, 28)?, "Arbor Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2007, - &mut national_holidays, [(NaiveDate::from_ymd_res(2007, 4, 27)?, "Arbor Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2008, - &mut national_holidays, [(NaiveDate::from_ymd_res(2008, 4, 25)?, "Arbor Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2009, - &mut national_holidays, [(NaiveDate::from_ymd_res(2009, 4, 24)?, "Arbor Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2010, - &mut national_holidays, [(NaiveDate::from_ymd_res(2010, 4, 30)?, "Arbor Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2011, - &mut national_holidays, [(NaiveDate::from_ymd_res(2011, 4, 29)?, "Arbor Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2012, - &mut national_holidays, [(NaiveDate::from_ymd_res(2012, 4, 27)?, "Arbor Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2013, - &mut national_holidays, [(NaiveDate::from_ymd_res(2013, 4, 26)?, "Arbor Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2014, - &mut national_holidays, [(NaiveDate::from_ymd_res(2014, 4, 25)?, "Arbor Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2015, - &mut national_holidays, [(NaiveDate::from_ymd_res(2015, 4, 24)?, "Arbor Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2016, - &mut national_holidays, [(NaiveDate::from_ymd_res(2016, 4, 29)?, "Arbor Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2017, - &mut national_holidays, [(NaiveDate::from_ymd_res(2017, 4, 28)?, "Arbor Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2018, - &mut national_holidays, [(NaiveDate::from_ymd_res(2018, 4, 27)?, "Arbor Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2019, - &mut national_holidays, [(NaiveDate::from_ymd_res(2019, 4, 26)?, "Arbor Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2020, - &mut national_holidays, [(NaiveDate::from_ymd_res(2020, 4, 24)?, "Arbor Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2021, - &mut national_holidays, [(NaiveDate::from_ymd_res(2021, 4, 30)?, "Arbor Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2022, - &mut national_holidays, [(NaiveDate::from_ymd_res(2022, 4, 29)?, "Arbor Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2023, - &mut national_holidays, [(NaiveDate::from_ymd_res(2023, 4, 28)?, "Arbor Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2024, - &mut national_holidays, [(NaiveDate::from_ymd_res(2024, 4, 26)?, "Arbor Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2025, - &mut national_holidays, [(NaiveDate::from_ymd_res(2025, 4, 25)?, "Arbor Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2026, - &mut national_holidays, [(NaiveDate::from_ymd_res(2026, 4, 24)?, "Arbor Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2027, - &mut national_holidays, [(NaiveDate::from_ymd_res(2027, 4, 30)?, "Arbor Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2028, - &mut national_holidays, [(NaiveDate::from_ymd_res(2028, 4, 28)?, "Arbor Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2029, - &mut national_holidays, [(NaiveDate::from_ymd_res(2029, 4, 27)?, "Arbor Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2030, - &mut national_holidays, [(NaiveDate::from_ymd_res(2030, 4, 26)?, "Arbor Day")], &mut map, COUNTY_CODE, diff --git a/src/data/us_nh.rs b/src/data/us_nh.rs index c8a9a11..9c8417a 100644 --- a/src/data/us_nh.rs +++ b/src/data/us_nh.rs @@ -12,15 +12,14 @@ const COUNTY_CODE: Country = Country::US_NH; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); let mut national_holidays = de::build(years)?; - build_subdivision_year( + build_year( years, 2000, - &mut national_holidays, [( NaiveDate::from_ymd_res(2000, 11, 24)?, "Day After Thanksgiving", @@ -30,10 +29,9 @@ pub fn build(years: Option<&std::ops::Range>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); let mut national_holidays = de::build(years)?; - build_subdivision_year( + build_year( years, 2000, - &mut national_holidays, [ (NaiveDate::from_ymd_res(2000, 2, 12)?, "Lincoln's Birthday"), ( @@ -34,10 +33,9 @@ pub fn build(years: Option<&std::ops::Range>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); let mut national_holidays = de::build(years)?; - build_subdivision_year( + build_year( years, 2000, - &mut national_holidays, [(NaiveDate::from_ymd_res(2000, 11, 24)?, "Presidents' Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2001, - &mut national_holidays, [(NaiveDate::from_ymd_res(2001, 11, 23)?, "Presidents' Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2002, - &mut national_holidays, [(NaiveDate::from_ymd_res(2002, 11, 29)?, "Presidents' Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2003, - &mut national_holidays, [(NaiveDate::from_ymd_res(2003, 11, 28)?, "Presidents' Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2004, - &mut national_holidays, [(NaiveDate::from_ymd_res(2004, 11, 26)?, "Presidents' Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2005, - &mut national_holidays, [(NaiveDate::from_ymd_res(2005, 11, 25)?, "Presidents' Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2006, - &mut national_holidays, [(NaiveDate::from_ymd_res(2006, 11, 24)?, "Presidents' Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2007, - &mut national_holidays, [(NaiveDate::from_ymd_res(2007, 11, 23)?, "Presidents' Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2008, - &mut national_holidays, [(NaiveDate::from_ymd_res(2008, 11, 28)?, "Presidents' Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2009, - &mut national_holidays, [(NaiveDate::from_ymd_res(2009, 11, 27)?, "Presidents' Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2010, - &mut national_holidays, [(NaiveDate::from_ymd_res(2010, 11, 26)?, "Presidents' Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2011, - &mut national_holidays, [(NaiveDate::from_ymd_res(2011, 11, 25)?, "Presidents' Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2012, - &mut national_holidays, [(NaiveDate::from_ymd_res(2012, 11, 23)?, "Presidents' Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2013, - &mut national_holidays, [(NaiveDate::from_ymd_res(2013, 11, 29)?, "Presidents' Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2014, - &mut national_holidays, [(NaiveDate::from_ymd_res(2014, 11, 28)?, "Presidents' Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2015, - &mut national_holidays, [(NaiveDate::from_ymd_res(2015, 11, 27)?, "Presidents' Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2016, - &mut national_holidays, [(NaiveDate::from_ymd_res(2016, 11, 25)?, "Presidents' Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2017, - &mut national_holidays, [(NaiveDate::from_ymd_res(2017, 11, 24)?, "Presidents' Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2018, - &mut national_holidays, [(NaiveDate::from_ymd_res(2018, 11, 23)?, "Presidents' Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2019, - &mut national_holidays, [(NaiveDate::from_ymd_res(2019, 11, 29)?, "Presidents' Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2020, - &mut national_holidays, [(NaiveDate::from_ymd_res(2020, 11, 27)?, "Presidents' Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2021, - &mut national_holidays, [(NaiveDate::from_ymd_res(2021, 11, 26)?, "Presidents' Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2022, - &mut national_holidays, [(NaiveDate::from_ymd_res(2022, 11, 25)?, "Presidents' Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2023, - &mut national_holidays, [(NaiveDate::from_ymd_res(2023, 11, 24)?, "Presidents' Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2024, - &mut national_holidays, [(NaiveDate::from_ymd_res(2024, 11, 29)?, "Presidents' Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2025, - &mut national_holidays, [(NaiveDate::from_ymd_res(2025, 11, 28)?, "Presidents' Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2026, - &mut national_holidays, [(NaiveDate::from_ymd_res(2026, 11, 27)?, "Presidents' Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2027, - &mut national_holidays, [(NaiveDate::from_ymd_res(2027, 11, 26)?, "Presidents' Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2028, - &mut national_holidays, [(NaiveDate::from_ymd_res(2028, 11, 24)?, "Presidents' Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2029, - &mut national_holidays, [(NaiveDate::from_ymd_res(2029, 11, 23)?, "Presidents' Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2030, - &mut national_holidays, [(NaiveDate::from_ymd_res(2030, 11, 29)?, "Presidents' Day")], &mut map, COUNTY_CODE, diff --git a/src/data/us_nv.rs b/src/data/us_nv.rs index 0e160e3..ae77925 100644 --- a/src/data/us_nv.rs +++ b/src/data/us_nv.rs @@ -12,15 +12,14 @@ const COUNTY_CODE: Country = Country::US_NV; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); let mut national_holidays = de::build(years)?; - build_subdivision_year( + build_year( years, 2000, - &mut national_holidays, [ (NaiveDate::from_ymd_res(2000, 10, 27)?, "Nevada Day"), (NaiveDate::from_ymd_res(2000, 11, 24)?, "Family Day"), @@ -30,10 +29,9 @@ pub fn build(years: Option<&std::ops::Range>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); let mut national_holidays = de::build(years)?; - build_subdivision_year( + build_year( years, 2000, - &mut national_holidays, [ (NaiveDate::from_ymd_res(2000, 2, 12)?, "Lincoln's Birthday"), ( @@ -33,40 +32,36 @@ pub fn build(years: Option<&std::ops::Range>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); let mut national_holidays = de::build(years)?; - build_subdivision_year( - years, - 2000, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2001, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2002, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2003, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2004, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2005, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2006, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2007, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2008, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2009, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2010, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2011, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2012, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2013, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2014, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2015, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2016, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2017, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2018, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2019, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2020, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2021, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2022, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2023, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2024, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2025, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2026, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2027, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2028, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2029, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2030, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2000, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2001, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2002, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2003, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2004, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2005, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2006, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2007, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2008, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2009, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2010, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2011, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2012, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2013, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2014, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2015, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2016, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2017, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2018, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2019, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2020, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2021, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2022, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2023, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2024, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2025, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2026, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2027, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2028, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2029, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2030, [], &mut map, COUNTY_CODE, COUNTY_NAME); Ok(map) } diff --git a/src/data/us_ok.rs b/src/data/us_ok.rs index f60ed45..9fa4c85 100644 --- a/src/data/us_ok.rs +++ b/src/data/us_ok.rs @@ -12,15 +12,14 @@ const COUNTY_CODE: Country = Country::US_OK; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); let mut national_holidays = de::build(years)?; - build_subdivision_year( + build_year( years, 2000, - &mut national_holidays, [( NaiveDate::from_ymd_res(2000, 11, 24)?, "Day After Thanksgiving", @@ -30,10 +29,9 @@ pub fn build(years: Option<&std::ops::Range>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); let mut national_holidays = de::build(years)?; - build_subdivision_year( - years, - 2000, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2001, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2002, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2003, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2004, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2005, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2006, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2007, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2008, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2009, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2010, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2011, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2012, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2013, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2014, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2015, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2016, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2017, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2018, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2019, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2020, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2021, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2022, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2023, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2024, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2025, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2026, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2027, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2028, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2029, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2030, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2000, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2001, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2002, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2003, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2004, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2005, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2006, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2007, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2008, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2009, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2010, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2011, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2012, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2013, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2014, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2015, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2016, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2017, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2018, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2019, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2020, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2021, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2022, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2023, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2024, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2025, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2026, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2027, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2028, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2029, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2030, [], &mut map, COUNTY_CODE, COUNTY_NAME); Ok(map) } diff --git a/src/data/us_pa.rs b/src/data/us_pa.rs index f771761..ad89c86 100644 --- a/src/data/us_pa.rs +++ b/src/data/us_pa.rs @@ -12,15 +12,14 @@ const COUNTY_CODE: Country = Country::US_PA; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); let mut national_holidays = de::build(years)?; - build_subdivision_year( + build_year( years, 2000, - &mut national_holidays, [( NaiveDate::from_ymd_res(2000, 11, 24)?, "Day After Thanksgiving", @@ -30,10 +29,9 @@ pub fn build(years: Option<&std::ops::Range>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); let mut national_holidays = de::build(years)?; - build_subdivision_year( + build_year( years, 2000, - &mut national_holidays, [ (NaiveDate::from_ymd_res(2000, 1, 6)?, "Epiphany"), (NaiveDate::from_ymd_res(2000, 3, 22)?, "Emancipation Day"), @@ -37,10 +36,9 @@ pub fn build(years: Option<&std::ops::Range>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); let mut national_holidays = de::build(years)?; - build_subdivision_year( + build_year( years, 2000, - &mut national_holidays, [(NaiveDate::from_ymd_res(2000, 8, 14)?, "Victory Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2001, - &mut national_holidays, [(NaiveDate::from_ymd_res(2001, 8, 13)?, "Victory Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2002, - &mut national_holidays, [(NaiveDate::from_ymd_res(2002, 8, 12)?, "Victory Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2003, - &mut national_holidays, [(NaiveDate::from_ymd_res(2003, 8, 11)?, "Victory Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2004, - &mut national_holidays, [(NaiveDate::from_ymd_res(2004, 8, 9)?, "Victory Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2005, - &mut national_holidays, [(NaiveDate::from_ymd_res(2005, 8, 8)?, "Victory Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2006, - &mut national_holidays, [(NaiveDate::from_ymd_res(2006, 8, 14)?, "Victory Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2007, - &mut national_holidays, [(NaiveDate::from_ymd_res(2007, 8, 13)?, "Victory Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2008, - &mut national_holidays, [(NaiveDate::from_ymd_res(2008, 8, 11)?, "Victory Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2009, - &mut national_holidays, [(NaiveDate::from_ymd_res(2009, 8, 10)?, "Victory Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2010, - &mut national_holidays, [(NaiveDate::from_ymd_res(2010, 8, 9)?, "Victory Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2011, - &mut national_holidays, [(NaiveDate::from_ymd_res(2011, 8, 8)?, "Victory Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2012, - &mut national_holidays, [(NaiveDate::from_ymd_res(2012, 8, 13)?, "Victory Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2013, - &mut national_holidays, [(NaiveDate::from_ymd_res(2013, 8, 12)?, "Victory Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2014, - &mut national_holidays, [(NaiveDate::from_ymd_res(2014, 8, 11)?, "Victory Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2015, - &mut national_holidays, [(NaiveDate::from_ymd_res(2015, 8, 10)?, "Victory Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2016, - &mut national_holidays, [(NaiveDate::from_ymd_res(2016, 8, 8)?, "Victory Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2017, - &mut national_holidays, [(NaiveDate::from_ymd_res(2017, 8, 14)?, "Victory Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2018, - &mut national_holidays, [(NaiveDate::from_ymd_res(2018, 8, 13)?, "Victory Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2019, - &mut national_holidays, [(NaiveDate::from_ymd_res(2019, 8, 12)?, "Victory Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2020, - &mut national_holidays, [(NaiveDate::from_ymd_res(2020, 8, 10)?, "Victory Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2021, - &mut national_holidays, [(NaiveDate::from_ymd_res(2021, 8, 9)?, "Victory Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2022, - &mut national_holidays, [(NaiveDate::from_ymd_res(2022, 8, 8)?, "Victory Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2023, - &mut national_holidays, [(NaiveDate::from_ymd_res(2023, 8, 14)?, "Victory Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2024, - &mut national_holidays, [(NaiveDate::from_ymd_res(2024, 8, 12)?, "Victory Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2025, - &mut national_holidays, [(NaiveDate::from_ymd_res(2025, 8, 11)?, "Victory Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2026, - &mut national_holidays, [(NaiveDate::from_ymd_res(2026, 8, 10)?, "Victory Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2027, - &mut national_holidays, [(NaiveDate::from_ymd_res(2027, 8, 9)?, "Victory Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2028, - &mut national_holidays, [(NaiveDate::from_ymd_res(2028, 8, 14)?, "Victory Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2029, - &mut national_holidays, [(NaiveDate::from_ymd_res(2029, 8, 13)?, "Victory Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2030, - &mut national_holidays, [(NaiveDate::from_ymd_res(2030, 8, 12)?, "Victory Day")], &mut map, COUNTY_CODE, diff --git a/src/data/us_sc.rs b/src/data/us_sc.rs index 20ff0c8..2df0388 100644 --- a/src/data/us_sc.rs +++ b/src/data/us_sc.rs @@ -12,15 +12,14 @@ const COUNTY_CODE: Country = Country::US_SC; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); let mut national_holidays = de::build(years)?; - build_subdivision_year( + build_year( years, 2000, - &mut national_holidays, [( NaiveDate::from_ymd_res(2000, 4, 24)?, "Confederate Memorial Day", @@ -30,10 +29,9 @@ pub fn build(years: Option<&std::ops::Range>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); let mut national_holidays = de::build(years)?; - build_subdivision_year( - years, - 2000, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2001, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2002, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2003, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2004, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2005, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2006, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2007, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2008, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2009, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2010, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2011, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2012, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2013, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2014, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2015, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2016, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2017, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2018, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2019, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2020, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2021, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2022, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2023, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2024, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2025, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2026, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2027, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2028, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2029, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2030, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2000, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2001, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2002, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2003, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2004, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2005, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2006, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2007, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2008, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2009, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2010, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2011, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2012, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2013, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2014, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2015, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2016, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2017, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2018, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2019, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2020, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2021, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2022, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2023, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2024, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2025, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2026, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2027, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2028, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2029, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2030, [], &mut map, COUNTY_CODE, COUNTY_NAME); Ok(map) } diff --git a/src/data/us_tn.rs b/src/data/us_tn.rs index 5e2487a..bf86a86 100644 --- a/src/data/us_tn.rs +++ b/src/data/us_tn.rs @@ -12,315 +12,284 @@ const COUNTY_CODE: Country = Country::US_TN; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); let mut national_holidays = de::build(years)?; - build_subdivision_year( + build_year( years, 2000, - &mut national_holidays, [(NaiveDate::from_ymd_res(2000, 4, 21)?, "Good Friday")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2001, - &mut national_holidays, [(NaiveDate::from_ymd_res(2001, 4, 13)?, "Good Friday")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2002, - &mut national_holidays, [(NaiveDate::from_ymd_res(2002, 3, 29)?, "Good Friday")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2003, - &mut national_holidays, [(NaiveDate::from_ymd_res(2003, 4, 18)?, "Good Friday")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2004, - &mut national_holidays, [(NaiveDate::from_ymd_res(2004, 4, 9)?, "Good Friday")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2005, - &mut national_holidays, [(NaiveDate::from_ymd_res(2005, 3, 25)?, "Good Friday")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2006, - &mut national_holidays, [(NaiveDate::from_ymd_res(2006, 4, 14)?, "Good Friday")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2007, - &mut national_holidays, [(NaiveDate::from_ymd_res(2007, 4, 6)?, "Good Friday")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2008, - &mut national_holidays, [(NaiveDate::from_ymd_res(2008, 3, 21)?, "Good Friday")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2009, - &mut national_holidays, [(NaiveDate::from_ymd_res(2009, 4, 10)?, "Good Friday")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2010, - &mut national_holidays, [(NaiveDate::from_ymd_res(2010, 4, 2)?, "Good Friday")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2011, - &mut national_holidays, [(NaiveDate::from_ymd_res(2011, 4, 22)?, "Good Friday")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2012, - &mut national_holidays, [(NaiveDate::from_ymd_res(2012, 4, 6)?, "Good Friday")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2013, - &mut national_holidays, [(NaiveDate::from_ymd_res(2013, 3, 29)?, "Good Friday")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2014, - &mut national_holidays, [(NaiveDate::from_ymd_res(2014, 4, 18)?, "Good Friday")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2015, - &mut national_holidays, [(NaiveDate::from_ymd_res(2015, 4, 3)?, "Good Friday")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2016, - &mut national_holidays, [(NaiveDate::from_ymd_res(2016, 3, 25)?, "Good Friday")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2017, - &mut national_holidays, [(NaiveDate::from_ymd_res(2017, 4, 14)?, "Good Friday")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2018, - &mut national_holidays, [(NaiveDate::from_ymd_res(2018, 3, 30)?, "Good Friday")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2019, - &mut national_holidays, [(NaiveDate::from_ymd_res(2019, 4, 19)?, "Good Friday")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2020, - &mut national_holidays, [(NaiveDate::from_ymd_res(2020, 4, 10)?, "Good Friday")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2021, - &mut national_holidays, [(NaiveDate::from_ymd_res(2021, 4, 2)?, "Good Friday")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2022, - &mut national_holidays, [(NaiveDate::from_ymd_res(2022, 4, 15)?, "Good Friday")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2023, - &mut national_holidays, [(NaiveDate::from_ymd_res(2023, 4, 7)?, "Good Friday")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2024, - &mut national_holidays, [(NaiveDate::from_ymd_res(2024, 3, 29)?, "Good Friday")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2025, - &mut national_holidays, [(NaiveDate::from_ymd_res(2025, 4, 18)?, "Good Friday")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2026, - &mut national_holidays, [(NaiveDate::from_ymd_res(2026, 4, 3)?, "Good Friday")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2027, - &mut national_holidays, [(NaiveDate::from_ymd_res(2027, 3, 26)?, "Good Friday")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2028, - &mut national_holidays, [(NaiveDate::from_ymd_res(2028, 4, 14)?, "Good Friday")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2029, - &mut national_holidays, [(NaiveDate::from_ymd_res(2029, 3, 30)?, "Good Friday")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2030, - &mut national_holidays, [(NaiveDate::from_ymd_res(2030, 4, 19)?, "Good Friday")], &mut map, COUNTY_CODE, diff --git a/src/data/us_tx.rs b/src/data/us_tx.rs index f525fd2..176c9cf 100644 --- a/src/data/us_tx.rs +++ b/src/data/us_tx.rs @@ -12,15 +12,14 @@ const COUNTY_CODE: Country = Country::US_TX; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); let mut national_holidays = de::build(years)?; - build_subdivision_year( + build_year( years, 2000, - &mut national_holidays, [ ( NaiveDate::from_ymd_res(2000, 1, 19)?, @@ -62,10 +61,9 @@ pub fn build(years: Option<&std::ops::Range>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); let mut national_holidays = de::build(years)?; - build_subdivision_year( - years, - 2000, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2001, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2002, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2003, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2004, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2005, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2006, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2007, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2008, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2009, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2010, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2011, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2012, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2013, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2014, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2015, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2016, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2017, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2018, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2019, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2020, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2021, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2022, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2023, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2024, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2025, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2026, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2027, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2028, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2029, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2030, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2000, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2001, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2002, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2003, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2004, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2005, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2006, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2007, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2008, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2009, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2010, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2011, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2012, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2013, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2014, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2015, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2016, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2017, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2018, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2019, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2020, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2021, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2022, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2023, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2024, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2025, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2026, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2027, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2028, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2029, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2030, [], &mut map, COUNTY_CODE, COUNTY_NAME); Ok(map) } diff --git a/src/data/us_ut.rs b/src/data/us_ut.rs index 91aac85..70781d3 100644 --- a/src/data/us_ut.rs +++ b/src/data/us_ut.rs @@ -12,55 +12,50 @@ const COUNTY_CODE: Country = Country::US_UT; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); let mut national_holidays = de::build(years)?; - build_subdivision_year( + build_year( years, 2000, - &mut national_holidays, [(NaiveDate::from_ymd_res(2000, 7, 24)?, "Pioneer Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2001, - &mut national_holidays, [(NaiveDate::from_ymd_res(2001, 7, 24)?, "Pioneer Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2002, - &mut national_holidays, [(NaiveDate::from_ymd_res(2002, 7, 24)?, "Pioneer Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2003, - &mut national_holidays, [(NaiveDate::from_ymd_res(2003, 7, 24)?, "Pioneer Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2004, - &mut national_holidays, [ (NaiveDate::from_ymd_res(2004, 7, 24)?, "Pioneer Day"), ( @@ -73,10 +68,9 @@ pub fn build(years: Option<&std::ops::Range>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); let mut national_holidays = de::build(years)?; - build_subdivision_year( + build_year( years, 2000, - &mut national_holidays, [(NaiveDate::from_ymd_res(2000, 1, 14)?, "Lee Jackson Day")], &mut map, COUNTY_CODE, COUNTY_NAME, ); - build_subdivision_year( + build_year( years, 2001, - &mut national_holidays, [ (NaiveDate::from_ymd_res(2001, 1, 12)?, "Lee Jackson Day"), (NaiveDate::from_ymd_res(2001, 1, 20)?, "Inauguration Day"), @@ -40,40 +38,36 @@ pub fn build(years: Option<&std::ops::Range>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); let mut national_holidays = de::build(years)?; - build_subdivision_year( + build_year( years, 2000, - &mut national_holidays, [ (NaiveDate::from_ymd_res(2000, 1, 6)?, "Three Kings Day"), (NaiveDate::from_ymd_res(2000, 3, 31)?, "Transfer Day"), @@ -39,10 +38,9 @@ pub fn build(years: Option<&std::ops::Range>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); let mut national_holidays = de::build(years)?; - build_subdivision_year( + build_year( years, 2000, - &mut national_holidays, [ (NaiveDate::from_ymd_res(2000, 3, 7)?, "Town Meeting Day"), ( @@ -33,10 +32,9 @@ pub fn build(years: Option<&std::ops::Range>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); let mut national_holidays = de::build(years)?; - build_subdivision_year( - years, - 2000, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2001, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2002, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2003, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2004, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2005, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2006, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2007, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2008, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2009, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2010, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2011, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2012, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2013, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2014, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2015, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2016, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2017, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2018, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2019, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2020, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2021, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2022, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2023, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2024, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2025, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2026, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2027, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2028, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2029, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2030, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2000, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2001, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2002, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2003, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2004, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2005, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2006, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2007, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2008, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2009, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2010, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2011, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2012, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2013, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2014, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2015, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2016, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2017, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2018, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2019, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2020, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2021, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2022, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2023, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2024, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2025, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2026, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2027, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2028, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2029, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2030, [], &mut map, COUNTY_CODE, COUNTY_NAME); Ok(map) } diff --git a/src/data/us_wi.rs b/src/data/us_wi.rs index 4db0a50..b24119f 100644 --- a/src/data/us_wi.rs +++ b/src/data/us_wi.rs @@ -12,15 +12,14 @@ const COUNTY_CODE: Country = Country::US_WI; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); let mut national_holidays = de::build(years)?; - build_subdivision_year( + build_year( years, 2000, - &mut national_holidays, [( NaiveDate::from_ymd_res(2000, 2, 15)?, "Susan B. Anthony Day", @@ -30,10 +29,9 @@ pub fn build(years: Option<&std::ops::Range>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); let mut national_holidays = de::build(years)?; - build_subdivision_year( + build_year( years, 2000, - &mut national_holidays, [ (NaiveDate::from_ymd_res(2000, 6, 20)?, "West Virginia Day"), ( @@ -33,10 +32,9 @@ pub fn build(years: Option<&std::ops::Range>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); let mut national_holidays = de::build(years)?; - build_subdivision_year( - years, - 2000, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2001, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2002, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2003, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2004, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2005, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2006, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2007, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2008, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2009, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2010, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2011, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2012, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2013, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2014, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2015, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2016, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2017, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2018, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2019, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2020, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2021, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2022, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2023, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2024, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2025, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2026, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2027, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2028, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2029, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); - - build_subdivision_year( - years, - 2030, - &mut national_holidays, - [], - &mut map, - COUNTY_CODE, - COUNTY_NAME, - ); + build_year(years, 2000, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2001, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2002, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2003, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2004, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2005, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2006, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2007, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2008, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2009, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2010, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2011, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2012, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2013, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2014, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2015, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2016, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2017, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2018, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2019, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2020, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2021, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2022, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2023, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2024, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2025, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2026, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2027, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2028, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2029, [], &mut map, COUNTY_CODE, COUNTY_NAME); + + build_year(years, 2030, [], &mut map, COUNTY_CODE, COUNTY_NAME); Ok(map) } diff --git a/src/data/uy.rs b/src/data/uy.rs index 40e3a61..bf45dc8 100644 --- a/src/data/uy.rs +++ b/src/data/uy.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::UY; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/uz.rs b/src/data/uz.rs index c152f37..222f5a3 100644 --- a/src/data/uz.rs +++ b/src/data/uz.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::UZ; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/ve.rs b/src/data/ve.rs index 9f7831b..90fc1e9 100644 --- a/src/data/ve.rs +++ b/src/data/ve.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::VE; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/vn.rs b/src/data/vn.rs index 1aaa293..f8911bb 100644 --- a/src/data/vn.rs +++ b/src/data/vn.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::VN; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/za.rs b/src/data/za.rs index 74ed46a..ee8f364 100644 --- a/src/data/za.rs +++ b/src/data/za.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::ZA; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/zm.rs b/src/data/zm.rs index e812b37..d84f463 100644 --- a/src/data/zm.rs +++ b/src/data/zm.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::ZM; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/data/zw.rs b/src/data/zw.rs index e10c03e..579a2d1 100644 --- a/src/data/zw.rs +++ b/src/data/zw.rs @@ -12,7 +12,7 @@ const COUNTY_CODE: Country = Country::ZW; clippy::too_many_lines, clippy::missing_errors_doc )] -pub fn build(years: Option<&std::ops::Range>) -> Result { +pub fn build(years: Option<&std::ops::Range>) -> Result { let mut map = HashMap::new(); build_year( diff --git a/src/iter.rs b/src/iter.rs index 1c03f15..dcb5b00 100644 --- a/src/iter.rs +++ b/src/iter.rs @@ -1,7 +1,7 @@ use chrono::{Datelike, NaiveDate}; use once_cell::sync::Lazy; -use crate::{prelude::*, Error, Holiday, Result, DATA}; +use crate::{get_map_for_country_and_year, prelude::*, Error, Holiday, Result, DATA}; use std::collections::VecDeque; #[derive(Debug)] @@ -34,21 +34,36 @@ impl std::iter::Iterator for Iter { pub fn iter(country: Country, since: NaiveDate, until: NaiveDate) -> Result { let data = Lazy::get(&DATA).ok_or(Error::Uninitialized)?; - let mut buf = VecDeque::new(); + let mut buf = Vec::new(); - let mut y = since.year(); - while y <= until.year() { + for y in since.year()..=until.year() { let data = data.read().map_err(|e| Error::LockError(e.to_string()))?; - let map = data.get(&country).ok_or(Error::CountryNotAvailable)?; - let Some(map) = map.get(&y) else { - break; + let country_map = match get_map_for_country_and_year(&data, country, y) { + Err(Error::CountryNotAvailable) => return Err(Error::CountryNotAvailable), + Err(_) => break, + Ok(map) => map, }; - buf.extend(map.values().cloned()); - - y += 1; + buf.extend( + country_map + .country + .values() + .chain( + country_map + .subdivision + .map(|s| s.values()) + .unwrap_or_default(), + ) + .cloned(), + ); } - Ok(Iter { since, until, buf }) + buf.sort_by_key(|h| h.date); + + Ok(Iter { + since, + until, + buf: buf.into_iter().collect(), + }) } diff --git a/src/lib.rs b/src/lib.rs index a5ae8af..c1f583b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -15,8 +15,9 @@ use std::{ }; /// Type alias for Holiday map. -pub type HolidayPerCountryMap = HashMap>; -pub type HolidayMap = HashMap; +pub type HolidayPerDayMap = BTreeMap; +pub type HolidayPerYearMap = HashMap; +pub type HolidayMap = HashMap; /// Type alias for Year. pub type Year = i32; @@ -45,7 +46,7 @@ pub fn get(country: Country, date: NaiveDate) -> Result> { let map = get_map_for_country_and_year(&holiday_map, country, date.year())?; - Ok(map.get(&date).cloned()) + Ok(map.get(date).cloned()) } /// Check if the specified date is a holiday. If the specified country or year is @@ -57,7 +58,7 @@ pub fn contains(country: Country, date: NaiveDate) -> Result { let map = get_map_for_country_and_year(&holiday_map, country, date.year())?; - Ok(map.get(&date).is_some()) + Ok(map.get(date).is_some()) } fn get_holiday_map() -> Result> { @@ -65,16 +66,39 @@ fn get_holiday_map() -> Result> { data.read().map_err(|e| Error::LockError(e.to_string())) } +struct CountryWithSubdivision<'a> { + country: &'a HolidayPerDayMap, + subdivision: Option<&'a HolidayPerDayMap>, +} + +impl<'a> CountryWithSubdivision<'a> { + pub fn get(&self, date: NaiveDate) -> Option<&Holiday> { + self.country + .get(&date) + .or_else(|| self.subdivision.and_then(|s| s.get(&date))) + } +} + fn get_map_for_country_and_year<'a>( holiday_map: &'a RwLockReadGuard<'a, HolidayMap>, country: Country, year: Year, -) -> Result<&'a BTreeMap> { +) -> Result> { + let (country, subdivision) = Country::country_from_subdivision(country) + .map_or_else(|| (country, None), |c| (c, Some(country))); + let map = holiday_map .get(&country) .ok_or(Error::CountryNotAvailable)?; + let map = map.get(&year).ok_or(Error::YearNotAvailable)?; - Ok(map) + + Ok(CountryWithSubdivision { + country: map, + subdivision: subdivision + .and_then(|subdiv| holiday_map.get(&subdiv)) + .and_then(|m| m.get(&year)), + }) } /// Represents a holiday. diff --git a/tests/test.rs b/tests/test.rs index fbc915a..f55cabd 100644 --- a/tests/test.rs +++ b/tests/test.rs @@ -146,3 +146,28 @@ fn iterate_year_not_available() -> anyhow::Result<()> { Ok(()) } + +#[test] +#[serial] +fn iterate_subdivision() -> anyhow::Result<()> { + Builder::new() + .countries(&[Country::DE, Country::DE_NW]) + .years(2024..2025) + .init()?; + + let s = NaiveDate::from_ymd_res(2024, 5, 1)?; + let u = NaiveDate::from_ymd_res(2024, 5, 31)?; + assert_eq!( + vec![ + NaiveDate::from_ymd_res(2024, 5, 1)?, + NaiveDate::from_ymd_res(2024, 5, 9)?, + NaiveDate::from_ymd_res(2024, 5, 20)?, + NaiveDate::from_ymd_res(2024, 5, 30)?, + ], + iter(Country::DE_NW, s, u)? + .map(|h| h.date) + .collect::>() + ); + + Ok(()) +} From 2dcf81bfc6ea4e7ac7ec95022cfe06743ca8cebc Mon Sep 17 00:00:00 2001 From: AD4MANTIS <31745687+AD4MANTIS@users.noreply.github.com> Date: Sat, 6 Jul 2024 09:07:59 +0200 Subject: [PATCH 6/6] added subdiv example --- examples/subdivisions.rs | 22 ++++++++++++++++++++++ gen.py | 27 +++++++++++++++++---------- src/build.rs | 25 ++++++++++++++++--------- src/builder.rs | 2 +- src/data/helper.rs | 18 ++++++++++++++++++ src/data/mod.rs | 2 +- tests/test.rs | 4 ++-- 7 files changed, 77 insertions(+), 23 deletions(-) create mode 100644 examples/subdivisions.rs diff --git a/examples/subdivisions.rs b/examples/subdivisions.rs new file mode 100644 index 0000000..861ed87 --- /dev/null +++ b/examples/subdivisions.rs @@ -0,0 +1,22 @@ +use std::ops::Not; + +use chrono::NaiveDate; +use holidays::Country; + +fn main() -> anyhow::Result<()> { + // Building a subdivision will load the holidays of the main country and the subdivision. + holidays::Builder::new() + .countries(&[Country::US_WV]) + .years(2024..2025) + .init()?; + + let d = NaiveDate::from_ymd_opt(2024, 6, 20).expect("Invalid date"); + assert!(holidays::contains(Country::US, d)?.not()); + println!("{d} is not a holiday in the US."); + + assert!(holidays::contains(Country::US_WV, d)?); + println!("{d} is a holiday in West Virginia."); + println!("{:?}", holidays::get(Country::US_WV, d)?.unwrap()); + + Ok(()) +} diff --git a/gen.py b/gen.py index fffbab4..fb5ac48 100644 --- a/gen.py +++ b/gen.py @@ -261,18 +261,25 @@ class Country: build = """ use std::collections::HashSet; -use crate::{data, prelude::*, HolidayMap, Result, Year}; - -fn should_build(countries: Option<&HashSet>, country: Country) -> bool { - match countries { - Some(c) => c.contains(&country), - None => true, - } -} +use crate::{ + data::{ + self, + helper::{add_main_country_from_subdivisions, should_build}, + }, + prelude::*, + HolidayMap, Result, Year, +}; /// Generate holiday map for the specified countries and years. #[allow(clippy::too_many_lines)] -pub fn build(countries: Option<&HashSet>, years: Option<&std::ops::Range>) -> Result { +pub fn build(countries: Option>, years: Option<&std::ops::Range>) -> Result { + let countries = countries.map(|mut c| { + add_main_country_from_subdivisions(&mut c); + c + }); + + let countries = countries.as_ref(); + let mut map = HolidayMap::new(); {% for country in countries %} @@ -288,7 +295,7 @@ class Country: """ country_mod = """ -mod helper; +pub(super) mod helper; use crate::{prelude::*, HolidayPerYearMap, NaiveDateExt, Result, Year}; use helper::build_year; diff --git a/src/build.rs b/src/build.rs index d6e79a1..bbff691 100644 --- a/src/build.rs +++ b/src/build.rs @@ -1,20 +1,27 @@ use std::collections::HashSet; -use crate::{data, prelude::*, HolidayMap, Result, Year}; - -fn should_build(countries: Option<&HashSet>, country: Country) -> bool { - match countries { - Some(c) => c.contains(&country), - None => true, - } -} +use crate::{ + data::{ + self, + helper::{add_main_country_from_subdivisions, should_build}, + }, + prelude::*, + HolidayMap, Result, Year, +}; /// Generate holiday map for the specified countries and years. #[allow(clippy::too_many_lines)] pub fn build( - countries: Option<&HashSet>, + countries: Option>, years: Option<&std::ops::Range>, ) -> Result { + let countries = countries.map(|mut c| { + add_main_country_from_subdivisions(&mut c); + c + }); + + let countries = countries.as_ref(); + let mut map = HolidayMap::new(); #[cfg(feature = "AO")] diff --git a/src/builder.rs b/src/builder.rs index e56d55e..9c0b8da 100644 --- a/src/builder.rs +++ b/src/builder.rs @@ -30,7 +30,7 @@ impl Builder { #[allow(clippy::missing_errors_doc)] pub fn build(self) -> Result { let Builder { countries, years } = self; - build(countries.as_ref(), years.as_ref()) + build(countries, years.as_ref()) } /// Build and initialize holiday database. diff --git a/src/data/helper.rs b/src/data/helper.rs index bc17777..f4472ff 100644 --- a/src/data/helper.rs +++ b/src/data/helper.rs @@ -1,7 +1,25 @@ +use std::collections::HashSet; + use chrono::NaiveDate; use crate::{prelude::*, Holiday, HolidayPerYearMap, Year}; +pub fn should_build(countries: Option<&HashSet>, country: Country) -> bool { + match countries { + Some(c) => c.contains(&country), + None => true, + } +} + +pub fn add_main_country_from_subdivisions(c: &mut HashSet) { + c.extend( + c.iter() + .copied() + .filter_map(Country::country_from_subdivision) + .collect::>(), + ); +} + pub fn should_build_year(years: Option<&std::ops::Range>, year: Year) -> bool { years.map_or(true, |r| r.contains(&year)) } diff --git a/src/data/mod.rs b/src/data/mod.rs index bb96c1d..77f5c63 100644 --- a/src/data/mod.rs +++ b/src/data/mod.rs @@ -1,4 +1,4 @@ -mod helper; +pub(super) mod helper; use crate::{prelude::*, HolidayPerYearMap, NaiveDateExt, Result, Year}; use helper::build_year; diff --git a/tests/test.rs b/tests/test.rs index f55cabd..18a2566 100644 --- a/tests/test.rs +++ b/tests/test.rs @@ -40,9 +40,9 @@ fn build_by_country() -> anyhow::Result<()> { #[test] #[serial] -fn build_by_country_with_subdivision() -> anyhow::Result<()> { +fn build_by_subdivision() -> anyhow::Result<()> { Builder::new() - .countries(&[Country::DE, Country::DE_NW]) + .countries(&[Country::DE_NW]) .years(2024..2025) .init()?;