From 81a9ef8a5d093dde80f0b02522cf1b9823adb8d4 Mon Sep 17 00:00:00 2001 From: commenthol Date: Thu, 18 Aug 2022 19:12:11 +0200 Subject: [PATCH] fix(ES): various fixes for state holidays --- README.md | 34 +++- data/countries/ES.yaml | 306 ++++++++++++++++++++++++------- data/countries/IC.yaml | 8 + data/names.yaml | 3 + test/fixtures/ES-2015.json | 2 +- test/fixtures/ES-2016.json | 14 +- test/fixtures/ES-2017.json | 2 +- test/fixtures/ES-2018.json | 2 +- test/fixtures/ES-2019.json | 2 +- test/fixtures/ES-2020.json | 2 +- test/fixtures/ES-2021.json | 12 +- test/fixtures/ES-2022.json | 14 +- test/fixtures/ES-2023.json | 2 +- test/fixtures/ES-2024.json | 2 +- test/fixtures/ES-2025.json | 2 +- test/fixtures/ES-AN-2015.json | 2 +- test/fixtures/ES-AN-2016.json | 18 +- test/fixtures/ES-AN-2017.json | 2 +- test/fixtures/ES-AN-2018.json | 2 +- test/fixtures/ES-AN-2019.json | 2 +- test/fixtures/ES-AN-2020.json | 2 +- test/fixtures/ES-AN-2021.json | 16 +- test/fixtures/ES-AN-2022.json | 8 +- test/fixtures/ES-AN-2023.json | 2 +- test/fixtures/ES-AN-2024.json | 2 +- test/fixtures/ES-AN-2025.json | 2 +- test/fixtures/ES-AR-2015.json | 4 +- test/fixtures/ES-AR-2016.json | 10 +- test/fixtures/ES-AR-2017.json | 16 +- test/fixtures/ES-AR-2018.json | 4 +- test/fixtures/ES-AR-2019.json | 4 +- test/fixtures/ES-AR-2020.json | 4 +- test/fixtures/ES-AR-2021.json | 8 +- test/fixtures/ES-AR-2022.json | 10 +- test/fixtures/ES-AR-2023.json | 16 +- test/fixtures/ES-AR-2024.json | 4 +- test/fixtures/ES-AR-2025.json | 4 +- test/fixtures/ES-AS-2015.json | 176 ++++++++++++++++++ test/fixtures/ES-AS-2016.json | 176 ++++++++++++++++++ test/fixtures/ES-AS-2017.json | 166 +++++++++++++++++ test/fixtures/ES-AS-2018.json | 156 ++++++++++++++++ test/fixtures/ES-AS-2019.json | 186 +++++++++++++++++++ test/fixtures/ES-AS-2020.json | 176 ++++++++++++++++++ test/fixtures/ES-AS-2021.json | 166 +++++++++++++++++ test/fixtures/ES-AS-2022.json | 176 ++++++++++++++++++ test/fixtures/ES-AS-2023.json | 166 +++++++++++++++++ test/fixtures/ES-AS-2024.json | 176 ++++++++++++++++++ test/fixtures/ES-AS-2025.json | 166 +++++++++++++++++ test/fixtures/ES-CB-2015.json | 194 ++++++++++++++++++++ test/fixtures/ES-CB-2016.json | 175 ++++++++++++++++++ test/fixtures/ES-CB-2017.json | 175 ++++++++++++++++++ test/fixtures/ES-CB-2018.json | 165 +++++++++++++++++ test/fixtures/ES-CB-2019.json | 194 ++++++++++++++++++++ test/fixtures/ES-CB-2020.json | 194 ++++++++++++++++++++ test/fixtures/ES-CB-2021.json | 165 +++++++++++++++++ test/fixtures/ES-CB-2022.json | 175 ++++++++++++++++++ test/fixtures/ES-CB-2023.json | 175 ++++++++++++++++++ test/fixtures/ES-CB-2024.json | 184 +++++++++++++++++++ test/fixtures/ES-CB-2025.json | 175 ++++++++++++++++++ test/fixtures/ES-CE-2015.json | 194 ++++++++++++++++++++ test/fixtures/ES-CE-2016.json | 184 +++++++++++++++++++ test/fixtures/ES-CE-2017.json | 184 +++++++++++++++++++ test/fixtures/ES-CE-2018.json | 194 ++++++++++++++++++++ test/fixtures/ES-CE-2019.json | 194 ++++++++++++++++++++ test/fixtures/ES-CE-2020.json | 194 ++++++++++++++++++++ test/fixtures/ES-CE-2021.json | 174 ++++++++++++++++++ test/fixtures/ES-CE-2022.json | 184 +++++++++++++++++++ test/fixtures/ES-CE-2023.json | 184 +++++++++++++++++++ test/fixtures/ES-CE-2024.json | 184 +++++++++++++++++++ test/fixtures/ES-CE-2025.json | 184 +++++++++++++++++++ test/fixtures/ES-CL-2015.json | 176 ++++++++++++++++++ test/fixtures/ES-CL-2016.json | 176 ++++++++++++++++++ test/fixtures/ES-CL-2017.json | 176 ++++++++++++++++++ test/fixtures/ES-CL-2018.json | 156 ++++++++++++++++ test/fixtures/ES-CL-2019.json | 176 ++++++++++++++++++ test/fixtures/ES-CL-2020.json | 176 ++++++++++++++++++ test/fixtures/ES-CL-2021.json | 166 +++++++++++++++++ test/fixtures/ES-CL-2022.json | 176 ++++++++++++++++++ test/fixtures/ES-CL-2023.json | 176 ++++++++++++++++++ test/fixtures/ES-CL-2024.json | 166 +++++++++++++++++ test/fixtures/ES-CL-2025.json | 166 +++++++++++++++++ test/fixtures/ES-CM-2015.json | 176 ++++++++++++++++++ test/fixtures/ES-CM-2016.json | 166 +++++++++++++++++ test/fixtures/ES-CM-2017.json | 166 +++++++++++++++++ test/fixtures/ES-CM-2018.json | 156 ++++++++++++++++ test/fixtures/ES-CM-2019.json | 176 ++++++++++++++++++ test/fixtures/ES-CM-2020.json | 195 ++++++++++++++++++++ test/fixtures/ES-CM-2021.json | 165 +++++++++++++++++ test/fixtures/ES-CM-2022.json | 175 ++++++++++++++++++ test/fixtures/ES-CM-2023.json | 175 ++++++++++++++++++ test/fixtures/ES-CM-2024.json | 175 ++++++++++++++++++ test/fixtures/ES-CM-2025.json | 175 ++++++++++++++++++ test/fixtures/ES-CN-2015.json | 2 +- test/fixtures/ES-CN-2016.json | 14 +- test/fixtures/ES-CN-2017.json | 2 +- test/fixtures/ES-CN-2018.json | 2 +- test/fixtures/ES-CN-2019.json | 2 +- test/fixtures/ES-CN-2020.json | 2 +- test/fixtures/ES-CN-2021.json | 16 +- test/fixtures/ES-CN-2022.json | 14 +- test/fixtures/ES-CN-2023.json | 2 +- test/fixtures/ES-CN-2024.json | 2 +- test/fixtures/ES-CN-2025.json | 2 +- test/fixtures/ES-CN-EH-2015.json | 2 +- test/fixtures/ES-CN-EH-2016.json | 14 +- test/fixtures/ES-CN-EH-2017.json | 2 +- test/fixtures/ES-CN-EH-2018.json | 2 +- test/fixtures/ES-CN-EH-2019.json | 2 +- test/fixtures/ES-CN-EH-2020.json | 2 +- test/fixtures/ES-CN-EH-2021.json | 16 +- test/fixtures/ES-CN-EH-2022.json | 14 +- test/fixtures/ES-CN-EH-2023.json | 2 +- test/fixtures/ES-CN-EH-2024.json | 2 +- test/fixtures/ES-CN-EH-2025.json | 2 +- test/fixtures/ES-CN-FU-2015.json | 2 +- test/fixtures/ES-CN-FU-2016.json | 14 +- test/fixtures/ES-CN-FU-2017.json | 2 +- test/fixtures/ES-CN-FU-2018.json | 2 +- test/fixtures/ES-CN-FU-2019.json | 2 +- test/fixtures/ES-CN-FU-2020.json | 2 +- test/fixtures/ES-CN-FU-2021.json | 16 +- test/fixtures/ES-CN-FU-2022.json | 14 +- test/fixtures/ES-CN-FU-2023.json | 2 +- test/fixtures/ES-CN-FU-2024.json | 2 +- test/fixtures/ES-CN-FU-2025.json | 2 +- test/fixtures/ES-CN-GC-2015.json | 2 +- test/fixtures/ES-CN-GC-2016.json | 14 +- test/fixtures/ES-CN-GC-2017.json | 2 +- test/fixtures/ES-CN-GC-2018.json | 2 +- test/fixtures/ES-CN-GC-2019.json | 2 +- test/fixtures/ES-CN-GC-2020.json | 2 +- test/fixtures/ES-CN-GC-2021.json | 16 +- test/fixtures/ES-CN-GC-2022.json | 14 +- test/fixtures/ES-CN-GC-2023.json | 2 +- test/fixtures/ES-CN-GC-2024.json | 2 +- test/fixtures/ES-CN-GC-2025.json | 2 +- test/fixtures/ES-CN-LA-2015.json | 2 +- test/fixtures/ES-CN-LA-2016.json | 14 +- test/fixtures/ES-CN-LA-2017.json | 2 +- test/fixtures/ES-CN-LA-2018.json | 2 +- test/fixtures/ES-CN-LA-2019.json | 2 +- test/fixtures/ES-CN-LA-2020.json | 2 +- test/fixtures/ES-CN-LA-2021.json | 16 +- test/fixtures/ES-CN-LA-2022.json | 14 +- test/fixtures/ES-CN-LA-2023.json | 2 +- test/fixtures/ES-CN-LA-2024.json | 2 +- test/fixtures/ES-CN-LA-2025.json | 2 +- test/fixtures/ES-CN-LG-2015.json | 2 +- test/fixtures/ES-CN-LG-2016.json | 14 +- test/fixtures/ES-CN-LG-2017.json | 2 +- test/fixtures/ES-CN-LG-2018.json | 2 +- test/fixtures/ES-CN-LG-2019.json | 2 +- test/fixtures/ES-CN-LG-2020.json | 2 +- test/fixtures/ES-CN-LG-2021.json | 16 +- test/fixtures/ES-CN-LG-2022.json | 14 +- test/fixtures/ES-CN-LG-2023.json | 2 +- test/fixtures/ES-CN-LG-2024.json | 2 +- test/fixtures/ES-CN-LG-2025.json | 2 +- test/fixtures/ES-CN-LP-2015.json | 2 +- test/fixtures/ES-CN-LP-2016.json | 14 +- test/fixtures/ES-CN-LP-2017.json | 2 +- test/fixtures/ES-CN-LP-2018.json | 2 +- test/fixtures/ES-CN-LP-2019.json | 2 +- test/fixtures/ES-CN-LP-2020.json | 2 +- test/fixtures/ES-CN-LP-2021.json | 16 +- test/fixtures/ES-CN-LP-2022.json | 14 +- test/fixtures/ES-CN-LP-2023.json | 2 +- test/fixtures/ES-CN-LP-2024.json | 2 +- test/fixtures/ES-CN-LP-2025.json | 2 +- test/fixtures/ES-CN-TE-2015.json | 2 +- test/fixtures/ES-CN-TE-2016.json | 14 +- test/fixtures/ES-CN-TE-2017.json | 2 +- test/fixtures/ES-CN-TE-2018.json | 2 +- test/fixtures/ES-CN-TE-2019.json | 2 +- test/fixtures/ES-CN-TE-2020.json | 2 +- test/fixtures/ES-CN-TE-2021.json | 16 +- test/fixtures/ES-CN-TE-2022.json | 14 +- test/fixtures/ES-CN-TE-2023.json | 2 +- test/fixtures/ES-CN-TE-2024.json | 2 +- test/fixtures/ES-CN-TE-2025.json | 2 +- test/fixtures/ES-CT-2015.json | 26 ++- test/fixtures/ES-CT-2016.json | 32 +++- test/fixtures/ES-CT-2017.json | 26 ++- test/fixtures/ES-CT-2018.json | 26 ++- test/fixtures/ES-CT-2019.json | 26 ++- test/fixtures/ES-CT-2020.json | 26 ++- test/fixtures/ES-CT-2021.json | 46 +++-- test/fixtures/ES-CT-2022.json | 32 +++- test/fixtures/ES-CT-2023.json | 26 ++- test/fixtures/ES-CT-2024.json | 26 ++- test/fixtures/ES-CT-2025.json | 26 ++- test/fixtures/ES-EX-2015.json | 176 ++++++++++++++++++ test/fixtures/ES-EX-2016.json | 176 ++++++++++++++++++ test/fixtures/ES-EX-2017.json | 166 +++++++++++++++++ test/fixtures/ES-EX-2018.json | 156 ++++++++++++++++ test/fixtures/ES-EX-2019.json | 186 +++++++++++++++++++ test/fixtures/ES-EX-2020.json | 176 ++++++++++++++++++ test/fixtures/ES-EX-2021.json | 156 ++++++++++++++++ test/fixtures/ES-EX-2022.json | 176 ++++++++++++++++++ test/fixtures/ES-EX-2023.json | 166 +++++++++++++++++ test/fixtures/ES-EX-2024.json | 176 ++++++++++++++++++ test/fixtures/ES-EX-2025.json | 166 +++++++++++++++++ test/fixtures/ES-GA-2015.json | 186 +++++++++++++++++++ test/fixtures/ES-GA-2016.json | 166 +++++++++++++++++ test/fixtures/ES-GA-2017.json | 166 +++++++++++++++++ test/fixtures/ES-GA-2018.json | 156 ++++++++++++++++ test/fixtures/ES-GA-2019.json | 176 ++++++++++++++++++ test/fixtures/ES-GA-2020.json | 186 +++++++++++++++++++ test/fixtures/ES-GA-2021.json | 166 +++++++++++++++++ test/fixtures/ES-GA-2022.json | 166 +++++++++++++++++ test/fixtures/ES-GA-2023.json | 166 +++++++++++++++++ test/fixtures/ES-GA-2024.json | 166 +++++++++++++++++ test/fixtures/ES-GA-2025.json | 166 +++++++++++++++++ test/fixtures/ES-IB-2015.json | 204 +++++++++++++++++++++ test/fixtures/ES-IB-2016.json | 184 +++++++++++++++++++ test/fixtures/ES-IB-2017.json | 184 +++++++++++++++++++ test/fixtures/ES-IB-2018.json | 174 ++++++++++++++++++ test/fixtures/ES-IB-2019.json | 194 ++++++++++++++++++++ test/fixtures/ES-IB-2020.json | 204 +++++++++++++++++++++ test/fixtures/ES-IB-2021.json | 174 ++++++++++++++++++ test/fixtures/ES-IB-2022.json | 184 +++++++++++++++++++ test/fixtures/ES-IB-2023.json | 184 +++++++++++++++++++ test/fixtures/ES-IB-2024.json | 184 +++++++++++++++++++ test/fixtures/ES-IB-2025.json | 184 +++++++++++++++++++ test/fixtures/ES-MC-2015.json | 167 +++++++++++++++++ test/fixtures/ES-MC-2016.json | 167 +++++++++++++++++ test/fixtures/ES-MC-2017.json | 157 ++++++++++++++++ test/fixtures/ES-MC-2018.json | 147 +++++++++++++++ test/fixtures/ES-MC-2019.json | 167 +++++++++++++++++ test/fixtures/ES-MC-2020.json | 167 +++++++++++++++++ test/fixtures/ES-MC-2021.json | 147 +++++++++++++++ test/fixtures/ES-MC-2022.json | 167 +++++++++++++++++ test/fixtures/ES-MC-2023.json | 157 ++++++++++++++++ test/fixtures/ES-MC-2024.json | 157 ++++++++++++++++ test/fixtures/ES-MC-2025.json | 157 ++++++++++++++++ test/fixtures/ES-MD-2015.json | 19 +- test/fixtures/ES-MD-2016.json | 19 +- test/fixtures/ES-MD-2017.json | 19 +- test/fixtures/ES-MD-2018.json | 19 +- test/fixtures/ES-MD-2019.json | 19 +- test/fixtures/ES-MD-2020.json | 19 +- test/fixtures/ES-MD-2021.json | 49 +++-- test/fixtures/ES-MD-2022.json | 19 +- test/fixtures/ES-MD-2023.json | 19 +- test/fixtures/ES-MD-2024.json | 19 +- test/fixtures/ES-MD-2025.json | 19 +- test/fixtures/ES-ML-2015.json | 185 +++++++++++++++++++ test/fixtures/ES-ML-2016.json | 175 ++++++++++++++++++ test/fixtures/ES-ML-2017.json | 175 ++++++++++++++++++ test/fixtures/ES-ML-2018.json | 165 +++++++++++++++++ test/fixtures/ES-ML-2019.json | 185 +++++++++++++++++++ test/fixtures/ES-ML-2020.json | 185 +++++++++++++++++++ test/fixtures/ES-ML-2021.json | 165 +++++++++++++++++ test/fixtures/ES-ML-2022.json | 175 ++++++++++++++++++ test/fixtures/ES-ML-2023.json | 175 ++++++++++++++++++ test/fixtures/ES-ML-2024.json | 175 ++++++++++++++++++ test/fixtures/ES-ML-2025.json | 175 ++++++++++++++++++ test/fixtures/ES-NC-2015.json | 176 ++++++++++++++++++ test/fixtures/ES-NC-2016.json | 166 +++++++++++++++++ test/fixtures/ES-NC-2017.json | 166 +++++++++++++++++ test/fixtures/ES-NC-2018.json | 156 ++++++++++++++++ test/fixtures/ES-NC-2019.json | 176 ++++++++++++++++++ test/fixtures/ES-NC-2020.json | 176 ++++++++++++++++++ test/fixtures/ES-NC-2021.json | 166 +++++++++++++++++ test/fixtures/ES-NC-2022.json | 166 +++++++++++++++++ test/fixtures/ES-NC-2023.json | 166 +++++++++++++++++ test/fixtures/ES-NC-2024.json | 166 +++++++++++++++++ test/fixtures/ES-NC-2025.json | 166 +++++++++++++++++ test/fixtures/ES-PV-2015.json | 176 ++++++++++++++++++ test/fixtures/ES-PV-2016.json | 166 +++++++++++++++++ test/fixtures/ES-PV-2017.json | 166 +++++++++++++++++ test/fixtures/ES-PV-2018.json | 156 ++++++++++++++++ test/fixtures/ES-PV-2019.json | 176 ++++++++++++++++++ test/fixtures/ES-PV-2020.json | 176 ++++++++++++++++++ test/fixtures/ES-PV-2021.json | 166 +++++++++++++++++ test/fixtures/ES-PV-2022.json | 175 ++++++++++++++++++ test/fixtures/ES-PV-2023.json | 166 +++++++++++++++++ test/fixtures/ES-PV-2024.json | 166 +++++++++++++++++ test/fixtures/ES-PV-2025.json | 166 +++++++++++++++++ test/fixtures/ES-RI-2015.json | 176 ++++++++++++++++++ test/fixtures/ES-RI-2016.json | 166 +++++++++++++++++ test/fixtures/ES-RI-2017.json | 166 +++++++++++++++++ test/fixtures/ES-RI-2018.json | 156 ++++++++++++++++ test/fixtures/ES-RI-2019.json | 176 ++++++++++++++++++ test/fixtures/ES-RI-2020.json | 176 ++++++++++++++++++ test/fixtures/ES-RI-2021.json | 156 ++++++++++++++++ test/fixtures/ES-RI-2022.json | 166 +++++++++++++++++ test/fixtures/ES-RI-2023.json | 166 +++++++++++++++++ test/fixtures/ES-RI-2024.json | 166 +++++++++++++++++ test/fixtures/ES-RI-2025.json | 166 +++++++++++++++++ test/fixtures/ES-VC-2015.json | 176 ++++++++++++++++++ test/fixtures/ES-VC-2016.json | 166 +++++++++++++++++ test/fixtures/ES-VC-2017.json | 166 +++++++++++++++++ test/fixtures/ES-VC-2018.json | 156 ++++++++++++++++ test/fixtures/ES-VC-2019.json | 176 ++++++++++++++++++ test/fixtures/ES-VC-2020.json | 176 ++++++++++++++++++ test/fixtures/ES-VC-2021.json | 156 ++++++++++++++++ test/fixtures/ES-VC-2022.json | 166 +++++++++++++++++ test/fixtures/ES-VC-2023.json | 166 +++++++++++++++++ test/fixtures/ES-VC-2024.json | 166 +++++++++++++++++ test/fixtures/ES-VC-2025.json | 166 +++++++++++++++++ test/fixtures/IC-2015.json | 2 +- test/fixtures/IC-2016.json | 14 +- test/fixtures/IC-2017.json | 2 +- test/fixtures/IC-2018.json | 2 +- test/fixtures/IC-2019.json | 2 +- test/fixtures/IC-2020.json | 2 +- test/fixtures/IC-2021.json | 16 +- test/fixtures/IC-2022.json | 14 +- test/fixtures/IC-2023.json | 2 +- test/fixtures/IC-2024.json | 2 +- test/fixtures/IC-2025.json | 2 +- test/fixtures/IC-EH-2015.json | 2 +- test/fixtures/IC-EH-2016.json | 14 +- test/fixtures/IC-EH-2017.json | 2 +- test/fixtures/IC-EH-2018.json | 2 +- test/fixtures/IC-EH-2019.json | 2 +- test/fixtures/IC-EH-2020.json | 2 +- test/fixtures/IC-EH-2021.json | 16 +- test/fixtures/IC-EH-2022.json | 14 +- test/fixtures/IC-EH-2023.json | 2 +- test/fixtures/IC-EH-2024.json | 2 +- test/fixtures/IC-EH-2025.json | 2 +- test/fixtures/IC-FU-2015.json | 2 +- test/fixtures/IC-FU-2016.json | 14 +- test/fixtures/IC-FU-2017.json | 2 +- test/fixtures/IC-FU-2018.json | 2 +- test/fixtures/IC-FU-2019.json | 2 +- test/fixtures/IC-FU-2020.json | 2 +- test/fixtures/IC-FU-2021.json | 16 +- test/fixtures/IC-FU-2022.json | 14 +- test/fixtures/IC-FU-2023.json | 2 +- test/fixtures/IC-FU-2024.json | 2 +- test/fixtures/IC-FU-2025.json | 2 +- test/fixtures/IC-GC-2015.json | 2 +- test/fixtures/IC-GC-2016.json | 14 +- test/fixtures/IC-GC-2017.json | 2 +- test/fixtures/IC-GC-2018.json | 2 +- test/fixtures/IC-GC-2019.json | 2 +- test/fixtures/IC-GC-2020.json | 2 +- test/fixtures/IC-GC-2021.json | 16 +- test/fixtures/IC-GC-2022.json | 14 +- test/fixtures/IC-GC-2023.json | 2 +- test/fixtures/IC-GC-2024.json | 2 +- test/fixtures/IC-GC-2025.json | 2 +- test/fixtures/IC-LA-2015.json | 2 +- test/fixtures/IC-LA-2016.json | 14 +- test/fixtures/IC-LA-2017.json | 2 +- test/fixtures/IC-LA-2018.json | 2 +- test/fixtures/IC-LA-2019.json | 2 +- test/fixtures/IC-LA-2020.json | 2 +- test/fixtures/IC-LA-2021.json | 16 +- test/fixtures/IC-LA-2022.json | 14 +- test/fixtures/IC-LA-2023.json | 2 +- test/fixtures/IC-LA-2024.json | 2 +- test/fixtures/IC-LA-2025.json | 2 +- test/fixtures/IC-LG-2015.json | 2 +- test/fixtures/IC-LG-2016.json | 14 +- test/fixtures/IC-LG-2017.json | 2 +- test/fixtures/IC-LG-2018.json | 2 +- test/fixtures/IC-LG-2019.json | 2 +- test/fixtures/IC-LG-2020.json | 2 +- test/fixtures/IC-LG-2021.json | 16 +- test/fixtures/IC-LG-2022.json | 14 +- test/fixtures/IC-LG-2023.json | 2 +- test/fixtures/IC-LG-2024.json | 2 +- test/fixtures/IC-LG-2025.json | 2 +- test/fixtures/IC-LP-2015.json | 2 +- test/fixtures/IC-LP-2016.json | 14 +- test/fixtures/IC-LP-2017.json | 2 +- test/fixtures/IC-LP-2018.json | 2 +- test/fixtures/IC-LP-2019.json | 2 +- test/fixtures/IC-LP-2020.json | 2 +- test/fixtures/IC-LP-2021.json | 16 +- test/fixtures/IC-LP-2022.json | 14 +- test/fixtures/IC-LP-2023.json | 2 +- test/fixtures/IC-LP-2024.json | 2 +- test/fixtures/IC-LP-2025.json | 2 +- test/fixtures/IC-TE-2015.json | 2 +- test/fixtures/IC-TE-2016.json | 14 +- test/fixtures/IC-TE-2017.json | 2 +- test/fixtures/IC-TE-2018.json | 2 +- test/fixtures/IC-TE-2019.json | 2 +- test/fixtures/IC-TE-2020.json | 2 +- test/fixtures/IC-TE-2021.json | 16 +- test/fixtures/IC-TE-2022.json | 14 +- test/fixtures/IC-TE-2023.json | 2 +- test/fixtures/IC-TE-2024.json | 2 +- test/fixtures/IC-TE-2025.json | 2 +- 389 files changed, 27762 insertions(+), 862 deletions(-) create mode 100644 test/fixtures/ES-AS-2015.json create mode 100644 test/fixtures/ES-AS-2016.json create mode 100644 test/fixtures/ES-AS-2017.json create mode 100644 test/fixtures/ES-AS-2018.json create mode 100644 test/fixtures/ES-AS-2019.json create mode 100644 test/fixtures/ES-AS-2020.json create mode 100644 test/fixtures/ES-AS-2021.json create mode 100644 test/fixtures/ES-AS-2022.json create mode 100644 test/fixtures/ES-AS-2023.json create mode 100644 test/fixtures/ES-AS-2024.json create mode 100644 test/fixtures/ES-AS-2025.json create mode 100644 test/fixtures/ES-CB-2015.json create mode 100644 test/fixtures/ES-CB-2016.json create mode 100644 test/fixtures/ES-CB-2017.json create mode 100644 test/fixtures/ES-CB-2018.json create mode 100644 test/fixtures/ES-CB-2019.json create mode 100644 test/fixtures/ES-CB-2020.json create mode 100644 test/fixtures/ES-CB-2021.json create mode 100644 test/fixtures/ES-CB-2022.json create mode 100644 test/fixtures/ES-CB-2023.json create mode 100644 test/fixtures/ES-CB-2024.json create mode 100644 test/fixtures/ES-CB-2025.json create mode 100644 test/fixtures/ES-CE-2015.json create mode 100644 test/fixtures/ES-CE-2016.json create mode 100644 test/fixtures/ES-CE-2017.json create mode 100644 test/fixtures/ES-CE-2018.json create mode 100644 test/fixtures/ES-CE-2019.json create mode 100644 test/fixtures/ES-CE-2020.json create mode 100644 test/fixtures/ES-CE-2021.json create mode 100644 test/fixtures/ES-CE-2022.json create mode 100644 test/fixtures/ES-CE-2023.json create mode 100644 test/fixtures/ES-CE-2024.json create mode 100644 test/fixtures/ES-CE-2025.json create mode 100644 test/fixtures/ES-CL-2015.json create mode 100644 test/fixtures/ES-CL-2016.json create mode 100644 test/fixtures/ES-CL-2017.json create mode 100644 test/fixtures/ES-CL-2018.json create mode 100644 test/fixtures/ES-CL-2019.json create mode 100644 test/fixtures/ES-CL-2020.json create mode 100644 test/fixtures/ES-CL-2021.json create mode 100644 test/fixtures/ES-CL-2022.json create mode 100644 test/fixtures/ES-CL-2023.json create mode 100644 test/fixtures/ES-CL-2024.json create mode 100644 test/fixtures/ES-CL-2025.json create mode 100644 test/fixtures/ES-CM-2015.json create mode 100644 test/fixtures/ES-CM-2016.json create mode 100644 test/fixtures/ES-CM-2017.json create mode 100644 test/fixtures/ES-CM-2018.json create mode 100644 test/fixtures/ES-CM-2019.json create mode 100644 test/fixtures/ES-CM-2020.json create mode 100644 test/fixtures/ES-CM-2021.json create mode 100644 test/fixtures/ES-CM-2022.json create mode 100644 test/fixtures/ES-CM-2023.json create mode 100644 test/fixtures/ES-CM-2024.json create mode 100644 test/fixtures/ES-CM-2025.json create mode 100644 test/fixtures/ES-EX-2015.json create mode 100644 test/fixtures/ES-EX-2016.json create mode 100644 test/fixtures/ES-EX-2017.json create mode 100644 test/fixtures/ES-EX-2018.json create mode 100644 test/fixtures/ES-EX-2019.json create mode 100644 test/fixtures/ES-EX-2020.json create mode 100644 test/fixtures/ES-EX-2021.json create mode 100644 test/fixtures/ES-EX-2022.json create mode 100644 test/fixtures/ES-EX-2023.json create mode 100644 test/fixtures/ES-EX-2024.json create mode 100644 test/fixtures/ES-EX-2025.json create mode 100644 test/fixtures/ES-GA-2015.json create mode 100644 test/fixtures/ES-GA-2016.json create mode 100644 test/fixtures/ES-GA-2017.json create mode 100644 test/fixtures/ES-GA-2018.json create mode 100644 test/fixtures/ES-GA-2019.json create mode 100644 test/fixtures/ES-GA-2020.json create mode 100644 test/fixtures/ES-GA-2021.json create mode 100644 test/fixtures/ES-GA-2022.json create mode 100644 test/fixtures/ES-GA-2023.json create mode 100644 test/fixtures/ES-GA-2024.json create mode 100644 test/fixtures/ES-GA-2025.json create mode 100644 test/fixtures/ES-IB-2015.json create mode 100644 test/fixtures/ES-IB-2016.json create mode 100644 test/fixtures/ES-IB-2017.json create mode 100644 test/fixtures/ES-IB-2018.json create mode 100644 test/fixtures/ES-IB-2019.json create mode 100644 test/fixtures/ES-IB-2020.json create mode 100644 test/fixtures/ES-IB-2021.json create mode 100644 test/fixtures/ES-IB-2022.json create mode 100644 test/fixtures/ES-IB-2023.json create mode 100644 test/fixtures/ES-IB-2024.json create mode 100644 test/fixtures/ES-IB-2025.json create mode 100644 test/fixtures/ES-MC-2015.json create mode 100644 test/fixtures/ES-MC-2016.json create mode 100644 test/fixtures/ES-MC-2017.json create mode 100644 test/fixtures/ES-MC-2018.json create mode 100644 test/fixtures/ES-MC-2019.json create mode 100644 test/fixtures/ES-MC-2020.json create mode 100644 test/fixtures/ES-MC-2021.json create mode 100644 test/fixtures/ES-MC-2022.json create mode 100644 test/fixtures/ES-MC-2023.json create mode 100644 test/fixtures/ES-MC-2024.json create mode 100644 test/fixtures/ES-MC-2025.json create mode 100644 test/fixtures/ES-ML-2015.json create mode 100644 test/fixtures/ES-ML-2016.json create mode 100644 test/fixtures/ES-ML-2017.json create mode 100644 test/fixtures/ES-ML-2018.json create mode 100644 test/fixtures/ES-ML-2019.json create mode 100644 test/fixtures/ES-ML-2020.json create mode 100644 test/fixtures/ES-ML-2021.json create mode 100644 test/fixtures/ES-ML-2022.json create mode 100644 test/fixtures/ES-ML-2023.json create mode 100644 test/fixtures/ES-ML-2024.json create mode 100644 test/fixtures/ES-ML-2025.json create mode 100644 test/fixtures/ES-NC-2015.json create mode 100644 test/fixtures/ES-NC-2016.json create mode 100644 test/fixtures/ES-NC-2017.json create mode 100644 test/fixtures/ES-NC-2018.json create mode 100644 test/fixtures/ES-NC-2019.json create mode 100644 test/fixtures/ES-NC-2020.json create mode 100644 test/fixtures/ES-NC-2021.json create mode 100644 test/fixtures/ES-NC-2022.json create mode 100644 test/fixtures/ES-NC-2023.json create mode 100644 test/fixtures/ES-NC-2024.json create mode 100644 test/fixtures/ES-NC-2025.json create mode 100644 test/fixtures/ES-PV-2015.json create mode 100644 test/fixtures/ES-PV-2016.json create mode 100644 test/fixtures/ES-PV-2017.json create mode 100644 test/fixtures/ES-PV-2018.json create mode 100644 test/fixtures/ES-PV-2019.json create mode 100644 test/fixtures/ES-PV-2020.json create mode 100644 test/fixtures/ES-PV-2021.json create mode 100644 test/fixtures/ES-PV-2022.json create mode 100644 test/fixtures/ES-PV-2023.json create mode 100644 test/fixtures/ES-PV-2024.json create mode 100644 test/fixtures/ES-PV-2025.json create mode 100644 test/fixtures/ES-RI-2015.json create mode 100644 test/fixtures/ES-RI-2016.json create mode 100644 test/fixtures/ES-RI-2017.json create mode 100644 test/fixtures/ES-RI-2018.json create mode 100644 test/fixtures/ES-RI-2019.json create mode 100644 test/fixtures/ES-RI-2020.json create mode 100644 test/fixtures/ES-RI-2021.json create mode 100644 test/fixtures/ES-RI-2022.json create mode 100644 test/fixtures/ES-RI-2023.json create mode 100644 test/fixtures/ES-RI-2024.json create mode 100644 test/fixtures/ES-RI-2025.json create mode 100644 test/fixtures/ES-VC-2015.json create mode 100644 test/fixtures/ES-VC-2016.json create mode 100644 test/fixtures/ES-VC-2017.json create mode 100644 test/fixtures/ES-VC-2018.json create mode 100644 test/fixtures/ES-VC-2019.json create mode 100644 test/fixtures/ES-VC-2020.json create mode 100644 test/fixtures/ES-VC-2021.json create mode 100644 test/fixtures/ES-VC-2022.json create mode 100644 test/fixtures/ES-VC-2023.json create mode 100644 test/fixtures/ES-VC-2024.json create mode 100644 test/fixtures/ES-VC-2025.json diff --git a/README.md b/README.md index 3691766fc..efeb84c53 100644 --- a/README.md +++ b/README.md @@ -259,18 +259,32 @@ Countries: 196 ├── EH: الجمهورية العربية الصحراوية الديمقراطية ├── ER: Eritrea ├── ES: España -│ ├── MD: Comunidad de Madrid │ ├── AN: Andalucía │ ├── AR: Aragón -│ ├── CT: Catalonia -│ └── CN: Islas Canarias -│ ├── EH: El Hierro -│ ├── FU: Fuerteventura -│ ├── GC: Gran Canaria -│ ├── LG: La Gomera -│ ├── LP: La Palma -│ ├── LA: Lanzarote -│ └── TE: Tenerife +│ ├── AS: Asturias +│ ├── CB: Cantabria +│ ├── CE: Ciudad de Ceuta +│ ├── CL: Castilla y León +│ ├── CM: Castile-La Mancha +│ ├── CN: Islas Canarias +│ │ ├── EH: El Hierro +│ │ ├── FU: Fuerteventura +│ │ ├── GC: Gran Canaria +│ │ ├── LG: La Gomera +│ │ ├── LP: La Palma +│ │ ├── LA: Lanzarote +│ │ └── TE: Tenerife +│ ├── CT: Cataluña +│ ├── EX: Extremadura +│ ├── GA: Galicia +│ ├── IB: Illes Balears +│ ├── MC: Murcia Region +│ ├── MD: Comunidad de Madrid +│ ├── ML: Ciudad de Melilla +│ ├── NC: Comunidad Foral de Navarra +│ ├── PV: País Vasco +│ ├── RI: La Rioja +│ └── VC: Comunitat Valenciana ├── ET: ኢትዮጵያ ├── FI: Suomi ├── FJ: Matanitu Tugalala o Viti diff --git a/data/countries/ES.yaml b/data/countries/ES.yaml index 12c70d9d4..ac3ed3c93 100644 --- a/data/countries/ES.yaml +++ b/data/countries/ES.yaml @@ -3,9 +3,13 @@ holidays: # @source https://www.boe.es/boe/dias/2018/10/20/pdfs/BOE-A-2018-14369.pdf # @source https://www.boe.es/boe/dias/2019/10/11/pdfs/BOE-A-2019-14552.pdf # @source https://www.boe.es/boe/dias/2020/11/02/pdfs/BOE-A-2020-13343.pdf + # @source https://www.boe.es/boe/dias/2021/10/21/pdfs/BOE-A-2021-17113.pdf + # @source https://www.boe.es/buscar/doc.php?id=BOE-A-2021-17113 + # buscar: "la relación de fiestas laborales para el año 20xx" ES: names: es: España + ca: Espanya en: Spain langs: - es @@ -31,7 +35,6 @@ holidays: type: observance easter -3: _name: easter -3 - type: observance easter -2: _name: easter -2 easter: @@ -39,10 +42,6 @@ holidays: type: observance 05-01: _name: 05-01 - substitutes 05-01 if sunday then next monday: - type: observance - substitute: true - _name: 05-01 1st sunday in May: _name: Mothers Day type: observance @@ -56,10 +55,6 @@ holidays: note: regional 08-15: _name: 08-15 - substitutes 08-15 if sunday then next monday: - substitute: true - type: observance - _name: 08-15 10-12: name: es: Fiesta Nacional de España @@ -91,57 +86,109 @@ holidays: 12-25: _name: 12-25 substitutes 12-25 if sunday then next monday: - type: observance substitute: true _name: 12-25 states: - MD: - name: Comunidad de Madrid - days: - 05-16: - name: - es: San Isidro Labrador - 11-09 if sunday then next monday: - name: - es: Nuestra Señora de la Almudena AN: name: Andalucía days: 02-28: name: es: Día de Andalucía + substitutes 02-28 if Sunday then next Monday: + substitute: true + name: + es: Día de Andalucía + substitutes 05-01 if Sunday then next Monday: + substitute: true + _name: 05-01 + substitutes 08-15 if Sunday then next Monday: + substitute: true + _name: 08-15 + easter -3: + _name: easter -3 AR: name: Aragón days: - 04-23 if sunday then next monday: + 04-23: name: es: Día de Aragón - # @source: https://ajuntament.barcelona.cat/calendarifestius/ca/ - CT: - name: Catalonia - days: - 09-11: - name: - es: Diada de Catalunya - 06-24: - name: - es: Sant Joan - 09-24 if sunday then next monday: - name: - es: Mare de Déu de la Mercè - 12-26: + substitutes 04-23 if Sunday then next Monday: + substitute: true name: - es: Sant Esteve - # AS: - # name: Asturias - # CB: - # name: Cantabria - # CE: - # name: Ceuta - # CL: - # name: Castile and León - # CM: - # name: Castile-La Mancha + es: Día de Aragón + substitutes 05-01 if Sunday then next Monday: + substitute: true + _name: 05-01 + substitutes 08-15 if Sunday then next Monday: + substitute: true + _name: 08-15 + AS: + name: Asturias + days: + substitutes 05-01 if Sunday then next Monday: + substitute: true + _name: 05-01 + substitutes 08-15 if Sunday then next Monday: + substitute: true + _name: 08-15 + 09-08: + name: Día de Asturias + substitutes 09-08 if Sunday then next Monday: + substitute: true + name: Día de Asturias + CB: + name: Cantabria + days: + 06-28: + name: Día de las Instituciones de Cantabria + substitutes 06-28 if Sunday then next Monday: + name: Día de las Instituciones de Cantabria + 09-15: + name: La Bien Aparecida + substitutes 09-15 if Sunday then next Monday: + name: La Bien Aparecida + CE: + name: Ciudad de Ceuta + days: + 08-05: + name: Nuestra Señora de África + substitutes 08-05 if Sunday then next Monday: + substitute: true + name: Nuestra Señora de África + 09-02: + name: Día de Ceuta + substitutes 09-02 if Sunday then next Monday: + substitute: true + name: Día de Ceuta + 9 Dhu al-Hijjah: + _name: 9 Dhu al-Hijjah + CL: + names: + es: Castilla y León + en: Castile and León + days: + 04-23: + name: Fiesta de Castilla y León + substitutes 04-23 if Sunday then next Monday: + substitute: true + name: Fiesta de Castilla y León + substitutes 05-01 if Sunday then next Monday: + substitute: true + _name: 05-01 + substitutes 08-15 if Sunday then next Monday: + substitute: true + _name: 08-15 + CM: + name: Castile-La Mancha + days: + 05-31 since 2020: + name: Día de Castilla-La Mancha + substitutes 05-31 if Sunday then next Monday since 2020: + substitute: true + name: Día de Castilla-La Mancha + easter 60: + _name: easter 60 CN: names: es: Islas Canarias @@ -200,21 +247,154 @@ holidays: - IC - regions - TE - # EX: - # name: Extremadura - # GA: - # name: Galicia - # IB: - # name: Balearic Islands - # MC: - # name: Murcia Region - # ML: - # name: Melilla - # NC: - # name: Navarra Chartered Community - # PV: - # name: Basque Country - # RI: - # name: La Rioja - # VC: - # name: Valencian Community + # @source: https://ajuntament.barcelona.cat/calendarifestius/ca/ + CT: + names: + ca: Catalunya + es: Cataluña + en: Catalonia + days: + 09-11: + name: + ca: Diada de Catalunya + es: Dia de Cataluña + 06-24: + name: + ca: Sant Joan + es: San Juan + easter -3: + _name: easter -3 + type: observance + easter 1: + _name: easter 1 + easter 50: + _name: easter 50 + substitutes 05-01 if Saturday, Sunday then next Monday: + substitute: true + _name: 05-01 + 09-24 if sunday then next monday: + name: + es: Mare de Déu de la Mercè + 12-26: + name: + ca: Sant Esteve + es: San Esteban + type: observance + EX: + name: Extremadura + days: + substitutes 05-01 if Sunday then next Monday: + substitute: true + _name: 05-01 + 09-08: + name: Día de Extremadura + substitutes 09-08 if Sunday then next Monday: + substitute: true + name: Día de Extremadura + GA: + name: Galicia + days: + 05-17: + name: Día de las Letras Gallegas + substitutes 05-17 if Sunday then next Monday: + substitute: true + name: Día de las Letras Gallegas + 07-25: + name: Día Nacional de Galicia + substitutes 07-25 if Sunday then next Monday: + substitute: true + name: Día Nacional de Galicia + IB: + names: + es: Illes Balears + en: Balearic Islands + days: + 03-01: + name: + es: Día de les Illes Balears + substitutes 03-01 if Sunday then next Monday: + substitute: true + name: + es: Día de les Illes Balears + easter 1: + _name: easter 1 + 12-26: + name: + es: Sant Esteve + type: observance + MC: + name: Murcia Region + days: + substitutes 05-01 if Sunday then next Monday: + substitute: true + _name: 05-01 + MD: + name: Comunidad de Madrid + days: + 05-02 if Sunday then next Monday: + name: + es: Día de la Comunidad de Madrid + substitutes 05-02 if Sunday then next Monday: + substitute: true + name: + es: Día de la Comunidad de Madrid + 05-16: + name: + es: San Isidro Labrador + type: observance + 07-25: + name: Santiago Apóstol + substitutes 07-25 if Sunday then next Monday: + substitute: true + name: Santiago Apóstol + 11-09 if sunday then next monday: + name: + es: Nuestra Señora de la Almudena + type: observance + ML: + name: Ciudad de Melilla + days: + 1 Shawwal: + _name: 1 Shawwal + 10 Dhu al-Hijjah: + _name: 10 Dhu al-Hijjah + NC: + names: + es: Comunidad Foral de Navarra + en: Navarra Chartered Community + days: + easter 1: + _name: easter 1 + 07-25: + name: Santiago Apóstol + substitutes 07-25 if Sunday then next Monday: + substitute: true + name: Santiago Apóstol + PV: + names: + es: País Vasco + en: Basque Country + days: + easter 1: + _name: easter 1 + 07-25: + name: Santiago Apóstol + substitutes 07-25 if Sunday then next Monday: + substitute: true + name: Santiago Apóstol + "2022-09-06": + name: V Centenario Vuelta al Mundo + RI: + name: La Rioja + days: + easter 1: + _name: easter 1 + VC: + names: + es: Comunitat Valenciana + en: Valencian Community + days: + 03-19: + _name: 03-19 + easter 1: + _name: easter 1 diff --git a/data/countries/IC.yaml b/data/countries/IC.yaml index 3e1e4427c..2a505c10c 100644 --- a/data/countries/IC.yaml +++ b/data/countries/IC.yaml @@ -15,6 +15,14 @@ holidays: name: es: Día de Canarias en: Canary Islands Day + substitutes 05-30 if Sunday then next Monday: + substitute: true + name: + es: Día de Canarias + en: Canary Islands Day + substitutes 08-15 if Sunday then next Monday: + substitute: true + _name: 08-15 regions: EH: names: diff --git a/data/names.yaml b/data/names.yaml index 6a58394d8..7701fe810 100644 --- a/data/names.yaml +++ b/data/names.yaml @@ -834,6 +834,7 @@ names: bn: ঈদুল ফিতর bs: Ramazanski bajram de: Zuckerfest + es: Fiesta del Eid Fitr fa: ﻋﯿﺪ ﺳﻌﯿﺪ ﻓﻄﺮ fil: Pagwawakas ng Ramadan fr: Fête de fin du Ramadan @@ -850,6 +851,7 @@ names: name: en: Arafat Day ar: يوم عرفة + es: Fiesta del Sacrificio-Eidul Adha ms: Hari Arafah 10 Dhu al-Hijjah: # Feast of the Sacrifice (Eid al-Adha) name: @@ -860,6 +862,7 @@ names: bn: ঈদুল আযহা bs: Kurbanski bajram de: Opferfest + es: Fiesta del Sacrificio-Aid Al Adha fa: ﻋﯿﺪ ﺳﻌﯿﺪ ﻗﺮﺑﺎن fil: Eidul Adha fr: Fête du mouton diff --git a/test/fixtures/ES-2015.json b/test/fixtures/ES-2015.json index 620a09dc6..c3e31406d 100644 --- a/test/fixtures/ES-2015.json +++ b/test/fixtures/ES-2015.json @@ -31,7 +31,7 @@ "start": "2015-04-01T22:00:00.000Z", "end": "2015-04-02T22:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-2016.json b/test/fixtures/ES-2016.json index 2ab0e4162..f558b6181 100644 --- a/test/fixtures/ES-2016.json +++ b/test/fixtures/ES-2016.json @@ -31,7 +31,7 @@ "start": "2016-03-23T23:00:00.000Z", "end": "2016-03-24T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, @@ -71,16 +71,6 @@ "rule": "05-01", "_weekday": "Sun" }, - { - "date": "2016-05-02 00:00:00", - "start": "2016-05-01T22:00:00.000Z", - "end": "2016-05-02T22:00:00.000Z", - "name": "Día del trabajador (día sustituto)", - "type": "observance", - "substitute": true, - "rule": "substitutes 05-01 if sunday then next monday", - "_weekday": "Mon" - }, { "date": "2016-05-15 00:00:00", "start": "2016-05-14T22:00:00.000Z", @@ -159,7 +149,7 @@ "start": "2016-12-25T23:00:00.000Z", "end": "2016-12-26T23:00:00.000Z", "name": "Navidad (día sustituto)", - "type": "observance", + "type": "public", "substitute": true, "rule": "substitutes 12-25 if sunday then next monday", "_weekday": "Mon" diff --git a/test/fixtures/ES-2017.json b/test/fixtures/ES-2017.json index 334949316..1ce29aaf9 100644 --- a/test/fixtures/ES-2017.json +++ b/test/fixtures/ES-2017.json @@ -41,7 +41,7 @@ "start": "2017-04-12T22:00:00.000Z", "end": "2017-04-13T22:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-2018.json b/test/fixtures/ES-2018.json index ed5c91abe..3df60d481 100644 --- a/test/fixtures/ES-2018.json +++ b/test/fixtures/ES-2018.json @@ -31,7 +31,7 @@ "start": "2018-03-28T22:00:00.000Z", "end": "2018-03-29T22:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-2019.json b/test/fixtures/ES-2019.json index b6212130b..28c8331e2 100644 --- a/test/fixtures/ES-2019.json +++ b/test/fixtures/ES-2019.json @@ -41,7 +41,7 @@ "start": "2019-04-17T22:00:00.000Z", "end": "2019-04-18T22:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-2020.json b/test/fixtures/ES-2020.json index 0e291858b..a15502df7 100644 --- a/test/fixtures/ES-2020.json +++ b/test/fixtures/ES-2020.json @@ -31,7 +31,7 @@ "start": "2020-04-08T22:00:00.000Z", "end": "2020-04-09T22:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-2021.json b/test/fixtures/ES-2021.json index e91b64c38..1a14873c2 100644 --- a/test/fixtures/ES-2021.json +++ b/test/fixtures/ES-2021.json @@ -31,7 +31,7 @@ "start": "2021-03-31T22:00:00.000Z", "end": "2021-04-01T22:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, @@ -99,16 +99,6 @@ "rule": "08-15", "_weekday": "Sun" }, - { - "date": "2021-08-16 00:00:00", - "start": "2021-08-15T22:00:00.000Z", - "end": "2021-08-16T22:00:00.000Z", - "name": "Asunción (día sustituto)", - "type": "observance", - "substitute": true, - "rule": "substitutes 08-15 if sunday then next monday", - "_weekday": "Mon" - }, { "date": "2021-10-12 00:00:00", "start": "2021-10-11T22:00:00.000Z", diff --git a/test/fixtures/ES-2022.json b/test/fixtures/ES-2022.json index 7cfde4e25..f0a7fdeb5 100644 --- a/test/fixtures/ES-2022.json +++ b/test/fixtures/ES-2022.json @@ -31,7 +31,7 @@ "start": "2022-04-13T22:00:00.000Z", "end": "2022-04-14T22:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, @@ -71,16 +71,6 @@ "rule": "05-01", "_weekday": "Sun" }, - { - "date": "2022-05-02 00:00:00", - "start": "2022-05-01T22:00:00.000Z", - "end": "2022-05-02T22:00:00.000Z", - "name": "Día del trabajador (día sustituto)", - "type": "observance", - "substitute": true, - "rule": "substitutes 05-01 if sunday then next monday", - "_weekday": "Mon" - }, { "date": "2022-06-05 00:00:00", "start": "2022-06-04T22:00:00.000Z", @@ -159,7 +149,7 @@ "start": "2022-12-25T23:00:00.000Z", "end": "2022-12-26T23:00:00.000Z", "name": "Navidad (día sustituto)", - "type": "observance", + "type": "public", "substitute": true, "rule": "substitutes 12-25 if sunday then next monday", "_weekday": "Mon" diff --git a/test/fixtures/ES-2023.json b/test/fixtures/ES-2023.json index c50ca798c..7ed847d4b 100644 --- a/test/fixtures/ES-2023.json +++ b/test/fixtures/ES-2023.json @@ -41,7 +41,7 @@ "start": "2023-04-05T22:00:00.000Z", "end": "2023-04-06T22:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-2024.json b/test/fixtures/ES-2024.json index 835a4d12c..7c35a9e6f 100644 --- a/test/fixtures/ES-2024.json +++ b/test/fixtures/ES-2024.json @@ -31,7 +31,7 @@ "start": "2024-03-27T23:00:00.000Z", "end": "2024-03-28T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-2025.json b/test/fixtures/ES-2025.json index 70c8489a9..fdf56a610 100644 --- a/test/fixtures/ES-2025.json +++ b/test/fixtures/ES-2025.json @@ -31,7 +31,7 @@ "start": "2025-04-16T22:00:00.000Z", "end": "2025-04-17T22:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-AN-2015.json b/test/fixtures/ES-AN-2015.json index 4927edf05..410d726cc 100644 --- a/test/fixtures/ES-AN-2015.json +++ b/test/fixtures/ES-AN-2015.json @@ -40,7 +40,7 @@ "start": "2015-04-01T22:00:00.000Z", "end": "2015-04-02T22:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-AN-2016.json b/test/fixtures/ES-AN-2016.json index e9c0dfcc9..6bd41605f 100644 --- a/test/fixtures/ES-AN-2016.json +++ b/test/fixtures/ES-AN-2016.json @@ -26,6 +26,16 @@ "rule": "02-28", "_weekday": "Sun" }, + { + "date": "2016-02-29 00:00:00", + "start": "2016-02-28T23:00:00.000Z", + "end": "2016-02-29T23:00:00.000Z", + "name": "Día de Andalucía (día sustituto)", + "type": "public", + "substitute": true, + "rule": "substitutes 02-28 if Sunday then next Monday", + "_weekday": "Mon" + }, { "date": "2016-03-19 00:00:00", "start": "2016-03-18T23:00:00.000Z", @@ -40,7 +50,7 @@ "start": "2016-03-23T23:00:00.000Z", "end": "2016-03-24T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, @@ -85,9 +95,9 @@ "start": "2016-05-01T22:00:00.000Z", "end": "2016-05-02T22:00:00.000Z", "name": "Día del trabajador (día sustituto)", - "type": "observance", + "type": "public", "substitute": true, - "rule": "substitutes 05-01 if sunday then next monday", + "rule": "substitutes 05-01 if Sunday then next Monday", "_weekday": "Mon" }, { @@ -168,7 +178,7 @@ "start": "2016-12-25T23:00:00.000Z", "end": "2016-12-26T23:00:00.000Z", "name": "Navidad (día sustituto)", - "type": "observance", + "type": "public", "substitute": true, "rule": "substitutes 12-25 if sunday then next monday", "_weekday": "Mon" diff --git a/test/fixtures/ES-AN-2017.json b/test/fixtures/ES-AN-2017.json index 4b7b2fdb9..0bb2543d1 100644 --- a/test/fixtures/ES-AN-2017.json +++ b/test/fixtures/ES-AN-2017.json @@ -50,7 +50,7 @@ "start": "2017-04-12T22:00:00.000Z", "end": "2017-04-13T22:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-AN-2018.json b/test/fixtures/ES-AN-2018.json index 03d6832a2..b78808fc3 100644 --- a/test/fixtures/ES-AN-2018.json +++ b/test/fixtures/ES-AN-2018.json @@ -40,7 +40,7 @@ "start": "2018-03-28T22:00:00.000Z", "end": "2018-03-29T22:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-AN-2019.json b/test/fixtures/ES-AN-2019.json index 0d0a96476..a32ab097d 100644 --- a/test/fixtures/ES-AN-2019.json +++ b/test/fixtures/ES-AN-2019.json @@ -50,7 +50,7 @@ "start": "2019-04-17T22:00:00.000Z", "end": "2019-04-18T22:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-AN-2020.json b/test/fixtures/ES-AN-2020.json index 26253c5b0..d5b258643 100644 --- a/test/fixtures/ES-AN-2020.json +++ b/test/fixtures/ES-AN-2020.json @@ -40,7 +40,7 @@ "start": "2020-04-08T22:00:00.000Z", "end": "2020-04-09T22:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-AN-2021.json b/test/fixtures/ES-AN-2021.json index b9b23f928..291aeadc2 100644 --- a/test/fixtures/ES-AN-2021.json +++ b/test/fixtures/ES-AN-2021.json @@ -26,6 +26,16 @@ "rule": "02-28", "_weekday": "Sun" }, + { + "date": "2021-03-01 00:00:00", + "start": "2021-02-28T23:00:00.000Z", + "end": "2021-03-01T23:00:00.000Z", + "name": "Día de Andalucía (día sustituto)", + "type": "public", + "substitute": true, + "rule": "substitutes 02-28 if Sunday then next Monday", + "_weekday": "Mon" + }, { "date": "2021-03-19 00:00:00", "start": "2021-03-18T23:00:00.000Z", @@ -40,7 +50,7 @@ "start": "2021-03-31T22:00:00.000Z", "end": "2021-04-01T22:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, @@ -113,9 +123,9 @@ "start": "2021-08-15T22:00:00.000Z", "end": "2021-08-16T22:00:00.000Z", "name": "Asunción (día sustituto)", - "type": "observance", + "type": "public", "substitute": true, - "rule": "substitutes 08-15 if sunday then next monday", + "rule": "substitutes 08-15 if Sunday then next Monday", "_weekday": "Mon" }, { diff --git a/test/fixtures/ES-AN-2022.json b/test/fixtures/ES-AN-2022.json index 30539da37..5c3568d25 100644 --- a/test/fixtures/ES-AN-2022.json +++ b/test/fixtures/ES-AN-2022.json @@ -40,7 +40,7 @@ "start": "2022-04-13T22:00:00.000Z", "end": "2022-04-14T22:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, @@ -85,9 +85,9 @@ "start": "2022-05-01T22:00:00.000Z", "end": "2022-05-02T22:00:00.000Z", "name": "Día del trabajador (día sustituto)", - "type": "observance", + "type": "public", "substitute": true, - "rule": "substitutes 05-01 if sunday then next monday", + "rule": "substitutes 05-01 if Sunday then next Monday", "_weekday": "Mon" }, { @@ -168,7 +168,7 @@ "start": "2022-12-25T23:00:00.000Z", "end": "2022-12-26T23:00:00.000Z", "name": "Navidad (día sustituto)", - "type": "observance", + "type": "public", "substitute": true, "rule": "substitutes 12-25 if sunday then next monday", "_weekday": "Mon" diff --git a/test/fixtures/ES-AN-2023.json b/test/fixtures/ES-AN-2023.json index 67d78210e..004bbebfe 100644 --- a/test/fixtures/ES-AN-2023.json +++ b/test/fixtures/ES-AN-2023.json @@ -50,7 +50,7 @@ "start": "2023-04-05T22:00:00.000Z", "end": "2023-04-06T22:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-AN-2024.json b/test/fixtures/ES-AN-2024.json index 12b7538f3..2e53e9051 100644 --- a/test/fixtures/ES-AN-2024.json +++ b/test/fixtures/ES-AN-2024.json @@ -40,7 +40,7 @@ "start": "2024-03-27T23:00:00.000Z", "end": "2024-03-28T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-AN-2025.json b/test/fixtures/ES-AN-2025.json index 01eaa3e43..e1c6cb82e 100644 --- a/test/fixtures/ES-AN-2025.json +++ b/test/fixtures/ES-AN-2025.json @@ -40,7 +40,7 @@ "start": "2025-04-16T22:00:00.000Z", "end": "2025-04-17T22:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-AR-2015.json b/test/fixtures/ES-AR-2015.json index 66ddfd4e6..ec44e3c20 100644 --- a/test/fixtures/ES-AR-2015.json +++ b/test/fixtures/ES-AR-2015.json @@ -31,7 +31,7 @@ "start": "2015-04-01T22:00:00.000Z", "end": "2015-04-02T22:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, @@ -59,7 +59,7 @@ "end": "2015-04-23T22:00:00.000Z", "name": "Día de Aragón", "type": "public", - "rule": "04-23 if sunday then next monday", + "rule": "04-23", "_weekday": "Thu" }, { diff --git a/test/fixtures/ES-AR-2016.json b/test/fixtures/ES-AR-2016.json index b65ba566b..b9c5eb502 100644 --- a/test/fixtures/ES-AR-2016.json +++ b/test/fixtures/ES-AR-2016.json @@ -31,7 +31,7 @@ "start": "2016-03-23T23:00:00.000Z", "end": "2016-03-24T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, @@ -59,7 +59,7 @@ "end": "2016-04-23T22:00:00.000Z", "name": "Día de Aragón", "type": "public", - "rule": "04-23 if sunday then next monday", + "rule": "04-23", "_weekday": "Sat" }, { @@ -85,9 +85,9 @@ "start": "2016-05-01T22:00:00.000Z", "end": "2016-05-02T22:00:00.000Z", "name": "Día del trabajador (día sustituto)", - "type": "observance", + "type": "public", "substitute": true, - "rule": "substitutes 05-01 if sunday then next monday", + "rule": "substitutes 05-01 if Sunday then next Monday", "_weekday": "Mon" }, { @@ -168,7 +168,7 @@ "start": "2016-12-25T23:00:00.000Z", "end": "2016-12-26T23:00:00.000Z", "name": "Navidad (día sustituto)", - "type": "observance", + "type": "public", "substitute": true, "rule": "substitutes 12-25 if sunday then next monday", "_weekday": "Mon" diff --git a/test/fixtures/ES-AR-2017.json b/test/fixtures/ES-AR-2017.json index dadded648..aec8c7c89 100644 --- a/test/fixtures/ES-AR-2017.json +++ b/test/fixtures/ES-AR-2017.json @@ -41,7 +41,7 @@ "start": "2017-04-12T22:00:00.000Z", "end": "2017-04-13T22:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, @@ -63,13 +63,23 @@ "rule": "easter", "_weekday": "Sun" }, + { + "date": "2017-04-23 00:00:00", + "start": "2017-04-22T22:00:00.000Z", + "end": "2017-04-23T22:00:00.000Z", + "name": "Día de Aragón", + "type": "public", + "rule": "04-23", + "_weekday": "Sun" + }, { "date": "2017-04-24 00:00:00", "start": "2017-04-23T22:00:00.000Z", "end": "2017-04-24T22:00:00.000Z", - "name": "Día de Aragón", + "name": "Día de Aragón (día sustituto)", "type": "public", - "rule": "04-23 if sunday then next monday", + "substitute": true, + "rule": "substitutes 04-23 if Sunday then next Monday", "_weekday": "Mon" }, { diff --git a/test/fixtures/ES-AR-2018.json b/test/fixtures/ES-AR-2018.json index e380775c0..f7b67c401 100644 --- a/test/fixtures/ES-AR-2018.json +++ b/test/fixtures/ES-AR-2018.json @@ -31,7 +31,7 @@ "start": "2018-03-28T22:00:00.000Z", "end": "2018-03-29T22:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, @@ -59,7 +59,7 @@ "end": "2018-04-23T22:00:00.000Z", "name": "Día de Aragón", "type": "public", - "rule": "04-23 if sunday then next monday", + "rule": "04-23", "_weekday": "Mon" }, { diff --git a/test/fixtures/ES-AR-2019.json b/test/fixtures/ES-AR-2019.json index c0b845c3e..4934791b7 100644 --- a/test/fixtures/ES-AR-2019.json +++ b/test/fixtures/ES-AR-2019.json @@ -41,7 +41,7 @@ "start": "2019-04-17T22:00:00.000Z", "end": "2019-04-18T22:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, @@ -69,7 +69,7 @@ "end": "2019-04-23T22:00:00.000Z", "name": "Día de Aragón", "type": "public", - "rule": "04-23 if sunday then next monday", + "rule": "04-23", "_weekday": "Tue" }, { diff --git a/test/fixtures/ES-AR-2020.json b/test/fixtures/ES-AR-2020.json index d32e00d10..bd52b1be0 100644 --- a/test/fixtures/ES-AR-2020.json +++ b/test/fixtures/ES-AR-2020.json @@ -31,7 +31,7 @@ "start": "2020-04-08T22:00:00.000Z", "end": "2020-04-09T22:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, @@ -59,7 +59,7 @@ "end": "2020-04-23T22:00:00.000Z", "name": "Día de Aragón", "type": "public", - "rule": "04-23 if sunday then next monday", + "rule": "04-23", "_weekday": "Thu" }, { diff --git a/test/fixtures/ES-AR-2021.json b/test/fixtures/ES-AR-2021.json index 37e7e7bcc..67c9d7e8e 100644 --- a/test/fixtures/ES-AR-2021.json +++ b/test/fixtures/ES-AR-2021.json @@ -31,7 +31,7 @@ "start": "2021-03-31T22:00:00.000Z", "end": "2021-04-01T22:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, @@ -59,7 +59,7 @@ "end": "2021-04-23T22:00:00.000Z", "name": "Día de Aragón", "type": "public", - "rule": "04-23 if sunday then next monday", + "rule": "04-23", "_weekday": "Fri" }, { @@ -113,9 +113,9 @@ "start": "2021-08-15T22:00:00.000Z", "end": "2021-08-16T22:00:00.000Z", "name": "Asunción (día sustituto)", - "type": "observance", + "type": "public", "substitute": true, - "rule": "substitutes 08-15 if sunday then next monday", + "rule": "substitutes 08-15 if Sunday then next Monday", "_weekday": "Mon" }, { diff --git a/test/fixtures/ES-AR-2022.json b/test/fixtures/ES-AR-2022.json index 279c68f86..761626661 100644 --- a/test/fixtures/ES-AR-2022.json +++ b/test/fixtures/ES-AR-2022.json @@ -31,7 +31,7 @@ "start": "2022-04-13T22:00:00.000Z", "end": "2022-04-14T22:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, @@ -59,7 +59,7 @@ "end": "2022-04-23T22:00:00.000Z", "name": "Día de Aragón", "type": "public", - "rule": "04-23 if sunday then next monday", + "rule": "04-23", "_weekday": "Sat" }, { @@ -85,9 +85,9 @@ "start": "2022-05-01T22:00:00.000Z", "end": "2022-05-02T22:00:00.000Z", "name": "Día del trabajador (día sustituto)", - "type": "observance", + "type": "public", "substitute": true, - "rule": "substitutes 05-01 if sunday then next monday", + "rule": "substitutes 05-01 if Sunday then next Monday", "_weekday": "Mon" }, { @@ -168,7 +168,7 @@ "start": "2022-12-25T23:00:00.000Z", "end": "2022-12-26T23:00:00.000Z", "name": "Navidad (día sustituto)", - "type": "observance", + "type": "public", "substitute": true, "rule": "substitutes 12-25 if sunday then next monday", "_weekday": "Mon" diff --git a/test/fixtures/ES-AR-2023.json b/test/fixtures/ES-AR-2023.json index d0bcd8081..9843c3d46 100644 --- a/test/fixtures/ES-AR-2023.json +++ b/test/fixtures/ES-AR-2023.json @@ -41,7 +41,7 @@ "start": "2023-04-05T22:00:00.000Z", "end": "2023-04-06T22:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, @@ -63,13 +63,23 @@ "rule": "easter", "_weekday": "Sun" }, + { + "date": "2023-04-23 00:00:00", + "start": "2023-04-22T22:00:00.000Z", + "end": "2023-04-23T22:00:00.000Z", + "name": "Día de Aragón", + "type": "public", + "rule": "04-23", + "_weekday": "Sun" + }, { "date": "2023-04-24 00:00:00", "start": "2023-04-23T22:00:00.000Z", "end": "2023-04-24T22:00:00.000Z", - "name": "Día de Aragón", + "name": "Día de Aragón (día sustituto)", "type": "public", - "rule": "04-23 if sunday then next monday", + "substitute": true, + "rule": "substitutes 04-23 if Sunday then next Monday", "_weekday": "Mon" }, { diff --git a/test/fixtures/ES-AR-2024.json b/test/fixtures/ES-AR-2024.json index 582c312bc..1a498826d 100644 --- a/test/fixtures/ES-AR-2024.json +++ b/test/fixtures/ES-AR-2024.json @@ -31,7 +31,7 @@ "start": "2024-03-27T23:00:00.000Z", "end": "2024-03-28T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, @@ -59,7 +59,7 @@ "end": "2024-04-23T22:00:00.000Z", "name": "Día de Aragón", "type": "public", - "rule": "04-23 if sunday then next monday", + "rule": "04-23", "_weekday": "Tue" }, { diff --git a/test/fixtures/ES-AR-2025.json b/test/fixtures/ES-AR-2025.json index a970e3b12..586ae70dd 100644 --- a/test/fixtures/ES-AR-2025.json +++ b/test/fixtures/ES-AR-2025.json @@ -31,7 +31,7 @@ "start": "2025-04-16T22:00:00.000Z", "end": "2025-04-17T22:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, @@ -59,7 +59,7 @@ "end": "2025-04-23T22:00:00.000Z", "name": "Día de Aragón", "type": "public", - "rule": "04-23 if sunday then next monday", + "rule": "04-23", "_weekday": "Wed" }, { diff --git a/test/fixtures/ES-AS-2015.json b/test/fixtures/ES-AS-2015.json new file mode 100644 index 000000000..1593327c8 --- /dev/null +++ b/test/fixtures/ES-AS-2015.json @@ -0,0 +1,176 @@ +[ + { + "date": "2015-01-01 00:00:00", + "start": "2014-12-31T23:00:00.000Z", + "end": "2015-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Thu" + }, + { + "date": "2015-01-06 00:00:00", + "start": "2015-01-05T23:00:00.000Z", + "end": "2015-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Tue" + }, + { + "date": "2015-03-19 00:00:00", + "start": "2015-03-18T23:00:00.000Z", + "end": "2015-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Thu" + }, + { + "date": "2015-04-02 00:00:00", + "start": "2015-04-01T22:00:00.000Z", + "end": "2015-04-02T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2015-04-03 00:00:00", + "start": "2015-04-02T22:00:00.000Z", + "end": "2015-04-03T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2015-04-05 00:00:00", + "start": "2015-04-04T22:00:00.000Z", + "end": "2015-04-05T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2015-05-01 00:00:00", + "start": "2015-04-30T22:00:00.000Z", + "end": "2015-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Fri" + }, + { + "date": "2015-05-03 00:00:00", + "start": "2015-05-02T22:00:00.000Z", + "end": "2015-05-03T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2015-05-24 00:00:00", + "start": "2015-05-23T22:00:00.000Z", + "end": "2015-05-24T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2015-07-25 00:00:00", + "start": "2015-07-24T22:00:00.000Z", + "end": "2015-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Sat" + }, + { + "date": "2015-08-15 00:00:00", + "start": "2015-08-14T22:00:00.000Z", + "end": "2015-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Sat" + }, + { + "date": "2015-09-08 00:00:00", + "start": "2015-09-07T22:00:00.000Z", + "end": "2015-09-08T22:00:00.000Z", + "name": "Día de Asturias", + "type": "public", + "rule": "09-08", + "_weekday": "Tue" + }, + { + "date": "2015-10-12 00:00:00", + "start": "2015-10-11T22:00:00.000Z", + "end": "2015-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Mon" + }, + { + "date": "2015-11-01 00:00:00", + "start": "2015-10-31T23:00:00.000Z", + "end": "2015-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Sun" + }, + { + "date": "2015-11-02 00:00:00", + "start": "2015-11-01T23:00:00.000Z", + "end": "2015-11-02T23:00:00.000Z", + "name": "Todos los Santos (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 11-01 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2015-12-06 00:00:00", + "start": "2015-12-05T23:00:00.000Z", + "end": "2015-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Sun" + }, + { + "date": "2015-12-07 00:00:00", + "start": "2015-12-06T23:00:00.000Z", + "end": "2015-12-07T23:00:00.000Z", + "name": "Día de la Constitución Española (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 12-06 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2015-12-08 00:00:00", + "start": "2015-12-07T23:00:00.000Z", + "end": "2015-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Tue" + }, + { + "date": "2015-12-25 00:00:00", + "start": "2015-12-24T23:00:00.000Z", + "end": "2015-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Fri" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-AS-2016.json b/test/fixtures/ES-AS-2016.json new file mode 100644 index 000000000..7c6404c7c --- /dev/null +++ b/test/fixtures/ES-AS-2016.json @@ -0,0 +1,176 @@ +[ + { + "date": "2016-01-01 00:00:00", + "start": "2015-12-31T23:00:00.000Z", + "end": "2016-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Fri" + }, + { + "date": "2016-01-06 00:00:00", + "start": "2016-01-05T23:00:00.000Z", + "end": "2016-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Wed" + }, + { + "date": "2016-03-19 00:00:00", + "start": "2016-03-18T23:00:00.000Z", + "end": "2016-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Sat" + }, + { + "date": "2016-03-24 00:00:00", + "start": "2016-03-23T23:00:00.000Z", + "end": "2016-03-24T23:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2016-03-25 00:00:00", + "start": "2016-03-24T23:00:00.000Z", + "end": "2016-03-25T23:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2016-03-27 00:00:00", + "start": "2016-03-26T23:00:00.000Z", + "end": "2016-03-27T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2016-05-01 00:00:00", + "start": "2016-04-30T22:00:00.000Z", + "end": "2016-05-01T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2016-05-01 00:00:00", + "start": "2016-04-30T22:00:00.000Z", + "end": "2016-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Sun" + }, + { + "date": "2016-05-02 00:00:00", + "start": "2016-05-01T22:00:00.000Z", + "end": "2016-05-02T22:00:00.000Z", + "name": "Día del trabajador (día sustituto)", + "type": "public", + "substitute": true, + "rule": "substitutes 05-01 if Sunday then next Monday", + "_weekday": "Mon" + }, + { + "date": "2016-05-15 00:00:00", + "start": "2016-05-14T22:00:00.000Z", + "end": "2016-05-15T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2016-07-25 00:00:00", + "start": "2016-07-24T22:00:00.000Z", + "end": "2016-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Mon" + }, + { + "date": "2016-08-15 00:00:00", + "start": "2016-08-14T22:00:00.000Z", + "end": "2016-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Mon" + }, + { + "date": "2016-09-08 00:00:00", + "start": "2016-09-07T22:00:00.000Z", + "end": "2016-09-08T22:00:00.000Z", + "name": "Día de Asturias", + "type": "public", + "rule": "09-08", + "_weekday": "Thu" + }, + { + "date": "2016-10-12 00:00:00", + "start": "2016-10-11T22:00:00.000Z", + "end": "2016-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Wed" + }, + { + "date": "2016-11-01 00:00:00", + "start": "2016-10-31T23:00:00.000Z", + "end": "2016-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Tue" + }, + { + "date": "2016-12-06 00:00:00", + "start": "2016-12-05T23:00:00.000Z", + "end": "2016-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Tue" + }, + { + "date": "2016-12-08 00:00:00", + "start": "2016-12-07T23:00:00.000Z", + "end": "2016-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Thu" + }, + { + "date": "2016-12-25 00:00:00", + "start": "2016-12-24T23:00:00.000Z", + "end": "2016-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Sun" + }, + { + "date": "2016-12-26 00:00:00", + "start": "2016-12-25T23:00:00.000Z", + "end": "2016-12-26T23:00:00.000Z", + "name": "Navidad (día sustituto)", + "type": "public", + "substitute": true, + "rule": "substitutes 12-25 if sunday then next monday", + "_weekday": "Mon" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-AS-2017.json b/test/fixtures/ES-AS-2017.json new file mode 100644 index 000000000..939719e21 --- /dev/null +++ b/test/fixtures/ES-AS-2017.json @@ -0,0 +1,166 @@ +[ + { + "date": "2017-01-01 00:00:00", + "start": "2016-12-31T23:00:00.000Z", + "end": "2017-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Sun" + }, + { + "date": "2017-01-02 00:00:00", + "start": "2017-01-01T23:00:00.000Z", + "end": "2017-01-02T23:00:00.000Z", + "name": "Año Nuevo (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 01-01 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2017-01-06 00:00:00", + "start": "2017-01-05T23:00:00.000Z", + "end": "2017-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Fri" + }, + { + "date": "2017-03-19 00:00:00", + "start": "2017-03-18T23:00:00.000Z", + "end": "2017-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Sun" + }, + { + "date": "2017-04-13 00:00:00", + "start": "2017-04-12T22:00:00.000Z", + "end": "2017-04-13T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2017-04-14 00:00:00", + "start": "2017-04-13T22:00:00.000Z", + "end": "2017-04-14T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2017-04-16 00:00:00", + "start": "2017-04-15T22:00:00.000Z", + "end": "2017-04-16T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2017-05-01 00:00:00", + "start": "2017-04-30T22:00:00.000Z", + "end": "2017-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Mon" + }, + { + "date": "2017-05-07 00:00:00", + "start": "2017-05-06T22:00:00.000Z", + "end": "2017-05-07T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2017-06-04 00:00:00", + "start": "2017-06-03T22:00:00.000Z", + "end": "2017-06-04T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2017-07-25 00:00:00", + "start": "2017-07-24T22:00:00.000Z", + "end": "2017-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Tue" + }, + { + "date": "2017-08-15 00:00:00", + "start": "2017-08-14T22:00:00.000Z", + "end": "2017-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Tue" + }, + { + "date": "2017-09-08 00:00:00", + "start": "2017-09-07T22:00:00.000Z", + "end": "2017-09-08T22:00:00.000Z", + "name": "Día de Asturias", + "type": "public", + "rule": "09-08", + "_weekday": "Fri" + }, + { + "date": "2017-10-12 00:00:00", + "start": "2017-10-11T22:00:00.000Z", + "end": "2017-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Thu" + }, + { + "date": "2017-11-01 00:00:00", + "start": "2017-10-31T23:00:00.000Z", + "end": "2017-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Wed" + }, + { + "date": "2017-12-06 00:00:00", + "start": "2017-12-05T23:00:00.000Z", + "end": "2017-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Wed" + }, + { + "date": "2017-12-08 00:00:00", + "start": "2017-12-07T23:00:00.000Z", + "end": "2017-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Fri" + }, + { + "date": "2017-12-25 00:00:00", + "start": "2017-12-24T23:00:00.000Z", + "end": "2017-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Mon" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-AS-2018.json b/test/fixtures/ES-AS-2018.json new file mode 100644 index 000000000..2af792ec0 --- /dev/null +++ b/test/fixtures/ES-AS-2018.json @@ -0,0 +1,156 @@ +[ + { + "date": "2018-01-01 00:00:00", + "start": "2017-12-31T23:00:00.000Z", + "end": "2018-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Mon" + }, + { + "date": "2018-01-06 00:00:00", + "start": "2018-01-05T23:00:00.000Z", + "end": "2018-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Sat" + }, + { + "date": "2018-03-19 00:00:00", + "start": "2018-03-18T23:00:00.000Z", + "end": "2018-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Mon" + }, + { + "date": "2018-03-29 00:00:00", + "start": "2018-03-28T22:00:00.000Z", + "end": "2018-03-29T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2018-03-30 00:00:00", + "start": "2018-03-29T22:00:00.000Z", + "end": "2018-03-30T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2018-04-01 00:00:00", + "start": "2018-03-31T22:00:00.000Z", + "end": "2018-04-01T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2018-05-01 00:00:00", + "start": "2018-04-30T22:00:00.000Z", + "end": "2018-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Tue" + }, + { + "date": "2018-05-06 00:00:00", + "start": "2018-05-05T22:00:00.000Z", + "end": "2018-05-06T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2018-05-20 00:00:00", + "start": "2018-05-19T22:00:00.000Z", + "end": "2018-05-20T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2018-07-25 00:00:00", + "start": "2018-07-24T22:00:00.000Z", + "end": "2018-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Wed" + }, + { + "date": "2018-08-15 00:00:00", + "start": "2018-08-14T22:00:00.000Z", + "end": "2018-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Wed" + }, + { + "date": "2018-09-08 00:00:00", + "start": "2018-09-07T22:00:00.000Z", + "end": "2018-09-08T22:00:00.000Z", + "name": "Día de Asturias", + "type": "public", + "rule": "09-08", + "_weekday": "Sat" + }, + { + "date": "2018-10-12 00:00:00", + "start": "2018-10-11T22:00:00.000Z", + "end": "2018-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Fri" + }, + { + "date": "2018-11-01 00:00:00", + "start": "2018-10-31T23:00:00.000Z", + "end": "2018-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Thu" + }, + { + "date": "2018-12-06 00:00:00", + "start": "2018-12-05T23:00:00.000Z", + "end": "2018-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Thu" + }, + { + "date": "2018-12-08 00:00:00", + "start": "2018-12-07T23:00:00.000Z", + "end": "2018-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Sat" + }, + { + "date": "2018-12-25 00:00:00", + "start": "2018-12-24T23:00:00.000Z", + "end": "2018-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Tue" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-AS-2019.json b/test/fixtures/ES-AS-2019.json new file mode 100644 index 000000000..382f6beeb --- /dev/null +++ b/test/fixtures/ES-AS-2019.json @@ -0,0 +1,186 @@ +[ + { + "date": "2019-01-01 00:00:00", + "start": "2018-12-31T23:00:00.000Z", + "end": "2019-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Tue" + }, + { + "date": "2019-01-06 00:00:00", + "start": "2019-01-05T23:00:00.000Z", + "end": "2019-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Sun" + }, + { + "date": "2019-01-07 00:00:00", + "start": "2019-01-06T23:00:00.000Z", + "end": "2019-01-07T23:00:00.000Z", + "name": "Día de los Reyes Magos (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 01-06 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2019-03-19 00:00:00", + "start": "2019-03-18T23:00:00.000Z", + "end": "2019-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Tue" + }, + { + "date": "2019-04-18 00:00:00", + "start": "2019-04-17T22:00:00.000Z", + "end": "2019-04-18T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2019-04-19 00:00:00", + "start": "2019-04-18T22:00:00.000Z", + "end": "2019-04-19T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2019-04-21 00:00:00", + "start": "2019-04-20T22:00:00.000Z", + "end": "2019-04-21T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2019-05-01 00:00:00", + "start": "2019-04-30T22:00:00.000Z", + "end": "2019-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Wed" + }, + { + "date": "2019-05-05 00:00:00", + "start": "2019-05-04T22:00:00.000Z", + "end": "2019-05-05T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2019-06-09 00:00:00", + "start": "2019-06-08T22:00:00.000Z", + "end": "2019-06-09T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2019-07-25 00:00:00", + "start": "2019-07-24T22:00:00.000Z", + "end": "2019-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Thu" + }, + { + "date": "2019-08-15 00:00:00", + "start": "2019-08-14T22:00:00.000Z", + "end": "2019-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Thu" + }, + { + "date": "2019-09-08 00:00:00", + "start": "2019-09-07T22:00:00.000Z", + "end": "2019-09-08T22:00:00.000Z", + "name": "Día de Asturias", + "type": "public", + "rule": "09-08", + "_weekday": "Sun" + }, + { + "date": "2019-09-09 00:00:00", + "start": "2019-09-08T22:00:00.000Z", + "end": "2019-09-09T22:00:00.000Z", + "name": "Día de Asturias", + "type": "public", + "substitute": true, + "rule": "substitutes 09-08 if Sunday then next Monday", + "_weekday": "Mon" + }, + { + "date": "2019-10-12 00:00:00", + "start": "2019-10-11T22:00:00.000Z", + "end": "2019-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Sat" + }, + { + "date": "2019-11-01 00:00:00", + "start": "2019-10-31T23:00:00.000Z", + "end": "2019-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Fri" + }, + { + "date": "2019-12-06 00:00:00", + "start": "2019-12-05T23:00:00.000Z", + "end": "2019-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Fri" + }, + { + "date": "2019-12-08 00:00:00", + "start": "2019-12-07T23:00:00.000Z", + "end": "2019-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Sun" + }, + { + "date": "2019-12-09 00:00:00", + "start": "2019-12-08T23:00:00.000Z", + "end": "2019-12-09T23:00:00.000Z", + "name": "La inmaculada concepción (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 12-08 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2019-12-25 00:00:00", + "start": "2019-12-24T23:00:00.000Z", + "end": "2019-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Wed" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-AS-2020.json b/test/fixtures/ES-AS-2020.json new file mode 100644 index 000000000..279f4c7d2 --- /dev/null +++ b/test/fixtures/ES-AS-2020.json @@ -0,0 +1,176 @@ +[ + { + "date": "2020-01-01 00:00:00", + "start": "2019-12-31T23:00:00.000Z", + "end": "2020-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Wed" + }, + { + "date": "2020-01-06 00:00:00", + "start": "2020-01-05T23:00:00.000Z", + "end": "2020-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Mon" + }, + { + "date": "2020-03-19 00:00:00", + "start": "2020-03-18T23:00:00.000Z", + "end": "2020-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Thu" + }, + { + "date": "2020-04-09 00:00:00", + "start": "2020-04-08T22:00:00.000Z", + "end": "2020-04-09T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2020-04-10 00:00:00", + "start": "2020-04-09T22:00:00.000Z", + "end": "2020-04-10T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2020-04-12 00:00:00", + "start": "2020-04-11T22:00:00.000Z", + "end": "2020-04-12T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2020-05-01 00:00:00", + "start": "2020-04-30T22:00:00.000Z", + "end": "2020-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Fri" + }, + { + "date": "2020-05-03 00:00:00", + "start": "2020-05-02T22:00:00.000Z", + "end": "2020-05-03T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2020-05-31 00:00:00", + "start": "2020-05-30T22:00:00.000Z", + "end": "2020-05-31T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2020-07-25 00:00:00", + "start": "2020-07-24T22:00:00.000Z", + "end": "2020-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Sat" + }, + { + "date": "2020-08-15 00:00:00", + "start": "2020-08-14T22:00:00.000Z", + "end": "2020-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Sat" + }, + { + "date": "2020-09-08 00:00:00", + "start": "2020-09-07T22:00:00.000Z", + "end": "2020-09-08T22:00:00.000Z", + "name": "Día de Asturias", + "type": "public", + "rule": "09-08", + "_weekday": "Tue" + }, + { + "date": "2020-10-12 00:00:00", + "start": "2020-10-11T22:00:00.000Z", + "end": "2020-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Mon" + }, + { + "date": "2020-11-01 00:00:00", + "start": "2020-10-31T23:00:00.000Z", + "end": "2020-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Sun" + }, + { + "date": "2020-11-02 00:00:00", + "start": "2020-11-01T23:00:00.000Z", + "end": "2020-11-02T23:00:00.000Z", + "name": "Todos los Santos (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 11-01 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2020-12-06 00:00:00", + "start": "2020-12-05T23:00:00.000Z", + "end": "2020-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Sun" + }, + { + "date": "2020-12-07 00:00:00", + "start": "2020-12-06T23:00:00.000Z", + "end": "2020-12-07T23:00:00.000Z", + "name": "Día de la Constitución Española (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 12-06 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2020-12-08 00:00:00", + "start": "2020-12-07T23:00:00.000Z", + "end": "2020-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Tue" + }, + { + "date": "2020-12-25 00:00:00", + "start": "2020-12-24T23:00:00.000Z", + "end": "2020-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Fri" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-AS-2021.json b/test/fixtures/ES-AS-2021.json new file mode 100644 index 000000000..88729d639 --- /dev/null +++ b/test/fixtures/ES-AS-2021.json @@ -0,0 +1,166 @@ +[ + { + "date": "2021-01-01 00:00:00", + "start": "2020-12-31T23:00:00.000Z", + "end": "2021-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Fri" + }, + { + "date": "2021-01-06 00:00:00", + "start": "2021-01-05T23:00:00.000Z", + "end": "2021-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Wed" + }, + { + "date": "2021-03-19 00:00:00", + "start": "2021-03-18T23:00:00.000Z", + "end": "2021-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Fri" + }, + { + "date": "2021-04-01 00:00:00", + "start": "2021-03-31T22:00:00.000Z", + "end": "2021-04-01T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2021-04-02 00:00:00", + "start": "2021-04-01T22:00:00.000Z", + "end": "2021-04-02T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2021-04-04 00:00:00", + "start": "2021-04-03T22:00:00.000Z", + "end": "2021-04-04T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2021-05-01 00:00:00", + "start": "2021-04-30T22:00:00.000Z", + "end": "2021-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Sat" + }, + { + "date": "2021-05-02 00:00:00", + "start": "2021-05-01T22:00:00.000Z", + "end": "2021-05-02T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2021-05-23 00:00:00", + "start": "2021-05-22T22:00:00.000Z", + "end": "2021-05-23T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2021-07-25 00:00:00", + "start": "2021-07-24T22:00:00.000Z", + "end": "2021-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Sun" + }, + { + "date": "2021-08-15 00:00:00", + "start": "2021-08-14T22:00:00.000Z", + "end": "2021-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Sun" + }, + { + "date": "2021-08-16 00:00:00", + "start": "2021-08-15T22:00:00.000Z", + "end": "2021-08-16T22:00:00.000Z", + "name": "Asunción (día sustituto)", + "type": "public", + "substitute": true, + "rule": "substitutes 08-15 if Sunday then next Monday", + "_weekday": "Mon" + }, + { + "date": "2021-09-08 00:00:00", + "start": "2021-09-07T22:00:00.000Z", + "end": "2021-09-08T22:00:00.000Z", + "name": "Día de Asturias", + "type": "public", + "rule": "09-08", + "_weekday": "Wed" + }, + { + "date": "2021-10-12 00:00:00", + "start": "2021-10-11T22:00:00.000Z", + "end": "2021-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Tue" + }, + { + "date": "2021-11-01 00:00:00", + "start": "2021-10-31T23:00:00.000Z", + "end": "2021-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Mon" + }, + { + "date": "2021-12-06 00:00:00", + "start": "2021-12-05T23:00:00.000Z", + "end": "2021-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Mon" + }, + { + "date": "2021-12-08 00:00:00", + "start": "2021-12-07T23:00:00.000Z", + "end": "2021-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Wed" + }, + { + "date": "2021-12-25 00:00:00", + "start": "2021-12-24T23:00:00.000Z", + "end": "2021-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Sat" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-AS-2022.json b/test/fixtures/ES-AS-2022.json new file mode 100644 index 000000000..0c605494e --- /dev/null +++ b/test/fixtures/ES-AS-2022.json @@ -0,0 +1,176 @@ +[ + { + "date": "2022-01-01 00:00:00", + "start": "2021-12-31T23:00:00.000Z", + "end": "2022-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Sat" + }, + { + "date": "2022-01-06 00:00:00", + "start": "2022-01-05T23:00:00.000Z", + "end": "2022-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Thu" + }, + { + "date": "2022-03-19 00:00:00", + "start": "2022-03-18T23:00:00.000Z", + "end": "2022-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Sat" + }, + { + "date": "2022-04-14 00:00:00", + "start": "2022-04-13T22:00:00.000Z", + "end": "2022-04-14T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2022-04-15 00:00:00", + "start": "2022-04-14T22:00:00.000Z", + "end": "2022-04-15T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2022-04-17 00:00:00", + "start": "2022-04-16T22:00:00.000Z", + "end": "2022-04-17T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2022-05-01 00:00:00", + "start": "2022-04-30T22:00:00.000Z", + "end": "2022-05-01T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2022-05-01 00:00:00", + "start": "2022-04-30T22:00:00.000Z", + "end": "2022-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Sun" + }, + { + "date": "2022-05-02 00:00:00", + "start": "2022-05-01T22:00:00.000Z", + "end": "2022-05-02T22:00:00.000Z", + "name": "Día del trabajador (día sustituto)", + "type": "public", + "substitute": true, + "rule": "substitutes 05-01 if Sunday then next Monday", + "_weekday": "Mon" + }, + { + "date": "2022-06-05 00:00:00", + "start": "2022-06-04T22:00:00.000Z", + "end": "2022-06-05T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2022-07-25 00:00:00", + "start": "2022-07-24T22:00:00.000Z", + "end": "2022-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Mon" + }, + { + "date": "2022-08-15 00:00:00", + "start": "2022-08-14T22:00:00.000Z", + "end": "2022-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Mon" + }, + { + "date": "2022-09-08 00:00:00", + "start": "2022-09-07T22:00:00.000Z", + "end": "2022-09-08T22:00:00.000Z", + "name": "Día de Asturias", + "type": "public", + "rule": "09-08", + "_weekday": "Thu" + }, + { + "date": "2022-10-12 00:00:00", + "start": "2022-10-11T22:00:00.000Z", + "end": "2022-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Wed" + }, + { + "date": "2022-11-01 00:00:00", + "start": "2022-10-31T23:00:00.000Z", + "end": "2022-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Tue" + }, + { + "date": "2022-12-06 00:00:00", + "start": "2022-12-05T23:00:00.000Z", + "end": "2022-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Tue" + }, + { + "date": "2022-12-08 00:00:00", + "start": "2022-12-07T23:00:00.000Z", + "end": "2022-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Thu" + }, + { + "date": "2022-12-25 00:00:00", + "start": "2022-12-24T23:00:00.000Z", + "end": "2022-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Sun" + }, + { + "date": "2022-12-26 00:00:00", + "start": "2022-12-25T23:00:00.000Z", + "end": "2022-12-26T23:00:00.000Z", + "name": "Navidad (día sustituto)", + "type": "public", + "substitute": true, + "rule": "substitutes 12-25 if sunday then next monday", + "_weekday": "Mon" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-AS-2023.json b/test/fixtures/ES-AS-2023.json new file mode 100644 index 000000000..340b540df --- /dev/null +++ b/test/fixtures/ES-AS-2023.json @@ -0,0 +1,166 @@ +[ + { + "date": "2023-01-01 00:00:00", + "start": "2022-12-31T23:00:00.000Z", + "end": "2023-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Sun" + }, + { + "date": "2023-01-02 00:00:00", + "start": "2023-01-01T23:00:00.000Z", + "end": "2023-01-02T23:00:00.000Z", + "name": "Año Nuevo (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 01-01 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2023-01-06 00:00:00", + "start": "2023-01-05T23:00:00.000Z", + "end": "2023-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Fri" + }, + { + "date": "2023-03-19 00:00:00", + "start": "2023-03-18T23:00:00.000Z", + "end": "2023-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Sun" + }, + { + "date": "2023-04-06 00:00:00", + "start": "2023-04-05T22:00:00.000Z", + "end": "2023-04-06T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2023-04-07 00:00:00", + "start": "2023-04-06T22:00:00.000Z", + "end": "2023-04-07T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2023-04-09 00:00:00", + "start": "2023-04-08T22:00:00.000Z", + "end": "2023-04-09T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2023-05-01 00:00:00", + "start": "2023-04-30T22:00:00.000Z", + "end": "2023-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Mon" + }, + { + "date": "2023-05-07 00:00:00", + "start": "2023-05-06T22:00:00.000Z", + "end": "2023-05-07T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2023-05-28 00:00:00", + "start": "2023-05-27T22:00:00.000Z", + "end": "2023-05-28T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2023-07-25 00:00:00", + "start": "2023-07-24T22:00:00.000Z", + "end": "2023-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Tue" + }, + { + "date": "2023-08-15 00:00:00", + "start": "2023-08-14T22:00:00.000Z", + "end": "2023-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Tue" + }, + { + "date": "2023-09-08 00:00:00", + "start": "2023-09-07T22:00:00.000Z", + "end": "2023-09-08T22:00:00.000Z", + "name": "Día de Asturias", + "type": "public", + "rule": "09-08", + "_weekday": "Fri" + }, + { + "date": "2023-10-12 00:00:00", + "start": "2023-10-11T22:00:00.000Z", + "end": "2023-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Thu" + }, + { + "date": "2023-11-01 00:00:00", + "start": "2023-10-31T23:00:00.000Z", + "end": "2023-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Wed" + }, + { + "date": "2023-12-06 00:00:00", + "start": "2023-12-05T23:00:00.000Z", + "end": "2023-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Wed" + }, + { + "date": "2023-12-08 00:00:00", + "start": "2023-12-07T23:00:00.000Z", + "end": "2023-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Fri" + }, + { + "date": "2023-12-25 00:00:00", + "start": "2023-12-24T23:00:00.000Z", + "end": "2023-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Mon" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-AS-2024.json b/test/fixtures/ES-AS-2024.json new file mode 100644 index 000000000..67cb708e8 --- /dev/null +++ b/test/fixtures/ES-AS-2024.json @@ -0,0 +1,176 @@ +[ + { + "date": "2024-01-01 00:00:00", + "start": "2023-12-31T23:00:00.000Z", + "end": "2024-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Mon" + }, + { + "date": "2024-01-06 00:00:00", + "start": "2024-01-05T23:00:00.000Z", + "end": "2024-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Sat" + }, + { + "date": "2024-03-19 00:00:00", + "start": "2024-03-18T23:00:00.000Z", + "end": "2024-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Tue" + }, + { + "date": "2024-03-28 00:00:00", + "start": "2024-03-27T23:00:00.000Z", + "end": "2024-03-28T23:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2024-03-29 00:00:00", + "start": "2024-03-28T23:00:00.000Z", + "end": "2024-03-29T23:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2024-03-31 00:00:00", + "start": "2024-03-30T23:00:00.000Z", + "end": "2024-03-31T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2024-05-01 00:00:00", + "start": "2024-04-30T22:00:00.000Z", + "end": "2024-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Wed" + }, + { + "date": "2024-05-05 00:00:00", + "start": "2024-05-04T22:00:00.000Z", + "end": "2024-05-05T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2024-05-19 00:00:00", + "start": "2024-05-18T22:00:00.000Z", + "end": "2024-05-19T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2024-07-25 00:00:00", + "start": "2024-07-24T22:00:00.000Z", + "end": "2024-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Thu" + }, + { + "date": "2024-08-15 00:00:00", + "start": "2024-08-14T22:00:00.000Z", + "end": "2024-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Thu" + }, + { + "date": "2024-09-08 00:00:00", + "start": "2024-09-07T22:00:00.000Z", + "end": "2024-09-08T22:00:00.000Z", + "name": "Día de Asturias", + "type": "public", + "rule": "09-08", + "_weekday": "Sun" + }, + { + "date": "2024-09-09 00:00:00", + "start": "2024-09-08T22:00:00.000Z", + "end": "2024-09-09T22:00:00.000Z", + "name": "Día de Asturias", + "type": "public", + "substitute": true, + "rule": "substitutes 09-08 if Sunday then next Monday", + "_weekday": "Mon" + }, + { + "date": "2024-10-12 00:00:00", + "start": "2024-10-11T22:00:00.000Z", + "end": "2024-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Sat" + }, + { + "date": "2024-11-01 00:00:00", + "start": "2024-10-31T23:00:00.000Z", + "end": "2024-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Fri" + }, + { + "date": "2024-12-06 00:00:00", + "start": "2024-12-05T23:00:00.000Z", + "end": "2024-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Fri" + }, + { + "date": "2024-12-08 00:00:00", + "start": "2024-12-07T23:00:00.000Z", + "end": "2024-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Sun" + }, + { + "date": "2024-12-09 00:00:00", + "start": "2024-12-08T23:00:00.000Z", + "end": "2024-12-09T23:00:00.000Z", + "name": "La inmaculada concepción (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 12-08 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2024-12-25 00:00:00", + "start": "2024-12-24T23:00:00.000Z", + "end": "2024-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Wed" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-AS-2025.json b/test/fixtures/ES-AS-2025.json new file mode 100644 index 000000000..51b2f53e5 --- /dev/null +++ b/test/fixtures/ES-AS-2025.json @@ -0,0 +1,166 @@ +[ + { + "date": "2025-01-01 00:00:00", + "start": "2024-12-31T23:00:00.000Z", + "end": "2025-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Wed" + }, + { + "date": "2025-01-06 00:00:00", + "start": "2025-01-05T23:00:00.000Z", + "end": "2025-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Mon" + }, + { + "date": "2025-03-19 00:00:00", + "start": "2025-03-18T23:00:00.000Z", + "end": "2025-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Wed" + }, + { + "date": "2025-04-17 00:00:00", + "start": "2025-04-16T22:00:00.000Z", + "end": "2025-04-17T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2025-04-18 00:00:00", + "start": "2025-04-17T22:00:00.000Z", + "end": "2025-04-18T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2025-04-20 00:00:00", + "start": "2025-04-19T22:00:00.000Z", + "end": "2025-04-20T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2025-05-01 00:00:00", + "start": "2025-04-30T22:00:00.000Z", + "end": "2025-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Thu" + }, + { + "date": "2025-05-04 00:00:00", + "start": "2025-05-03T22:00:00.000Z", + "end": "2025-05-04T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2025-06-08 00:00:00", + "start": "2025-06-07T22:00:00.000Z", + "end": "2025-06-08T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2025-07-25 00:00:00", + "start": "2025-07-24T22:00:00.000Z", + "end": "2025-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Fri" + }, + { + "date": "2025-08-15 00:00:00", + "start": "2025-08-14T22:00:00.000Z", + "end": "2025-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Fri" + }, + { + "date": "2025-09-08 00:00:00", + "start": "2025-09-07T22:00:00.000Z", + "end": "2025-09-08T22:00:00.000Z", + "name": "Día de Asturias", + "type": "public", + "rule": "09-08", + "_weekday": "Mon" + }, + { + "date": "2025-10-12 00:00:00", + "start": "2025-10-11T22:00:00.000Z", + "end": "2025-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Sun" + }, + { + "date": "2025-10-13 00:00:00", + "start": "2025-10-12T22:00:00.000Z", + "end": "2025-10-13T22:00:00.000Z", + "name": "Fiesta Nacional de España (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 10-12 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2025-11-01 00:00:00", + "start": "2025-10-31T23:00:00.000Z", + "end": "2025-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Sat" + }, + { + "date": "2025-12-06 00:00:00", + "start": "2025-12-05T23:00:00.000Z", + "end": "2025-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Sat" + }, + { + "date": "2025-12-08 00:00:00", + "start": "2025-12-07T23:00:00.000Z", + "end": "2025-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Mon" + }, + { + "date": "2025-12-25 00:00:00", + "start": "2025-12-24T23:00:00.000Z", + "end": "2025-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Thu" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-CB-2015.json b/test/fixtures/ES-CB-2015.json new file mode 100644 index 000000000..d2e7a7a5e --- /dev/null +++ b/test/fixtures/ES-CB-2015.json @@ -0,0 +1,194 @@ +[ + { + "date": "2015-01-01 00:00:00", + "start": "2014-12-31T23:00:00.000Z", + "end": "2015-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Thu" + }, + { + "date": "2015-01-06 00:00:00", + "start": "2015-01-05T23:00:00.000Z", + "end": "2015-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Tue" + }, + { + "date": "2015-03-19 00:00:00", + "start": "2015-03-18T23:00:00.000Z", + "end": "2015-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Thu" + }, + { + "date": "2015-04-02 00:00:00", + "start": "2015-04-01T22:00:00.000Z", + "end": "2015-04-02T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2015-04-03 00:00:00", + "start": "2015-04-02T22:00:00.000Z", + "end": "2015-04-03T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2015-04-05 00:00:00", + "start": "2015-04-04T22:00:00.000Z", + "end": "2015-04-05T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2015-05-01 00:00:00", + "start": "2015-04-30T22:00:00.000Z", + "end": "2015-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Fri" + }, + { + "date": "2015-05-03 00:00:00", + "start": "2015-05-02T22:00:00.000Z", + "end": "2015-05-03T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2015-05-24 00:00:00", + "start": "2015-05-23T22:00:00.000Z", + "end": "2015-05-24T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2015-06-28 00:00:00", + "start": "2015-06-27T22:00:00.000Z", + "end": "2015-06-28T22:00:00.000Z", + "name": "Día de las Instituciones de Cantabria", + "type": "public", + "rule": "06-28", + "_weekday": "Sun" + }, + { + "date": "2015-06-29 00:00:00", + "start": "2015-06-28T22:00:00.000Z", + "end": "2015-06-29T22:00:00.000Z", + "name": "Día de las Instituciones de Cantabria", + "type": "public", + "rule": "substitutes 06-28 if Sunday then next Monday", + "_weekday": "Mon" + }, + { + "date": "2015-07-25 00:00:00", + "start": "2015-07-24T22:00:00.000Z", + "end": "2015-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Sat" + }, + { + "date": "2015-08-15 00:00:00", + "start": "2015-08-14T22:00:00.000Z", + "end": "2015-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Sat" + }, + { + "date": "2015-09-15 00:00:00", + "start": "2015-09-14T22:00:00.000Z", + "end": "2015-09-15T22:00:00.000Z", + "name": "La Bien Aparecida", + "type": "public", + "rule": "09-15", + "_weekday": "Tue" + }, + { + "date": "2015-10-12 00:00:00", + "start": "2015-10-11T22:00:00.000Z", + "end": "2015-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Mon" + }, + { + "date": "2015-11-01 00:00:00", + "start": "2015-10-31T23:00:00.000Z", + "end": "2015-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Sun" + }, + { + "date": "2015-11-02 00:00:00", + "start": "2015-11-01T23:00:00.000Z", + "end": "2015-11-02T23:00:00.000Z", + "name": "Todos los Santos (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 11-01 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2015-12-06 00:00:00", + "start": "2015-12-05T23:00:00.000Z", + "end": "2015-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Sun" + }, + { + "date": "2015-12-07 00:00:00", + "start": "2015-12-06T23:00:00.000Z", + "end": "2015-12-07T23:00:00.000Z", + "name": "Día de la Constitución Española (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 12-06 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2015-12-08 00:00:00", + "start": "2015-12-07T23:00:00.000Z", + "end": "2015-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Tue" + }, + { + "date": "2015-12-25 00:00:00", + "start": "2015-12-24T23:00:00.000Z", + "end": "2015-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Fri" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-CB-2016.json b/test/fixtures/ES-CB-2016.json new file mode 100644 index 000000000..0ca82db3d --- /dev/null +++ b/test/fixtures/ES-CB-2016.json @@ -0,0 +1,175 @@ +[ + { + "date": "2016-01-01 00:00:00", + "start": "2015-12-31T23:00:00.000Z", + "end": "2016-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Fri" + }, + { + "date": "2016-01-06 00:00:00", + "start": "2016-01-05T23:00:00.000Z", + "end": "2016-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Wed" + }, + { + "date": "2016-03-19 00:00:00", + "start": "2016-03-18T23:00:00.000Z", + "end": "2016-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Sat" + }, + { + "date": "2016-03-24 00:00:00", + "start": "2016-03-23T23:00:00.000Z", + "end": "2016-03-24T23:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2016-03-25 00:00:00", + "start": "2016-03-24T23:00:00.000Z", + "end": "2016-03-25T23:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2016-03-27 00:00:00", + "start": "2016-03-26T23:00:00.000Z", + "end": "2016-03-27T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2016-05-01 00:00:00", + "start": "2016-04-30T22:00:00.000Z", + "end": "2016-05-01T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2016-05-01 00:00:00", + "start": "2016-04-30T22:00:00.000Z", + "end": "2016-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Sun" + }, + { + "date": "2016-05-15 00:00:00", + "start": "2016-05-14T22:00:00.000Z", + "end": "2016-05-15T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2016-06-28 00:00:00", + "start": "2016-06-27T22:00:00.000Z", + "end": "2016-06-28T22:00:00.000Z", + "name": "Día de las Instituciones de Cantabria", + "type": "public", + "rule": "06-28", + "_weekday": "Tue" + }, + { + "date": "2016-07-25 00:00:00", + "start": "2016-07-24T22:00:00.000Z", + "end": "2016-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Mon" + }, + { + "date": "2016-08-15 00:00:00", + "start": "2016-08-14T22:00:00.000Z", + "end": "2016-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Mon" + }, + { + "date": "2016-09-15 00:00:00", + "start": "2016-09-14T22:00:00.000Z", + "end": "2016-09-15T22:00:00.000Z", + "name": "La Bien Aparecida", + "type": "public", + "rule": "09-15", + "_weekday": "Thu" + }, + { + "date": "2016-10-12 00:00:00", + "start": "2016-10-11T22:00:00.000Z", + "end": "2016-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Wed" + }, + { + "date": "2016-11-01 00:00:00", + "start": "2016-10-31T23:00:00.000Z", + "end": "2016-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Tue" + }, + { + "date": "2016-12-06 00:00:00", + "start": "2016-12-05T23:00:00.000Z", + "end": "2016-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Tue" + }, + { + "date": "2016-12-08 00:00:00", + "start": "2016-12-07T23:00:00.000Z", + "end": "2016-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Thu" + }, + { + "date": "2016-12-25 00:00:00", + "start": "2016-12-24T23:00:00.000Z", + "end": "2016-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Sun" + }, + { + "date": "2016-12-26 00:00:00", + "start": "2016-12-25T23:00:00.000Z", + "end": "2016-12-26T23:00:00.000Z", + "name": "Navidad (día sustituto)", + "type": "public", + "substitute": true, + "rule": "substitutes 12-25 if sunday then next monday", + "_weekday": "Mon" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-CB-2017.json b/test/fixtures/ES-CB-2017.json new file mode 100644 index 000000000..3d85c1252 --- /dev/null +++ b/test/fixtures/ES-CB-2017.json @@ -0,0 +1,175 @@ +[ + { + "date": "2017-01-01 00:00:00", + "start": "2016-12-31T23:00:00.000Z", + "end": "2017-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Sun" + }, + { + "date": "2017-01-02 00:00:00", + "start": "2017-01-01T23:00:00.000Z", + "end": "2017-01-02T23:00:00.000Z", + "name": "Año Nuevo (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 01-01 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2017-01-06 00:00:00", + "start": "2017-01-05T23:00:00.000Z", + "end": "2017-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Fri" + }, + { + "date": "2017-03-19 00:00:00", + "start": "2017-03-18T23:00:00.000Z", + "end": "2017-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Sun" + }, + { + "date": "2017-04-13 00:00:00", + "start": "2017-04-12T22:00:00.000Z", + "end": "2017-04-13T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2017-04-14 00:00:00", + "start": "2017-04-13T22:00:00.000Z", + "end": "2017-04-14T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2017-04-16 00:00:00", + "start": "2017-04-15T22:00:00.000Z", + "end": "2017-04-16T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2017-05-01 00:00:00", + "start": "2017-04-30T22:00:00.000Z", + "end": "2017-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Mon" + }, + { + "date": "2017-05-07 00:00:00", + "start": "2017-05-06T22:00:00.000Z", + "end": "2017-05-07T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2017-06-04 00:00:00", + "start": "2017-06-03T22:00:00.000Z", + "end": "2017-06-04T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2017-06-28 00:00:00", + "start": "2017-06-27T22:00:00.000Z", + "end": "2017-06-28T22:00:00.000Z", + "name": "Día de las Instituciones de Cantabria", + "type": "public", + "rule": "06-28", + "_weekday": "Wed" + }, + { + "date": "2017-07-25 00:00:00", + "start": "2017-07-24T22:00:00.000Z", + "end": "2017-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Tue" + }, + { + "date": "2017-08-15 00:00:00", + "start": "2017-08-14T22:00:00.000Z", + "end": "2017-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Tue" + }, + { + "date": "2017-09-15 00:00:00", + "start": "2017-09-14T22:00:00.000Z", + "end": "2017-09-15T22:00:00.000Z", + "name": "La Bien Aparecida", + "type": "public", + "rule": "09-15", + "_weekday": "Fri" + }, + { + "date": "2017-10-12 00:00:00", + "start": "2017-10-11T22:00:00.000Z", + "end": "2017-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Thu" + }, + { + "date": "2017-11-01 00:00:00", + "start": "2017-10-31T23:00:00.000Z", + "end": "2017-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Wed" + }, + { + "date": "2017-12-06 00:00:00", + "start": "2017-12-05T23:00:00.000Z", + "end": "2017-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Wed" + }, + { + "date": "2017-12-08 00:00:00", + "start": "2017-12-07T23:00:00.000Z", + "end": "2017-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Fri" + }, + { + "date": "2017-12-25 00:00:00", + "start": "2017-12-24T23:00:00.000Z", + "end": "2017-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Mon" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-CB-2018.json b/test/fixtures/ES-CB-2018.json new file mode 100644 index 000000000..6c98a5632 --- /dev/null +++ b/test/fixtures/ES-CB-2018.json @@ -0,0 +1,165 @@ +[ + { + "date": "2018-01-01 00:00:00", + "start": "2017-12-31T23:00:00.000Z", + "end": "2018-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Mon" + }, + { + "date": "2018-01-06 00:00:00", + "start": "2018-01-05T23:00:00.000Z", + "end": "2018-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Sat" + }, + { + "date": "2018-03-19 00:00:00", + "start": "2018-03-18T23:00:00.000Z", + "end": "2018-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Mon" + }, + { + "date": "2018-03-29 00:00:00", + "start": "2018-03-28T22:00:00.000Z", + "end": "2018-03-29T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2018-03-30 00:00:00", + "start": "2018-03-29T22:00:00.000Z", + "end": "2018-03-30T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2018-04-01 00:00:00", + "start": "2018-03-31T22:00:00.000Z", + "end": "2018-04-01T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2018-05-01 00:00:00", + "start": "2018-04-30T22:00:00.000Z", + "end": "2018-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Tue" + }, + { + "date": "2018-05-06 00:00:00", + "start": "2018-05-05T22:00:00.000Z", + "end": "2018-05-06T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2018-05-20 00:00:00", + "start": "2018-05-19T22:00:00.000Z", + "end": "2018-05-20T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2018-06-28 00:00:00", + "start": "2018-06-27T22:00:00.000Z", + "end": "2018-06-28T22:00:00.000Z", + "name": "Día de las Instituciones de Cantabria", + "type": "public", + "rule": "06-28", + "_weekday": "Thu" + }, + { + "date": "2018-07-25 00:00:00", + "start": "2018-07-24T22:00:00.000Z", + "end": "2018-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Wed" + }, + { + "date": "2018-08-15 00:00:00", + "start": "2018-08-14T22:00:00.000Z", + "end": "2018-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Wed" + }, + { + "date": "2018-09-15 00:00:00", + "start": "2018-09-14T22:00:00.000Z", + "end": "2018-09-15T22:00:00.000Z", + "name": "La Bien Aparecida", + "type": "public", + "rule": "09-15", + "_weekday": "Sat" + }, + { + "date": "2018-10-12 00:00:00", + "start": "2018-10-11T22:00:00.000Z", + "end": "2018-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Fri" + }, + { + "date": "2018-11-01 00:00:00", + "start": "2018-10-31T23:00:00.000Z", + "end": "2018-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Thu" + }, + { + "date": "2018-12-06 00:00:00", + "start": "2018-12-05T23:00:00.000Z", + "end": "2018-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Thu" + }, + { + "date": "2018-12-08 00:00:00", + "start": "2018-12-07T23:00:00.000Z", + "end": "2018-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Sat" + }, + { + "date": "2018-12-25 00:00:00", + "start": "2018-12-24T23:00:00.000Z", + "end": "2018-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Tue" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-CB-2019.json b/test/fixtures/ES-CB-2019.json new file mode 100644 index 000000000..bb9e84f4b --- /dev/null +++ b/test/fixtures/ES-CB-2019.json @@ -0,0 +1,194 @@ +[ + { + "date": "2019-01-01 00:00:00", + "start": "2018-12-31T23:00:00.000Z", + "end": "2019-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Tue" + }, + { + "date": "2019-01-06 00:00:00", + "start": "2019-01-05T23:00:00.000Z", + "end": "2019-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Sun" + }, + { + "date": "2019-01-07 00:00:00", + "start": "2019-01-06T23:00:00.000Z", + "end": "2019-01-07T23:00:00.000Z", + "name": "Día de los Reyes Magos (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 01-06 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2019-03-19 00:00:00", + "start": "2019-03-18T23:00:00.000Z", + "end": "2019-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Tue" + }, + { + "date": "2019-04-18 00:00:00", + "start": "2019-04-17T22:00:00.000Z", + "end": "2019-04-18T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2019-04-19 00:00:00", + "start": "2019-04-18T22:00:00.000Z", + "end": "2019-04-19T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2019-04-21 00:00:00", + "start": "2019-04-20T22:00:00.000Z", + "end": "2019-04-21T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2019-05-01 00:00:00", + "start": "2019-04-30T22:00:00.000Z", + "end": "2019-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Wed" + }, + { + "date": "2019-05-05 00:00:00", + "start": "2019-05-04T22:00:00.000Z", + "end": "2019-05-05T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2019-06-09 00:00:00", + "start": "2019-06-08T22:00:00.000Z", + "end": "2019-06-09T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2019-06-28 00:00:00", + "start": "2019-06-27T22:00:00.000Z", + "end": "2019-06-28T22:00:00.000Z", + "name": "Día de las Instituciones de Cantabria", + "type": "public", + "rule": "06-28", + "_weekday": "Fri" + }, + { + "date": "2019-07-25 00:00:00", + "start": "2019-07-24T22:00:00.000Z", + "end": "2019-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Thu" + }, + { + "date": "2019-08-15 00:00:00", + "start": "2019-08-14T22:00:00.000Z", + "end": "2019-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Thu" + }, + { + "date": "2019-09-15 00:00:00", + "start": "2019-09-14T22:00:00.000Z", + "end": "2019-09-15T22:00:00.000Z", + "name": "La Bien Aparecida", + "type": "public", + "rule": "09-15", + "_weekday": "Sun" + }, + { + "date": "2019-09-16 00:00:00", + "start": "2019-09-15T22:00:00.000Z", + "end": "2019-09-16T22:00:00.000Z", + "name": "La Bien Aparecida", + "type": "public", + "rule": "substitutes 09-15 if Sunday then next Monday", + "_weekday": "Mon" + }, + { + "date": "2019-10-12 00:00:00", + "start": "2019-10-11T22:00:00.000Z", + "end": "2019-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Sat" + }, + { + "date": "2019-11-01 00:00:00", + "start": "2019-10-31T23:00:00.000Z", + "end": "2019-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Fri" + }, + { + "date": "2019-12-06 00:00:00", + "start": "2019-12-05T23:00:00.000Z", + "end": "2019-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Fri" + }, + { + "date": "2019-12-08 00:00:00", + "start": "2019-12-07T23:00:00.000Z", + "end": "2019-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Sun" + }, + { + "date": "2019-12-09 00:00:00", + "start": "2019-12-08T23:00:00.000Z", + "end": "2019-12-09T23:00:00.000Z", + "name": "La inmaculada concepción (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 12-08 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2019-12-25 00:00:00", + "start": "2019-12-24T23:00:00.000Z", + "end": "2019-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Wed" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-CB-2020.json b/test/fixtures/ES-CB-2020.json new file mode 100644 index 000000000..4d4c2d8fd --- /dev/null +++ b/test/fixtures/ES-CB-2020.json @@ -0,0 +1,194 @@ +[ + { + "date": "2020-01-01 00:00:00", + "start": "2019-12-31T23:00:00.000Z", + "end": "2020-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Wed" + }, + { + "date": "2020-01-06 00:00:00", + "start": "2020-01-05T23:00:00.000Z", + "end": "2020-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Mon" + }, + { + "date": "2020-03-19 00:00:00", + "start": "2020-03-18T23:00:00.000Z", + "end": "2020-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Thu" + }, + { + "date": "2020-04-09 00:00:00", + "start": "2020-04-08T22:00:00.000Z", + "end": "2020-04-09T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2020-04-10 00:00:00", + "start": "2020-04-09T22:00:00.000Z", + "end": "2020-04-10T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2020-04-12 00:00:00", + "start": "2020-04-11T22:00:00.000Z", + "end": "2020-04-12T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2020-05-01 00:00:00", + "start": "2020-04-30T22:00:00.000Z", + "end": "2020-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Fri" + }, + { + "date": "2020-05-03 00:00:00", + "start": "2020-05-02T22:00:00.000Z", + "end": "2020-05-03T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2020-05-31 00:00:00", + "start": "2020-05-30T22:00:00.000Z", + "end": "2020-05-31T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2020-06-28 00:00:00", + "start": "2020-06-27T22:00:00.000Z", + "end": "2020-06-28T22:00:00.000Z", + "name": "Día de las Instituciones de Cantabria", + "type": "public", + "rule": "06-28", + "_weekday": "Sun" + }, + { + "date": "2020-06-29 00:00:00", + "start": "2020-06-28T22:00:00.000Z", + "end": "2020-06-29T22:00:00.000Z", + "name": "Día de las Instituciones de Cantabria", + "type": "public", + "rule": "substitutes 06-28 if Sunday then next Monday", + "_weekday": "Mon" + }, + { + "date": "2020-07-25 00:00:00", + "start": "2020-07-24T22:00:00.000Z", + "end": "2020-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Sat" + }, + { + "date": "2020-08-15 00:00:00", + "start": "2020-08-14T22:00:00.000Z", + "end": "2020-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Sat" + }, + { + "date": "2020-09-15 00:00:00", + "start": "2020-09-14T22:00:00.000Z", + "end": "2020-09-15T22:00:00.000Z", + "name": "La Bien Aparecida", + "type": "public", + "rule": "09-15", + "_weekday": "Tue" + }, + { + "date": "2020-10-12 00:00:00", + "start": "2020-10-11T22:00:00.000Z", + "end": "2020-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Mon" + }, + { + "date": "2020-11-01 00:00:00", + "start": "2020-10-31T23:00:00.000Z", + "end": "2020-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Sun" + }, + { + "date": "2020-11-02 00:00:00", + "start": "2020-11-01T23:00:00.000Z", + "end": "2020-11-02T23:00:00.000Z", + "name": "Todos los Santos (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 11-01 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2020-12-06 00:00:00", + "start": "2020-12-05T23:00:00.000Z", + "end": "2020-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Sun" + }, + { + "date": "2020-12-07 00:00:00", + "start": "2020-12-06T23:00:00.000Z", + "end": "2020-12-07T23:00:00.000Z", + "name": "Día de la Constitución Española (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 12-06 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2020-12-08 00:00:00", + "start": "2020-12-07T23:00:00.000Z", + "end": "2020-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Tue" + }, + { + "date": "2020-12-25 00:00:00", + "start": "2020-12-24T23:00:00.000Z", + "end": "2020-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Fri" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-CB-2021.json b/test/fixtures/ES-CB-2021.json new file mode 100644 index 000000000..5cac04b11 --- /dev/null +++ b/test/fixtures/ES-CB-2021.json @@ -0,0 +1,165 @@ +[ + { + "date": "2021-01-01 00:00:00", + "start": "2020-12-31T23:00:00.000Z", + "end": "2021-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Fri" + }, + { + "date": "2021-01-06 00:00:00", + "start": "2021-01-05T23:00:00.000Z", + "end": "2021-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Wed" + }, + { + "date": "2021-03-19 00:00:00", + "start": "2021-03-18T23:00:00.000Z", + "end": "2021-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Fri" + }, + { + "date": "2021-04-01 00:00:00", + "start": "2021-03-31T22:00:00.000Z", + "end": "2021-04-01T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2021-04-02 00:00:00", + "start": "2021-04-01T22:00:00.000Z", + "end": "2021-04-02T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2021-04-04 00:00:00", + "start": "2021-04-03T22:00:00.000Z", + "end": "2021-04-04T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2021-05-01 00:00:00", + "start": "2021-04-30T22:00:00.000Z", + "end": "2021-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Sat" + }, + { + "date": "2021-05-02 00:00:00", + "start": "2021-05-01T22:00:00.000Z", + "end": "2021-05-02T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2021-05-23 00:00:00", + "start": "2021-05-22T22:00:00.000Z", + "end": "2021-05-23T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2021-06-28 00:00:00", + "start": "2021-06-27T22:00:00.000Z", + "end": "2021-06-28T22:00:00.000Z", + "name": "Día de las Instituciones de Cantabria", + "type": "public", + "rule": "06-28", + "_weekday": "Mon" + }, + { + "date": "2021-07-25 00:00:00", + "start": "2021-07-24T22:00:00.000Z", + "end": "2021-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Sun" + }, + { + "date": "2021-08-15 00:00:00", + "start": "2021-08-14T22:00:00.000Z", + "end": "2021-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Sun" + }, + { + "date": "2021-09-15 00:00:00", + "start": "2021-09-14T22:00:00.000Z", + "end": "2021-09-15T22:00:00.000Z", + "name": "La Bien Aparecida", + "type": "public", + "rule": "09-15", + "_weekday": "Wed" + }, + { + "date": "2021-10-12 00:00:00", + "start": "2021-10-11T22:00:00.000Z", + "end": "2021-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Tue" + }, + { + "date": "2021-11-01 00:00:00", + "start": "2021-10-31T23:00:00.000Z", + "end": "2021-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Mon" + }, + { + "date": "2021-12-06 00:00:00", + "start": "2021-12-05T23:00:00.000Z", + "end": "2021-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Mon" + }, + { + "date": "2021-12-08 00:00:00", + "start": "2021-12-07T23:00:00.000Z", + "end": "2021-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Wed" + }, + { + "date": "2021-12-25 00:00:00", + "start": "2021-12-24T23:00:00.000Z", + "end": "2021-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Sat" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-CB-2022.json b/test/fixtures/ES-CB-2022.json new file mode 100644 index 000000000..fe53ca191 --- /dev/null +++ b/test/fixtures/ES-CB-2022.json @@ -0,0 +1,175 @@ +[ + { + "date": "2022-01-01 00:00:00", + "start": "2021-12-31T23:00:00.000Z", + "end": "2022-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Sat" + }, + { + "date": "2022-01-06 00:00:00", + "start": "2022-01-05T23:00:00.000Z", + "end": "2022-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Thu" + }, + { + "date": "2022-03-19 00:00:00", + "start": "2022-03-18T23:00:00.000Z", + "end": "2022-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Sat" + }, + { + "date": "2022-04-14 00:00:00", + "start": "2022-04-13T22:00:00.000Z", + "end": "2022-04-14T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2022-04-15 00:00:00", + "start": "2022-04-14T22:00:00.000Z", + "end": "2022-04-15T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2022-04-17 00:00:00", + "start": "2022-04-16T22:00:00.000Z", + "end": "2022-04-17T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2022-05-01 00:00:00", + "start": "2022-04-30T22:00:00.000Z", + "end": "2022-05-01T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2022-05-01 00:00:00", + "start": "2022-04-30T22:00:00.000Z", + "end": "2022-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Sun" + }, + { + "date": "2022-06-05 00:00:00", + "start": "2022-06-04T22:00:00.000Z", + "end": "2022-06-05T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2022-06-28 00:00:00", + "start": "2022-06-27T22:00:00.000Z", + "end": "2022-06-28T22:00:00.000Z", + "name": "Día de las Instituciones de Cantabria", + "type": "public", + "rule": "06-28", + "_weekday": "Tue" + }, + { + "date": "2022-07-25 00:00:00", + "start": "2022-07-24T22:00:00.000Z", + "end": "2022-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Mon" + }, + { + "date": "2022-08-15 00:00:00", + "start": "2022-08-14T22:00:00.000Z", + "end": "2022-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Mon" + }, + { + "date": "2022-09-15 00:00:00", + "start": "2022-09-14T22:00:00.000Z", + "end": "2022-09-15T22:00:00.000Z", + "name": "La Bien Aparecida", + "type": "public", + "rule": "09-15", + "_weekday": "Thu" + }, + { + "date": "2022-10-12 00:00:00", + "start": "2022-10-11T22:00:00.000Z", + "end": "2022-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Wed" + }, + { + "date": "2022-11-01 00:00:00", + "start": "2022-10-31T23:00:00.000Z", + "end": "2022-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Tue" + }, + { + "date": "2022-12-06 00:00:00", + "start": "2022-12-05T23:00:00.000Z", + "end": "2022-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Tue" + }, + { + "date": "2022-12-08 00:00:00", + "start": "2022-12-07T23:00:00.000Z", + "end": "2022-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Thu" + }, + { + "date": "2022-12-25 00:00:00", + "start": "2022-12-24T23:00:00.000Z", + "end": "2022-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Sun" + }, + { + "date": "2022-12-26 00:00:00", + "start": "2022-12-25T23:00:00.000Z", + "end": "2022-12-26T23:00:00.000Z", + "name": "Navidad (día sustituto)", + "type": "public", + "substitute": true, + "rule": "substitutes 12-25 if sunday then next monday", + "_weekday": "Mon" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-CB-2023.json b/test/fixtures/ES-CB-2023.json new file mode 100644 index 000000000..6f4215921 --- /dev/null +++ b/test/fixtures/ES-CB-2023.json @@ -0,0 +1,175 @@ +[ + { + "date": "2023-01-01 00:00:00", + "start": "2022-12-31T23:00:00.000Z", + "end": "2023-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Sun" + }, + { + "date": "2023-01-02 00:00:00", + "start": "2023-01-01T23:00:00.000Z", + "end": "2023-01-02T23:00:00.000Z", + "name": "Año Nuevo (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 01-01 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2023-01-06 00:00:00", + "start": "2023-01-05T23:00:00.000Z", + "end": "2023-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Fri" + }, + { + "date": "2023-03-19 00:00:00", + "start": "2023-03-18T23:00:00.000Z", + "end": "2023-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Sun" + }, + { + "date": "2023-04-06 00:00:00", + "start": "2023-04-05T22:00:00.000Z", + "end": "2023-04-06T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2023-04-07 00:00:00", + "start": "2023-04-06T22:00:00.000Z", + "end": "2023-04-07T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2023-04-09 00:00:00", + "start": "2023-04-08T22:00:00.000Z", + "end": "2023-04-09T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2023-05-01 00:00:00", + "start": "2023-04-30T22:00:00.000Z", + "end": "2023-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Mon" + }, + { + "date": "2023-05-07 00:00:00", + "start": "2023-05-06T22:00:00.000Z", + "end": "2023-05-07T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2023-05-28 00:00:00", + "start": "2023-05-27T22:00:00.000Z", + "end": "2023-05-28T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2023-06-28 00:00:00", + "start": "2023-06-27T22:00:00.000Z", + "end": "2023-06-28T22:00:00.000Z", + "name": "Día de las Instituciones de Cantabria", + "type": "public", + "rule": "06-28", + "_weekday": "Wed" + }, + { + "date": "2023-07-25 00:00:00", + "start": "2023-07-24T22:00:00.000Z", + "end": "2023-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Tue" + }, + { + "date": "2023-08-15 00:00:00", + "start": "2023-08-14T22:00:00.000Z", + "end": "2023-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Tue" + }, + { + "date": "2023-09-15 00:00:00", + "start": "2023-09-14T22:00:00.000Z", + "end": "2023-09-15T22:00:00.000Z", + "name": "La Bien Aparecida", + "type": "public", + "rule": "09-15", + "_weekday": "Fri" + }, + { + "date": "2023-10-12 00:00:00", + "start": "2023-10-11T22:00:00.000Z", + "end": "2023-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Thu" + }, + { + "date": "2023-11-01 00:00:00", + "start": "2023-10-31T23:00:00.000Z", + "end": "2023-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Wed" + }, + { + "date": "2023-12-06 00:00:00", + "start": "2023-12-05T23:00:00.000Z", + "end": "2023-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Wed" + }, + { + "date": "2023-12-08 00:00:00", + "start": "2023-12-07T23:00:00.000Z", + "end": "2023-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Fri" + }, + { + "date": "2023-12-25 00:00:00", + "start": "2023-12-24T23:00:00.000Z", + "end": "2023-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Mon" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-CB-2024.json b/test/fixtures/ES-CB-2024.json new file mode 100644 index 000000000..8876166dc --- /dev/null +++ b/test/fixtures/ES-CB-2024.json @@ -0,0 +1,184 @@ +[ + { + "date": "2024-01-01 00:00:00", + "start": "2023-12-31T23:00:00.000Z", + "end": "2024-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Mon" + }, + { + "date": "2024-01-06 00:00:00", + "start": "2024-01-05T23:00:00.000Z", + "end": "2024-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Sat" + }, + { + "date": "2024-03-19 00:00:00", + "start": "2024-03-18T23:00:00.000Z", + "end": "2024-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Tue" + }, + { + "date": "2024-03-28 00:00:00", + "start": "2024-03-27T23:00:00.000Z", + "end": "2024-03-28T23:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2024-03-29 00:00:00", + "start": "2024-03-28T23:00:00.000Z", + "end": "2024-03-29T23:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2024-03-31 00:00:00", + "start": "2024-03-30T23:00:00.000Z", + "end": "2024-03-31T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2024-05-01 00:00:00", + "start": "2024-04-30T22:00:00.000Z", + "end": "2024-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Wed" + }, + { + "date": "2024-05-05 00:00:00", + "start": "2024-05-04T22:00:00.000Z", + "end": "2024-05-05T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2024-05-19 00:00:00", + "start": "2024-05-18T22:00:00.000Z", + "end": "2024-05-19T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2024-06-28 00:00:00", + "start": "2024-06-27T22:00:00.000Z", + "end": "2024-06-28T22:00:00.000Z", + "name": "Día de las Instituciones de Cantabria", + "type": "public", + "rule": "06-28", + "_weekday": "Fri" + }, + { + "date": "2024-07-25 00:00:00", + "start": "2024-07-24T22:00:00.000Z", + "end": "2024-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Thu" + }, + { + "date": "2024-08-15 00:00:00", + "start": "2024-08-14T22:00:00.000Z", + "end": "2024-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Thu" + }, + { + "date": "2024-09-15 00:00:00", + "start": "2024-09-14T22:00:00.000Z", + "end": "2024-09-15T22:00:00.000Z", + "name": "La Bien Aparecida", + "type": "public", + "rule": "09-15", + "_weekday": "Sun" + }, + { + "date": "2024-09-16 00:00:00", + "start": "2024-09-15T22:00:00.000Z", + "end": "2024-09-16T22:00:00.000Z", + "name": "La Bien Aparecida", + "type": "public", + "rule": "substitutes 09-15 if Sunday then next Monday", + "_weekday": "Mon" + }, + { + "date": "2024-10-12 00:00:00", + "start": "2024-10-11T22:00:00.000Z", + "end": "2024-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Sat" + }, + { + "date": "2024-11-01 00:00:00", + "start": "2024-10-31T23:00:00.000Z", + "end": "2024-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Fri" + }, + { + "date": "2024-12-06 00:00:00", + "start": "2024-12-05T23:00:00.000Z", + "end": "2024-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Fri" + }, + { + "date": "2024-12-08 00:00:00", + "start": "2024-12-07T23:00:00.000Z", + "end": "2024-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Sun" + }, + { + "date": "2024-12-09 00:00:00", + "start": "2024-12-08T23:00:00.000Z", + "end": "2024-12-09T23:00:00.000Z", + "name": "La inmaculada concepción (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 12-08 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2024-12-25 00:00:00", + "start": "2024-12-24T23:00:00.000Z", + "end": "2024-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Wed" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-CB-2025.json b/test/fixtures/ES-CB-2025.json new file mode 100644 index 000000000..1b8ebe8c9 --- /dev/null +++ b/test/fixtures/ES-CB-2025.json @@ -0,0 +1,175 @@ +[ + { + "date": "2025-01-01 00:00:00", + "start": "2024-12-31T23:00:00.000Z", + "end": "2025-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Wed" + }, + { + "date": "2025-01-06 00:00:00", + "start": "2025-01-05T23:00:00.000Z", + "end": "2025-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Mon" + }, + { + "date": "2025-03-19 00:00:00", + "start": "2025-03-18T23:00:00.000Z", + "end": "2025-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Wed" + }, + { + "date": "2025-04-17 00:00:00", + "start": "2025-04-16T22:00:00.000Z", + "end": "2025-04-17T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2025-04-18 00:00:00", + "start": "2025-04-17T22:00:00.000Z", + "end": "2025-04-18T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2025-04-20 00:00:00", + "start": "2025-04-19T22:00:00.000Z", + "end": "2025-04-20T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2025-05-01 00:00:00", + "start": "2025-04-30T22:00:00.000Z", + "end": "2025-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Thu" + }, + { + "date": "2025-05-04 00:00:00", + "start": "2025-05-03T22:00:00.000Z", + "end": "2025-05-04T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2025-06-08 00:00:00", + "start": "2025-06-07T22:00:00.000Z", + "end": "2025-06-08T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2025-06-28 00:00:00", + "start": "2025-06-27T22:00:00.000Z", + "end": "2025-06-28T22:00:00.000Z", + "name": "Día de las Instituciones de Cantabria", + "type": "public", + "rule": "06-28", + "_weekday": "Sat" + }, + { + "date": "2025-07-25 00:00:00", + "start": "2025-07-24T22:00:00.000Z", + "end": "2025-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Fri" + }, + { + "date": "2025-08-15 00:00:00", + "start": "2025-08-14T22:00:00.000Z", + "end": "2025-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Fri" + }, + { + "date": "2025-09-15 00:00:00", + "start": "2025-09-14T22:00:00.000Z", + "end": "2025-09-15T22:00:00.000Z", + "name": "La Bien Aparecida", + "type": "public", + "rule": "09-15", + "_weekday": "Mon" + }, + { + "date": "2025-10-12 00:00:00", + "start": "2025-10-11T22:00:00.000Z", + "end": "2025-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Sun" + }, + { + "date": "2025-10-13 00:00:00", + "start": "2025-10-12T22:00:00.000Z", + "end": "2025-10-13T22:00:00.000Z", + "name": "Fiesta Nacional de España (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 10-12 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2025-11-01 00:00:00", + "start": "2025-10-31T23:00:00.000Z", + "end": "2025-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Sat" + }, + { + "date": "2025-12-06 00:00:00", + "start": "2025-12-05T23:00:00.000Z", + "end": "2025-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Sat" + }, + { + "date": "2025-12-08 00:00:00", + "start": "2025-12-07T23:00:00.000Z", + "end": "2025-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Mon" + }, + { + "date": "2025-12-25 00:00:00", + "start": "2025-12-24T23:00:00.000Z", + "end": "2025-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Thu" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-CE-2015.json b/test/fixtures/ES-CE-2015.json new file mode 100644 index 000000000..b2a96b5d3 --- /dev/null +++ b/test/fixtures/ES-CE-2015.json @@ -0,0 +1,194 @@ +[ + { + "date": "2015-01-01 00:00:00", + "start": "2014-12-31T23:00:00.000Z", + "end": "2015-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Thu" + }, + { + "date": "2015-01-06 00:00:00", + "start": "2015-01-05T23:00:00.000Z", + "end": "2015-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Tue" + }, + { + "date": "2015-03-19 00:00:00", + "start": "2015-03-18T23:00:00.000Z", + "end": "2015-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Thu" + }, + { + "date": "2015-04-02 00:00:00", + "start": "2015-04-01T22:00:00.000Z", + "end": "2015-04-02T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2015-04-03 00:00:00", + "start": "2015-04-02T22:00:00.000Z", + "end": "2015-04-03T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2015-04-05 00:00:00", + "start": "2015-04-04T22:00:00.000Z", + "end": "2015-04-05T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2015-05-01 00:00:00", + "start": "2015-04-30T22:00:00.000Z", + "end": "2015-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Fri" + }, + { + "date": "2015-05-03 00:00:00", + "start": "2015-05-02T22:00:00.000Z", + "end": "2015-05-03T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2015-05-24 00:00:00", + "start": "2015-05-23T22:00:00.000Z", + "end": "2015-05-24T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2015-07-25 00:00:00", + "start": "2015-07-24T22:00:00.000Z", + "end": "2015-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Sat" + }, + { + "date": "2015-08-05 00:00:00", + "start": "2015-08-04T22:00:00.000Z", + "end": "2015-08-05T22:00:00.000Z", + "name": "Nuestra Señora de África", + "type": "public", + "rule": "08-05", + "_weekday": "Wed" + }, + { + "date": "2015-08-15 00:00:00", + "start": "2015-08-14T22:00:00.000Z", + "end": "2015-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Sat" + }, + { + "date": "2015-09-02 00:00:00", + "start": "2015-09-01T22:00:00.000Z", + "end": "2015-09-02T22:00:00.000Z", + "name": "Día de Ceuta", + "type": "public", + "rule": "09-02", + "_weekday": "Wed" + }, + { + "date": "2015-09-22 00:00:00 -0600", + "start": "2015-09-21T16:00:00.000Z", + "end": "2015-09-22T16:00:00.000Z", + "name": "Fiesta del Sacrificio-Eidul Adha", + "type": "public", + "rule": "9 Dhu al-Hijjah", + "_weekday": "Tue" + }, + { + "date": "2015-10-12 00:00:00", + "start": "2015-10-11T22:00:00.000Z", + "end": "2015-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Mon" + }, + { + "date": "2015-11-01 00:00:00", + "start": "2015-10-31T23:00:00.000Z", + "end": "2015-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Sun" + }, + { + "date": "2015-11-02 00:00:00", + "start": "2015-11-01T23:00:00.000Z", + "end": "2015-11-02T23:00:00.000Z", + "name": "Todos los Santos (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 11-01 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2015-12-06 00:00:00", + "start": "2015-12-05T23:00:00.000Z", + "end": "2015-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Sun" + }, + { + "date": "2015-12-07 00:00:00", + "start": "2015-12-06T23:00:00.000Z", + "end": "2015-12-07T23:00:00.000Z", + "name": "Día de la Constitución Española (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 12-06 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2015-12-08 00:00:00", + "start": "2015-12-07T23:00:00.000Z", + "end": "2015-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Tue" + }, + { + "date": "2015-12-25 00:00:00", + "start": "2015-12-24T23:00:00.000Z", + "end": "2015-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Fri" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-CE-2016.json b/test/fixtures/ES-CE-2016.json new file mode 100644 index 000000000..4db475c68 --- /dev/null +++ b/test/fixtures/ES-CE-2016.json @@ -0,0 +1,184 @@ +[ + { + "date": "2016-01-01 00:00:00", + "start": "2015-12-31T23:00:00.000Z", + "end": "2016-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Fri" + }, + { + "date": "2016-01-06 00:00:00", + "start": "2016-01-05T23:00:00.000Z", + "end": "2016-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Wed" + }, + { + "date": "2016-03-19 00:00:00", + "start": "2016-03-18T23:00:00.000Z", + "end": "2016-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Sat" + }, + { + "date": "2016-03-24 00:00:00", + "start": "2016-03-23T23:00:00.000Z", + "end": "2016-03-24T23:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2016-03-25 00:00:00", + "start": "2016-03-24T23:00:00.000Z", + "end": "2016-03-25T23:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2016-03-27 00:00:00", + "start": "2016-03-26T23:00:00.000Z", + "end": "2016-03-27T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2016-05-01 00:00:00", + "start": "2016-04-30T22:00:00.000Z", + "end": "2016-05-01T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2016-05-01 00:00:00", + "start": "2016-04-30T22:00:00.000Z", + "end": "2016-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Sun" + }, + { + "date": "2016-05-15 00:00:00", + "start": "2016-05-14T22:00:00.000Z", + "end": "2016-05-15T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2016-07-25 00:00:00", + "start": "2016-07-24T22:00:00.000Z", + "end": "2016-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Mon" + }, + { + "date": "2016-08-05 00:00:00", + "start": "2016-08-04T22:00:00.000Z", + "end": "2016-08-05T22:00:00.000Z", + "name": "Nuestra Señora de África", + "type": "public", + "rule": "08-05", + "_weekday": "Fri" + }, + { + "date": "2016-08-15 00:00:00", + "start": "2016-08-14T22:00:00.000Z", + "end": "2016-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Mon" + }, + { + "date": "2016-09-02 00:00:00", + "start": "2016-09-01T22:00:00.000Z", + "end": "2016-09-02T22:00:00.000Z", + "name": "Día de Ceuta", + "type": "public", + "rule": "09-02", + "_weekday": "Fri" + }, + { + "date": "2016-09-10 00:00:00 -0600", + "start": "2016-09-09T16:00:00.000Z", + "end": "2016-09-10T16:00:00.000Z", + "name": "Fiesta del Sacrificio-Eidul Adha", + "type": "public", + "rule": "9 Dhu al-Hijjah", + "_weekday": "Sat" + }, + { + "date": "2016-10-12 00:00:00", + "start": "2016-10-11T22:00:00.000Z", + "end": "2016-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Wed" + }, + { + "date": "2016-11-01 00:00:00", + "start": "2016-10-31T23:00:00.000Z", + "end": "2016-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Tue" + }, + { + "date": "2016-12-06 00:00:00", + "start": "2016-12-05T23:00:00.000Z", + "end": "2016-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Tue" + }, + { + "date": "2016-12-08 00:00:00", + "start": "2016-12-07T23:00:00.000Z", + "end": "2016-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Thu" + }, + { + "date": "2016-12-25 00:00:00", + "start": "2016-12-24T23:00:00.000Z", + "end": "2016-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Sun" + }, + { + "date": "2016-12-26 00:00:00", + "start": "2016-12-25T23:00:00.000Z", + "end": "2016-12-26T23:00:00.000Z", + "name": "Navidad (día sustituto)", + "type": "public", + "substitute": true, + "rule": "substitutes 12-25 if sunday then next monday", + "_weekday": "Mon" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-CE-2017.json b/test/fixtures/ES-CE-2017.json new file mode 100644 index 000000000..4b1690f74 --- /dev/null +++ b/test/fixtures/ES-CE-2017.json @@ -0,0 +1,184 @@ +[ + { + "date": "2017-01-01 00:00:00", + "start": "2016-12-31T23:00:00.000Z", + "end": "2017-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Sun" + }, + { + "date": "2017-01-02 00:00:00", + "start": "2017-01-01T23:00:00.000Z", + "end": "2017-01-02T23:00:00.000Z", + "name": "Año Nuevo (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 01-01 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2017-01-06 00:00:00", + "start": "2017-01-05T23:00:00.000Z", + "end": "2017-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Fri" + }, + { + "date": "2017-03-19 00:00:00", + "start": "2017-03-18T23:00:00.000Z", + "end": "2017-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Sun" + }, + { + "date": "2017-04-13 00:00:00", + "start": "2017-04-12T22:00:00.000Z", + "end": "2017-04-13T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2017-04-14 00:00:00", + "start": "2017-04-13T22:00:00.000Z", + "end": "2017-04-14T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2017-04-16 00:00:00", + "start": "2017-04-15T22:00:00.000Z", + "end": "2017-04-16T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2017-05-01 00:00:00", + "start": "2017-04-30T22:00:00.000Z", + "end": "2017-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Mon" + }, + { + "date": "2017-05-07 00:00:00", + "start": "2017-05-06T22:00:00.000Z", + "end": "2017-05-07T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2017-06-04 00:00:00", + "start": "2017-06-03T22:00:00.000Z", + "end": "2017-06-04T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2017-07-25 00:00:00", + "start": "2017-07-24T22:00:00.000Z", + "end": "2017-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Tue" + }, + { + "date": "2017-08-05 00:00:00", + "start": "2017-08-04T22:00:00.000Z", + "end": "2017-08-05T22:00:00.000Z", + "name": "Nuestra Señora de África", + "type": "public", + "rule": "08-05", + "_weekday": "Sat" + }, + { + "date": "2017-08-15 00:00:00", + "start": "2017-08-14T22:00:00.000Z", + "end": "2017-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Tue" + }, + { + "date": "2017-08-31 00:00:00 -0600", + "start": "2017-08-30T16:00:00.000Z", + "end": "2017-08-31T16:00:00.000Z", + "name": "Fiesta del Sacrificio-Eidul Adha", + "type": "public", + "rule": "9 Dhu al-Hijjah", + "_weekday": "Thu" + }, + { + "date": "2017-09-02 00:00:00", + "start": "2017-09-01T22:00:00.000Z", + "end": "2017-09-02T22:00:00.000Z", + "name": "Día de Ceuta", + "type": "public", + "rule": "09-02", + "_weekday": "Sat" + }, + { + "date": "2017-10-12 00:00:00", + "start": "2017-10-11T22:00:00.000Z", + "end": "2017-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Thu" + }, + { + "date": "2017-11-01 00:00:00", + "start": "2017-10-31T23:00:00.000Z", + "end": "2017-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Wed" + }, + { + "date": "2017-12-06 00:00:00", + "start": "2017-12-05T23:00:00.000Z", + "end": "2017-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Wed" + }, + { + "date": "2017-12-08 00:00:00", + "start": "2017-12-07T23:00:00.000Z", + "end": "2017-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Fri" + }, + { + "date": "2017-12-25 00:00:00", + "start": "2017-12-24T23:00:00.000Z", + "end": "2017-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Mon" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-CE-2018.json b/test/fixtures/ES-CE-2018.json new file mode 100644 index 000000000..c2d1b91c6 --- /dev/null +++ b/test/fixtures/ES-CE-2018.json @@ -0,0 +1,194 @@ +[ + { + "date": "2018-01-01 00:00:00", + "start": "2017-12-31T23:00:00.000Z", + "end": "2018-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Mon" + }, + { + "date": "2018-01-06 00:00:00", + "start": "2018-01-05T23:00:00.000Z", + "end": "2018-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Sat" + }, + { + "date": "2018-03-19 00:00:00", + "start": "2018-03-18T23:00:00.000Z", + "end": "2018-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Mon" + }, + { + "date": "2018-03-29 00:00:00", + "start": "2018-03-28T22:00:00.000Z", + "end": "2018-03-29T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2018-03-30 00:00:00", + "start": "2018-03-29T22:00:00.000Z", + "end": "2018-03-30T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2018-04-01 00:00:00", + "start": "2018-03-31T22:00:00.000Z", + "end": "2018-04-01T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2018-05-01 00:00:00", + "start": "2018-04-30T22:00:00.000Z", + "end": "2018-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Tue" + }, + { + "date": "2018-05-06 00:00:00", + "start": "2018-05-05T22:00:00.000Z", + "end": "2018-05-06T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2018-05-20 00:00:00", + "start": "2018-05-19T22:00:00.000Z", + "end": "2018-05-20T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2018-07-25 00:00:00", + "start": "2018-07-24T22:00:00.000Z", + "end": "2018-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Wed" + }, + { + "date": "2018-08-05 00:00:00", + "start": "2018-08-04T22:00:00.000Z", + "end": "2018-08-05T22:00:00.000Z", + "name": "Nuestra Señora de África", + "type": "public", + "rule": "08-05", + "_weekday": "Sun" + }, + { + "date": "2018-08-06 00:00:00", + "start": "2018-08-05T22:00:00.000Z", + "end": "2018-08-06T22:00:00.000Z", + "name": "Nuestra Señora de África", + "type": "public", + "substitute": true, + "rule": "substitutes 08-05 if Sunday then next Monday", + "_weekday": "Mon" + }, + { + "date": "2018-08-15 00:00:00", + "start": "2018-08-14T22:00:00.000Z", + "end": "2018-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Wed" + }, + { + "date": "2018-08-20 00:00:00 -0600", + "start": "2018-08-19T16:00:00.000Z", + "end": "2018-08-20T16:00:00.000Z", + "name": "Fiesta del Sacrificio-Eidul Adha", + "type": "public", + "rule": "9 Dhu al-Hijjah", + "_weekday": "Mon" + }, + { + "date": "2018-09-02 00:00:00", + "start": "2018-09-01T22:00:00.000Z", + "end": "2018-09-02T22:00:00.000Z", + "name": "Día de Ceuta", + "type": "public", + "rule": "09-02", + "_weekday": "Sun" + }, + { + "date": "2018-09-03 00:00:00", + "start": "2018-09-02T22:00:00.000Z", + "end": "2018-09-03T22:00:00.000Z", + "name": "Día de Ceuta", + "type": "public", + "substitute": true, + "rule": "substitutes 09-02 if Sunday then next Monday", + "_weekday": "Mon" + }, + { + "date": "2018-10-12 00:00:00", + "start": "2018-10-11T22:00:00.000Z", + "end": "2018-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Fri" + }, + { + "date": "2018-11-01 00:00:00", + "start": "2018-10-31T23:00:00.000Z", + "end": "2018-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Thu" + }, + { + "date": "2018-12-06 00:00:00", + "start": "2018-12-05T23:00:00.000Z", + "end": "2018-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Thu" + }, + { + "date": "2018-12-08 00:00:00", + "start": "2018-12-07T23:00:00.000Z", + "end": "2018-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Sat" + }, + { + "date": "2018-12-25 00:00:00", + "start": "2018-12-24T23:00:00.000Z", + "end": "2018-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Tue" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-CE-2019.json b/test/fixtures/ES-CE-2019.json new file mode 100644 index 000000000..695a69478 --- /dev/null +++ b/test/fixtures/ES-CE-2019.json @@ -0,0 +1,194 @@ +[ + { + "date": "2019-01-01 00:00:00", + "start": "2018-12-31T23:00:00.000Z", + "end": "2019-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Tue" + }, + { + "date": "2019-01-06 00:00:00", + "start": "2019-01-05T23:00:00.000Z", + "end": "2019-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Sun" + }, + { + "date": "2019-01-07 00:00:00", + "start": "2019-01-06T23:00:00.000Z", + "end": "2019-01-07T23:00:00.000Z", + "name": "Día de los Reyes Magos (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 01-06 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2019-03-19 00:00:00", + "start": "2019-03-18T23:00:00.000Z", + "end": "2019-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Tue" + }, + { + "date": "2019-04-18 00:00:00", + "start": "2019-04-17T22:00:00.000Z", + "end": "2019-04-18T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2019-04-19 00:00:00", + "start": "2019-04-18T22:00:00.000Z", + "end": "2019-04-19T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2019-04-21 00:00:00", + "start": "2019-04-20T22:00:00.000Z", + "end": "2019-04-21T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2019-05-01 00:00:00", + "start": "2019-04-30T22:00:00.000Z", + "end": "2019-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Wed" + }, + { + "date": "2019-05-05 00:00:00", + "start": "2019-05-04T22:00:00.000Z", + "end": "2019-05-05T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2019-06-09 00:00:00", + "start": "2019-06-08T22:00:00.000Z", + "end": "2019-06-09T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2019-07-25 00:00:00", + "start": "2019-07-24T22:00:00.000Z", + "end": "2019-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Thu" + }, + { + "date": "2019-08-05 00:00:00", + "start": "2019-08-04T22:00:00.000Z", + "end": "2019-08-05T22:00:00.000Z", + "name": "Nuestra Señora de África", + "type": "public", + "rule": "08-05", + "_weekday": "Mon" + }, + { + "date": "2019-08-10 00:00:00 -0600", + "start": "2019-08-09T16:00:00.000Z", + "end": "2019-08-10T16:00:00.000Z", + "name": "Fiesta del Sacrificio-Eidul Adha", + "type": "public", + "rule": "9 Dhu al-Hijjah", + "_weekday": "Sat" + }, + { + "date": "2019-08-15 00:00:00", + "start": "2019-08-14T22:00:00.000Z", + "end": "2019-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Thu" + }, + { + "date": "2019-09-02 00:00:00", + "start": "2019-09-01T22:00:00.000Z", + "end": "2019-09-02T22:00:00.000Z", + "name": "Día de Ceuta", + "type": "public", + "rule": "09-02", + "_weekday": "Mon" + }, + { + "date": "2019-10-12 00:00:00", + "start": "2019-10-11T22:00:00.000Z", + "end": "2019-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Sat" + }, + { + "date": "2019-11-01 00:00:00", + "start": "2019-10-31T23:00:00.000Z", + "end": "2019-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Fri" + }, + { + "date": "2019-12-06 00:00:00", + "start": "2019-12-05T23:00:00.000Z", + "end": "2019-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Fri" + }, + { + "date": "2019-12-08 00:00:00", + "start": "2019-12-07T23:00:00.000Z", + "end": "2019-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Sun" + }, + { + "date": "2019-12-09 00:00:00", + "start": "2019-12-08T23:00:00.000Z", + "end": "2019-12-09T23:00:00.000Z", + "name": "La inmaculada concepción (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 12-08 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2019-12-25 00:00:00", + "start": "2019-12-24T23:00:00.000Z", + "end": "2019-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Wed" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-CE-2020.json b/test/fixtures/ES-CE-2020.json new file mode 100644 index 000000000..7528f2d88 --- /dev/null +++ b/test/fixtures/ES-CE-2020.json @@ -0,0 +1,194 @@ +[ + { + "date": "2020-01-01 00:00:00", + "start": "2019-12-31T23:00:00.000Z", + "end": "2020-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Wed" + }, + { + "date": "2020-01-06 00:00:00", + "start": "2020-01-05T23:00:00.000Z", + "end": "2020-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Mon" + }, + { + "date": "2020-03-19 00:00:00", + "start": "2020-03-18T23:00:00.000Z", + "end": "2020-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Thu" + }, + { + "date": "2020-04-09 00:00:00", + "start": "2020-04-08T22:00:00.000Z", + "end": "2020-04-09T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2020-04-10 00:00:00", + "start": "2020-04-09T22:00:00.000Z", + "end": "2020-04-10T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2020-04-12 00:00:00", + "start": "2020-04-11T22:00:00.000Z", + "end": "2020-04-12T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2020-05-01 00:00:00", + "start": "2020-04-30T22:00:00.000Z", + "end": "2020-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Fri" + }, + { + "date": "2020-05-03 00:00:00", + "start": "2020-05-02T22:00:00.000Z", + "end": "2020-05-03T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2020-05-31 00:00:00", + "start": "2020-05-30T22:00:00.000Z", + "end": "2020-05-31T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2020-07-25 00:00:00", + "start": "2020-07-24T22:00:00.000Z", + "end": "2020-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Sat" + }, + { + "date": "2020-07-30 00:00:00 -0600", + "start": "2020-07-29T16:00:00.000Z", + "end": "2020-07-30T16:00:00.000Z", + "name": "Fiesta del Sacrificio-Eidul Adha", + "type": "public", + "rule": "9 Dhu al-Hijjah", + "_weekday": "Thu" + }, + { + "date": "2020-08-05 00:00:00", + "start": "2020-08-04T22:00:00.000Z", + "end": "2020-08-05T22:00:00.000Z", + "name": "Nuestra Señora de África", + "type": "public", + "rule": "08-05", + "_weekday": "Wed" + }, + { + "date": "2020-08-15 00:00:00", + "start": "2020-08-14T22:00:00.000Z", + "end": "2020-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Sat" + }, + { + "date": "2020-09-02 00:00:00", + "start": "2020-09-01T22:00:00.000Z", + "end": "2020-09-02T22:00:00.000Z", + "name": "Día de Ceuta", + "type": "public", + "rule": "09-02", + "_weekday": "Wed" + }, + { + "date": "2020-10-12 00:00:00", + "start": "2020-10-11T22:00:00.000Z", + "end": "2020-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Mon" + }, + { + "date": "2020-11-01 00:00:00", + "start": "2020-10-31T23:00:00.000Z", + "end": "2020-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Sun" + }, + { + "date": "2020-11-02 00:00:00", + "start": "2020-11-01T23:00:00.000Z", + "end": "2020-11-02T23:00:00.000Z", + "name": "Todos los Santos (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 11-01 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2020-12-06 00:00:00", + "start": "2020-12-05T23:00:00.000Z", + "end": "2020-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Sun" + }, + { + "date": "2020-12-07 00:00:00", + "start": "2020-12-06T23:00:00.000Z", + "end": "2020-12-07T23:00:00.000Z", + "name": "Día de la Constitución Española (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 12-06 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2020-12-08 00:00:00", + "start": "2020-12-07T23:00:00.000Z", + "end": "2020-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Tue" + }, + { + "date": "2020-12-25 00:00:00", + "start": "2020-12-24T23:00:00.000Z", + "end": "2020-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Fri" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-CE-2021.json b/test/fixtures/ES-CE-2021.json new file mode 100644 index 000000000..53ac5e31e --- /dev/null +++ b/test/fixtures/ES-CE-2021.json @@ -0,0 +1,174 @@ +[ + { + "date": "2021-01-01 00:00:00", + "start": "2020-12-31T23:00:00.000Z", + "end": "2021-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Fri" + }, + { + "date": "2021-01-06 00:00:00", + "start": "2021-01-05T23:00:00.000Z", + "end": "2021-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Wed" + }, + { + "date": "2021-03-19 00:00:00", + "start": "2021-03-18T23:00:00.000Z", + "end": "2021-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Fri" + }, + { + "date": "2021-04-01 00:00:00", + "start": "2021-03-31T22:00:00.000Z", + "end": "2021-04-01T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2021-04-02 00:00:00", + "start": "2021-04-01T22:00:00.000Z", + "end": "2021-04-02T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2021-04-04 00:00:00", + "start": "2021-04-03T22:00:00.000Z", + "end": "2021-04-04T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2021-05-01 00:00:00", + "start": "2021-04-30T22:00:00.000Z", + "end": "2021-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Sat" + }, + { + "date": "2021-05-02 00:00:00", + "start": "2021-05-01T22:00:00.000Z", + "end": "2021-05-02T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2021-05-23 00:00:00", + "start": "2021-05-22T22:00:00.000Z", + "end": "2021-05-23T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2021-07-19 00:00:00 -0600", + "start": "2021-07-18T16:00:00.000Z", + "end": "2021-07-19T16:00:00.000Z", + "name": "Fiesta del Sacrificio-Eidul Adha", + "type": "public", + "rule": "9 Dhu al-Hijjah", + "_weekday": "Mon" + }, + { + "date": "2021-07-25 00:00:00", + "start": "2021-07-24T22:00:00.000Z", + "end": "2021-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Sun" + }, + { + "date": "2021-08-05 00:00:00", + "start": "2021-08-04T22:00:00.000Z", + "end": "2021-08-05T22:00:00.000Z", + "name": "Nuestra Señora de África", + "type": "public", + "rule": "08-05", + "_weekday": "Thu" + }, + { + "date": "2021-08-15 00:00:00", + "start": "2021-08-14T22:00:00.000Z", + "end": "2021-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Sun" + }, + { + "date": "2021-09-02 00:00:00", + "start": "2021-09-01T22:00:00.000Z", + "end": "2021-09-02T22:00:00.000Z", + "name": "Día de Ceuta", + "type": "public", + "rule": "09-02", + "_weekday": "Thu" + }, + { + "date": "2021-10-12 00:00:00", + "start": "2021-10-11T22:00:00.000Z", + "end": "2021-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Tue" + }, + { + "date": "2021-11-01 00:00:00", + "start": "2021-10-31T23:00:00.000Z", + "end": "2021-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Mon" + }, + { + "date": "2021-12-06 00:00:00", + "start": "2021-12-05T23:00:00.000Z", + "end": "2021-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Mon" + }, + { + "date": "2021-12-08 00:00:00", + "start": "2021-12-07T23:00:00.000Z", + "end": "2021-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Wed" + }, + { + "date": "2021-12-25 00:00:00", + "start": "2021-12-24T23:00:00.000Z", + "end": "2021-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Sat" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-CE-2022.json b/test/fixtures/ES-CE-2022.json new file mode 100644 index 000000000..ac3d76cf7 --- /dev/null +++ b/test/fixtures/ES-CE-2022.json @@ -0,0 +1,184 @@ +[ + { + "date": "2022-01-01 00:00:00", + "start": "2021-12-31T23:00:00.000Z", + "end": "2022-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Sat" + }, + { + "date": "2022-01-06 00:00:00", + "start": "2022-01-05T23:00:00.000Z", + "end": "2022-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Thu" + }, + { + "date": "2022-03-19 00:00:00", + "start": "2022-03-18T23:00:00.000Z", + "end": "2022-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Sat" + }, + { + "date": "2022-04-14 00:00:00", + "start": "2022-04-13T22:00:00.000Z", + "end": "2022-04-14T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2022-04-15 00:00:00", + "start": "2022-04-14T22:00:00.000Z", + "end": "2022-04-15T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2022-04-17 00:00:00", + "start": "2022-04-16T22:00:00.000Z", + "end": "2022-04-17T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2022-05-01 00:00:00", + "start": "2022-04-30T22:00:00.000Z", + "end": "2022-05-01T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2022-05-01 00:00:00", + "start": "2022-04-30T22:00:00.000Z", + "end": "2022-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Sun" + }, + { + "date": "2022-06-05 00:00:00", + "start": "2022-06-04T22:00:00.000Z", + "end": "2022-06-05T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2022-07-08 00:00:00 -0600", + "start": "2022-07-07T16:00:00.000Z", + "end": "2022-07-08T16:00:00.000Z", + "name": "Fiesta del Sacrificio-Eidul Adha", + "type": "public", + "rule": "9 Dhu al-Hijjah", + "_weekday": "Fri" + }, + { + "date": "2022-07-25 00:00:00", + "start": "2022-07-24T22:00:00.000Z", + "end": "2022-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Mon" + }, + { + "date": "2022-08-05 00:00:00", + "start": "2022-08-04T22:00:00.000Z", + "end": "2022-08-05T22:00:00.000Z", + "name": "Nuestra Señora de África", + "type": "public", + "rule": "08-05", + "_weekday": "Fri" + }, + { + "date": "2022-08-15 00:00:00", + "start": "2022-08-14T22:00:00.000Z", + "end": "2022-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Mon" + }, + { + "date": "2022-09-02 00:00:00", + "start": "2022-09-01T22:00:00.000Z", + "end": "2022-09-02T22:00:00.000Z", + "name": "Día de Ceuta", + "type": "public", + "rule": "09-02", + "_weekday": "Fri" + }, + { + "date": "2022-10-12 00:00:00", + "start": "2022-10-11T22:00:00.000Z", + "end": "2022-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Wed" + }, + { + "date": "2022-11-01 00:00:00", + "start": "2022-10-31T23:00:00.000Z", + "end": "2022-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Tue" + }, + { + "date": "2022-12-06 00:00:00", + "start": "2022-12-05T23:00:00.000Z", + "end": "2022-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Tue" + }, + { + "date": "2022-12-08 00:00:00", + "start": "2022-12-07T23:00:00.000Z", + "end": "2022-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Thu" + }, + { + "date": "2022-12-25 00:00:00", + "start": "2022-12-24T23:00:00.000Z", + "end": "2022-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Sun" + }, + { + "date": "2022-12-26 00:00:00", + "start": "2022-12-25T23:00:00.000Z", + "end": "2022-12-26T23:00:00.000Z", + "name": "Navidad (día sustituto)", + "type": "public", + "substitute": true, + "rule": "substitutes 12-25 if sunday then next monday", + "_weekday": "Mon" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-CE-2023.json b/test/fixtures/ES-CE-2023.json new file mode 100644 index 000000000..3eb7c57fb --- /dev/null +++ b/test/fixtures/ES-CE-2023.json @@ -0,0 +1,184 @@ +[ + { + "date": "2023-01-01 00:00:00", + "start": "2022-12-31T23:00:00.000Z", + "end": "2023-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Sun" + }, + { + "date": "2023-01-02 00:00:00", + "start": "2023-01-01T23:00:00.000Z", + "end": "2023-01-02T23:00:00.000Z", + "name": "Año Nuevo (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 01-01 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2023-01-06 00:00:00", + "start": "2023-01-05T23:00:00.000Z", + "end": "2023-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Fri" + }, + { + "date": "2023-03-19 00:00:00", + "start": "2023-03-18T23:00:00.000Z", + "end": "2023-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Sun" + }, + { + "date": "2023-04-06 00:00:00", + "start": "2023-04-05T22:00:00.000Z", + "end": "2023-04-06T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2023-04-07 00:00:00", + "start": "2023-04-06T22:00:00.000Z", + "end": "2023-04-07T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2023-04-09 00:00:00", + "start": "2023-04-08T22:00:00.000Z", + "end": "2023-04-09T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2023-05-01 00:00:00", + "start": "2023-04-30T22:00:00.000Z", + "end": "2023-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Mon" + }, + { + "date": "2023-05-07 00:00:00", + "start": "2023-05-06T22:00:00.000Z", + "end": "2023-05-07T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2023-05-28 00:00:00", + "start": "2023-05-27T22:00:00.000Z", + "end": "2023-05-28T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2023-06-27 00:00:00 -0600", + "start": "2023-06-26T16:00:00.000Z", + "end": "2023-06-27T16:00:00.000Z", + "name": "Fiesta del Sacrificio-Eidul Adha", + "type": "public", + "rule": "9 Dhu al-Hijjah", + "_weekday": "Tue" + }, + { + "date": "2023-07-25 00:00:00", + "start": "2023-07-24T22:00:00.000Z", + "end": "2023-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Tue" + }, + { + "date": "2023-08-05 00:00:00", + "start": "2023-08-04T22:00:00.000Z", + "end": "2023-08-05T22:00:00.000Z", + "name": "Nuestra Señora de África", + "type": "public", + "rule": "08-05", + "_weekday": "Sat" + }, + { + "date": "2023-08-15 00:00:00", + "start": "2023-08-14T22:00:00.000Z", + "end": "2023-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Tue" + }, + { + "date": "2023-09-02 00:00:00", + "start": "2023-09-01T22:00:00.000Z", + "end": "2023-09-02T22:00:00.000Z", + "name": "Día de Ceuta", + "type": "public", + "rule": "09-02", + "_weekday": "Sat" + }, + { + "date": "2023-10-12 00:00:00", + "start": "2023-10-11T22:00:00.000Z", + "end": "2023-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Thu" + }, + { + "date": "2023-11-01 00:00:00", + "start": "2023-10-31T23:00:00.000Z", + "end": "2023-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Wed" + }, + { + "date": "2023-12-06 00:00:00", + "start": "2023-12-05T23:00:00.000Z", + "end": "2023-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Wed" + }, + { + "date": "2023-12-08 00:00:00", + "start": "2023-12-07T23:00:00.000Z", + "end": "2023-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Fri" + }, + { + "date": "2023-12-25 00:00:00", + "start": "2023-12-24T23:00:00.000Z", + "end": "2023-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Mon" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-CE-2024.json b/test/fixtures/ES-CE-2024.json new file mode 100644 index 000000000..2b40aafe7 --- /dev/null +++ b/test/fixtures/ES-CE-2024.json @@ -0,0 +1,184 @@ +[ + { + "date": "2024-01-01 00:00:00", + "start": "2023-12-31T23:00:00.000Z", + "end": "2024-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Mon" + }, + { + "date": "2024-01-06 00:00:00", + "start": "2024-01-05T23:00:00.000Z", + "end": "2024-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Sat" + }, + { + "date": "2024-03-19 00:00:00", + "start": "2024-03-18T23:00:00.000Z", + "end": "2024-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Tue" + }, + { + "date": "2024-03-28 00:00:00", + "start": "2024-03-27T23:00:00.000Z", + "end": "2024-03-28T23:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2024-03-29 00:00:00", + "start": "2024-03-28T23:00:00.000Z", + "end": "2024-03-29T23:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2024-03-31 00:00:00", + "start": "2024-03-30T23:00:00.000Z", + "end": "2024-03-31T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2024-05-01 00:00:00", + "start": "2024-04-30T22:00:00.000Z", + "end": "2024-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Wed" + }, + { + "date": "2024-05-05 00:00:00", + "start": "2024-05-04T22:00:00.000Z", + "end": "2024-05-05T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2024-05-19 00:00:00", + "start": "2024-05-18T22:00:00.000Z", + "end": "2024-05-19T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2024-06-15 00:00:00 -0600", + "start": "2024-06-14T16:00:00.000Z", + "end": "2024-06-15T16:00:00.000Z", + "name": "Fiesta del Sacrificio-Eidul Adha", + "type": "public", + "rule": "9 Dhu al-Hijjah", + "_weekday": "Sat" + }, + { + "date": "2024-07-25 00:00:00", + "start": "2024-07-24T22:00:00.000Z", + "end": "2024-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Thu" + }, + { + "date": "2024-08-05 00:00:00", + "start": "2024-08-04T22:00:00.000Z", + "end": "2024-08-05T22:00:00.000Z", + "name": "Nuestra Señora de África", + "type": "public", + "rule": "08-05", + "_weekday": "Mon" + }, + { + "date": "2024-08-15 00:00:00", + "start": "2024-08-14T22:00:00.000Z", + "end": "2024-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Thu" + }, + { + "date": "2024-09-02 00:00:00", + "start": "2024-09-01T22:00:00.000Z", + "end": "2024-09-02T22:00:00.000Z", + "name": "Día de Ceuta", + "type": "public", + "rule": "09-02", + "_weekday": "Mon" + }, + { + "date": "2024-10-12 00:00:00", + "start": "2024-10-11T22:00:00.000Z", + "end": "2024-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Sat" + }, + { + "date": "2024-11-01 00:00:00", + "start": "2024-10-31T23:00:00.000Z", + "end": "2024-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Fri" + }, + { + "date": "2024-12-06 00:00:00", + "start": "2024-12-05T23:00:00.000Z", + "end": "2024-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Fri" + }, + { + "date": "2024-12-08 00:00:00", + "start": "2024-12-07T23:00:00.000Z", + "end": "2024-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Sun" + }, + { + "date": "2024-12-09 00:00:00", + "start": "2024-12-08T23:00:00.000Z", + "end": "2024-12-09T23:00:00.000Z", + "name": "La inmaculada concepción (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 12-08 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2024-12-25 00:00:00", + "start": "2024-12-24T23:00:00.000Z", + "end": "2024-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Wed" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-CE-2025.json b/test/fixtures/ES-CE-2025.json new file mode 100644 index 000000000..d5783d152 --- /dev/null +++ b/test/fixtures/ES-CE-2025.json @@ -0,0 +1,184 @@ +[ + { + "date": "2025-01-01 00:00:00", + "start": "2024-12-31T23:00:00.000Z", + "end": "2025-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Wed" + }, + { + "date": "2025-01-06 00:00:00", + "start": "2025-01-05T23:00:00.000Z", + "end": "2025-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Mon" + }, + { + "date": "2025-03-19 00:00:00", + "start": "2025-03-18T23:00:00.000Z", + "end": "2025-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Wed" + }, + { + "date": "2025-04-17 00:00:00", + "start": "2025-04-16T22:00:00.000Z", + "end": "2025-04-17T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2025-04-18 00:00:00", + "start": "2025-04-17T22:00:00.000Z", + "end": "2025-04-18T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2025-04-20 00:00:00", + "start": "2025-04-19T22:00:00.000Z", + "end": "2025-04-20T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2025-05-01 00:00:00", + "start": "2025-04-30T22:00:00.000Z", + "end": "2025-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Thu" + }, + { + "date": "2025-05-04 00:00:00", + "start": "2025-05-03T22:00:00.000Z", + "end": "2025-05-04T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2025-06-05 00:00:00 -0600", + "start": "2025-06-04T16:00:00.000Z", + "end": "2025-06-05T16:00:00.000Z", + "name": "Fiesta del Sacrificio-Eidul Adha", + "type": "public", + "rule": "9 Dhu al-Hijjah", + "_weekday": "Thu" + }, + { + "date": "2025-06-08 00:00:00", + "start": "2025-06-07T22:00:00.000Z", + "end": "2025-06-08T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2025-07-25 00:00:00", + "start": "2025-07-24T22:00:00.000Z", + "end": "2025-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Fri" + }, + { + "date": "2025-08-05 00:00:00", + "start": "2025-08-04T22:00:00.000Z", + "end": "2025-08-05T22:00:00.000Z", + "name": "Nuestra Señora de África", + "type": "public", + "rule": "08-05", + "_weekday": "Tue" + }, + { + "date": "2025-08-15 00:00:00", + "start": "2025-08-14T22:00:00.000Z", + "end": "2025-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Fri" + }, + { + "date": "2025-09-02 00:00:00", + "start": "2025-09-01T22:00:00.000Z", + "end": "2025-09-02T22:00:00.000Z", + "name": "Día de Ceuta", + "type": "public", + "rule": "09-02", + "_weekday": "Tue" + }, + { + "date": "2025-10-12 00:00:00", + "start": "2025-10-11T22:00:00.000Z", + "end": "2025-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Sun" + }, + { + "date": "2025-10-13 00:00:00", + "start": "2025-10-12T22:00:00.000Z", + "end": "2025-10-13T22:00:00.000Z", + "name": "Fiesta Nacional de España (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 10-12 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2025-11-01 00:00:00", + "start": "2025-10-31T23:00:00.000Z", + "end": "2025-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Sat" + }, + { + "date": "2025-12-06 00:00:00", + "start": "2025-12-05T23:00:00.000Z", + "end": "2025-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Sat" + }, + { + "date": "2025-12-08 00:00:00", + "start": "2025-12-07T23:00:00.000Z", + "end": "2025-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Mon" + }, + { + "date": "2025-12-25 00:00:00", + "start": "2025-12-24T23:00:00.000Z", + "end": "2025-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Thu" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-CL-2015.json b/test/fixtures/ES-CL-2015.json new file mode 100644 index 000000000..909a8c4d0 --- /dev/null +++ b/test/fixtures/ES-CL-2015.json @@ -0,0 +1,176 @@ +[ + { + "date": "2015-01-01 00:00:00", + "start": "2014-12-31T23:00:00.000Z", + "end": "2015-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Thu" + }, + { + "date": "2015-01-06 00:00:00", + "start": "2015-01-05T23:00:00.000Z", + "end": "2015-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Tue" + }, + { + "date": "2015-03-19 00:00:00", + "start": "2015-03-18T23:00:00.000Z", + "end": "2015-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Thu" + }, + { + "date": "2015-04-02 00:00:00", + "start": "2015-04-01T22:00:00.000Z", + "end": "2015-04-02T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2015-04-03 00:00:00", + "start": "2015-04-02T22:00:00.000Z", + "end": "2015-04-03T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2015-04-05 00:00:00", + "start": "2015-04-04T22:00:00.000Z", + "end": "2015-04-05T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2015-04-23 00:00:00", + "start": "2015-04-22T22:00:00.000Z", + "end": "2015-04-23T22:00:00.000Z", + "name": "Fiesta de Castilla y León", + "type": "public", + "rule": "04-23", + "_weekday": "Thu" + }, + { + "date": "2015-05-01 00:00:00", + "start": "2015-04-30T22:00:00.000Z", + "end": "2015-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Fri" + }, + { + "date": "2015-05-03 00:00:00", + "start": "2015-05-02T22:00:00.000Z", + "end": "2015-05-03T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2015-05-24 00:00:00", + "start": "2015-05-23T22:00:00.000Z", + "end": "2015-05-24T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2015-07-25 00:00:00", + "start": "2015-07-24T22:00:00.000Z", + "end": "2015-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Sat" + }, + { + "date": "2015-08-15 00:00:00", + "start": "2015-08-14T22:00:00.000Z", + "end": "2015-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Sat" + }, + { + "date": "2015-10-12 00:00:00", + "start": "2015-10-11T22:00:00.000Z", + "end": "2015-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Mon" + }, + { + "date": "2015-11-01 00:00:00", + "start": "2015-10-31T23:00:00.000Z", + "end": "2015-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Sun" + }, + { + "date": "2015-11-02 00:00:00", + "start": "2015-11-01T23:00:00.000Z", + "end": "2015-11-02T23:00:00.000Z", + "name": "Todos los Santos (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 11-01 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2015-12-06 00:00:00", + "start": "2015-12-05T23:00:00.000Z", + "end": "2015-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Sun" + }, + { + "date": "2015-12-07 00:00:00", + "start": "2015-12-06T23:00:00.000Z", + "end": "2015-12-07T23:00:00.000Z", + "name": "Día de la Constitución Española (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 12-06 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2015-12-08 00:00:00", + "start": "2015-12-07T23:00:00.000Z", + "end": "2015-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Tue" + }, + { + "date": "2015-12-25 00:00:00", + "start": "2015-12-24T23:00:00.000Z", + "end": "2015-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Fri" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-CL-2016.json b/test/fixtures/ES-CL-2016.json new file mode 100644 index 000000000..d69146ce0 --- /dev/null +++ b/test/fixtures/ES-CL-2016.json @@ -0,0 +1,176 @@ +[ + { + "date": "2016-01-01 00:00:00", + "start": "2015-12-31T23:00:00.000Z", + "end": "2016-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Fri" + }, + { + "date": "2016-01-06 00:00:00", + "start": "2016-01-05T23:00:00.000Z", + "end": "2016-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Wed" + }, + { + "date": "2016-03-19 00:00:00", + "start": "2016-03-18T23:00:00.000Z", + "end": "2016-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Sat" + }, + { + "date": "2016-03-24 00:00:00", + "start": "2016-03-23T23:00:00.000Z", + "end": "2016-03-24T23:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2016-03-25 00:00:00", + "start": "2016-03-24T23:00:00.000Z", + "end": "2016-03-25T23:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2016-03-27 00:00:00", + "start": "2016-03-26T23:00:00.000Z", + "end": "2016-03-27T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2016-04-23 00:00:00", + "start": "2016-04-22T22:00:00.000Z", + "end": "2016-04-23T22:00:00.000Z", + "name": "Fiesta de Castilla y León", + "type": "public", + "rule": "04-23", + "_weekday": "Sat" + }, + { + "date": "2016-05-01 00:00:00", + "start": "2016-04-30T22:00:00.000Z", + "end": "2016-05-01T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2016-05-01 00:00:00", + "start": "2016-04-30T22:00:00.000Z", + "end": "2016-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Sun" + }, + { + "date": "2016-05-02 00:00:00", + "start": "2016-05-01T22:00:00.000Z", + "end": "2016-05-02T22:00:00.000Z", + "name": "Día del trabajador (día sustituto)", + "type": "public", + "substitute": true, + "rule": "substitutes 05-01 if Sunday then next Monday", + "_weekday": "Mon" + }, + { + "date": "2016-05-15 00:00:00", + "start": "2016-05-14T22:00:00.000Z", + "end": "2016-05-15T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2016-07-25 00:00:00", + "start": "2016-07-24T22:00:00.000Z", + "end": "2016-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Mon" + }, + { + "date": "2016-08-15 00:00:00", + "start": "2016-08-14T22:00:00.000Z", + "end": "2016-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Mon" + }, + { + "date": "2016-10-12 00:00:00", + "start": "2016-10-11T22:00:00.000Z", + "end": "2016-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Wed" + }, + { + "date": "2016-11-01 00:00:00", + "start": "2016-10-31T23:00:00.000Z", + "end": "2016-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Tue" + }, + { + "date": "2016-12-06 00:00:00", + "start": "2016-12-05T23:00:00.000Z", + "end": "2016-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Tue" + }, + { + "date": "2016-12-08 00:00:00", + "start": "2016-12-07T23:00:00.000Z", + "end": "2016-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Thu" + }, + { + "date": "2016-12-25 00:00:00", + "start": "2016-12-24T23:00:00.000Z", + "end": "2016-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Sun" + }, + { + "date": "2016-12-26 00:00:00", + "start": "2016-12-25T23:00:00.000Z", + "end": "2016-12-26T23:00:00.000Z", + "name": "Navidad (día sustituto)", + "type": "public", + "substitute": true, + "rule": "substitutes 12-25 if sunday then next monday", + "_weekday": "Mon" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-CL-2017.json b/test/fixtures/ES-CL-2017.json new file mode 100644 index 000000000..c9c7b29fb --- /dev/null +++ b/test/fixtures/ES-CL-2017.json @@ -0,0 +1,176 @@ +[ + { + "date": "2017-01-01 00:00:00", + "start": "2016-12-31T23:00:00.000Z", + "end": "2017-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Sun" + }, + { + "date": "2017-01-02 00:00:00", + "start": "2017-01-01T23:00:00.000Z", + "end": "2017-01-02T23:00:00.000Z", + "name": "Año Nuevo (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 01-01 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2017-01-06 00:00:00", + "start": "2017-01-05T23:00:00.000Z", + "end": "2017-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Fri" + }, + { + "date": "2017-03-19 00:00:00", + "start": "2017-03-18T23:00:00.000Z", + "end": "2017-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Sun" + }, + { + "date": "2017-04-13 00:00:00", + "start": "2017-04-12T22:00:00.000Z", + "end": "2017-04-13T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2017-04-14 00:00:00", + "start": "2017-04-13T22:00:00.000Z", + "end": "2017-04-14T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2017-04-16 00:00:00", + "start": "2017-04-15T22:00:00.000Z", + "end": "2017-04-16T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2017-04-23 00:00:00", + "start": "2017-04-22T22:00:00.000Z", + "end": "2017-04-23T22:00:00.000Z", + "name": "Fiesta de Castilla y León", + "type": "public", + "rule": "04-23", + "_weekday": "Sun" + }, + { + "date": "2017-04-24 00:00:00", + "start": "2017-04-23T22:00:00.000Z", + "end": "2017-04-24T22:00:00.000Z", + "name": "Fiesta de Castilla y León", + "type": "public", + "substitute": true, + "rule": "substitutes 04-23 if Sunday then next Monday", + "_weekday": "Mon" + }, + { + "date": "2017-05-01 00:00:00", + "start": "2017-04-30T22:00:00.000Z", + "end": "2017-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Mon" + }, + { + "date": "2017-05-07 00:00:00", + "start": "2017-05-06T22:00:00.000Z", + "end": "2017-05-07T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2017-06-04 00:00:00", + "start": "2017-06-03T22:00:00.000Z", + "end": "2017-06-04T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2017-07-25 00:00:00", + "start": "2017-07-24T22:00:00.000Z", + "end": "2017-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Tue" + }, + { + "date": "2017-08-15 00:00:00", + "start": "2017-08-14T22:00:00.000Z", + "end": "2017-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Tue" + }, + { + "date": "2017-10-12 00:00:00", + "start": "2017-10-11T22:00:00.000Z", + "end": "2017-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Thu" + }, + { + "date": "2017-11-01 00:00:00", + "start": "2017-10-31T23:00:00.000Z", + "end": "2017-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Wed" + }, + { + "date": "2017-12-06 00:00:00", + "start": "2017-12-05T23:00:00.000Z", + "end": "2017-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Wed" + }, + { + "date": "2017-12-08 00:00:00", + "start": "2017-12-07T23:00:00.000Z", + "end": "2017-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Fri" + }, + { + "date": "2017-12-25 00:00:00", + "start": "2017-12-24T23:00:00.000Z", + "end": "2017-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Mon" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-CL-2018.json b/test/fixtures/ES-CL-2018.json new file mode 100644 index 000000000..1fe8caef8 --- /dev/null +++ b/test/fixtures/ES-CL-2018.json @@ -0,0 +1,156 @@ +[ + { + "date": "2018-01-01 00:00:00", + "start": "2017-12-31T23:00:00.000Z", + "end": "2018-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Mon" + }, + { + "date": "2018-01-06 00:00:00", + "start": "2018-01-05T23:00:00.000Z", + "end": "2018-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Sat" + }, + { + "date": "2018-03-19 00:00:00", + "start": "2018-03-18T23:00:00.000Z", + "end": "2018-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Mon" + }, + { + "date": "2018-03-29 00:00:00", + "start": "2018-03-28T22:00:00.000Z", + "end": "2018-03-29T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2018-03-30 00:00:00", + "start": "2018-03-29T22:00:00.000Z", + "end": "2018-03-30T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2018-04-01 00:00:00", + "start": "2018-03-31T22:00:00.000Z", + "end": "2018-04-01T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2018-04-23 00:00:00", + "start": "2018-04-22T22:00:00.000Z", + "end": "2018-04-23T22:00:00.000Z", + "name": "Fiesta de Castilla y León", + "type": "public", + "rule": "04-23", + "_weekday": "Mon" + }, + { + "date": "2018-05-01 00:00:00", + "start": "2018-04-30T22:00:00.000Z", + "end": "2018-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Tue" + }, + { + "date": "2018-05-06 00:00:00", + "start": "2018-05-05T22:00:00.000Z", + "end": "2018-05-06T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2018-05-20 00:00:00", + "start": "2018-05-19T22:00:00.000Z", + "end": "2018-05-20T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2018-07-25 00:00:00", + "start": "2018-07-24T22:00:00.000Z", + "end": "2018-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Wed" + }, + { + "date": "2018-08-15 00:00:00", + "start": "2018-08-14T22:00:00.000Z", + "end": "2018-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Wed" + }, + { + "date": "2018-10-12 00:00:00", + "start": "2018-10-11T22:00:00.000Z", + "end": "2018-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Fri" + }, + { + "date": "2018-11-01 00:00:00", + "start": "2018-10-31T23:00:00.000Z", + "end": "2018-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Thu" + }, + { + "date": "2018-12-06 00:00:00", + "start": "2018-12-05T23:00:00.000Z", + "end": "2018-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Thu" + }, + { + "date": "2018-12-08 00:00:00", + "start": "2018-12-07T23:00:00.000Z", + "end": "2018-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Sat" + }, + { + "date": "2018-12-25 00:00:00", + "start": "2018-12-24T23:00:00.000Z", + "end": "2018-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Tue" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-CL-2019.json b/test/fixtures/ES-CL-2019.json new file mode 100644 index 000000000..a29ff7a2e --- /dev/null +++ b/test/fixtures/ES-CL-2019.json @@ -0,0 +1,176 @@ +[ + { + "date": "2019-01-01 00:00:00", + "start": "2018-12-31T23:00:00.000Z", + "end": "2019-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Tue" + }, + { + "date": "2019-01-06 00:00:00", + "start": "2019-01-05T23:00:00.000Z", + "end": "2019-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Sun" + }, + { + "date": "2019-01-07 00:00:00", + "start": "2019-01-06T23:00:00.000Z", + "end": "2019-01-07T23:00:00.000Z", + "name": "Día de los Reyes Magos (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 01-06 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2019-03-19 00:00:00", + "start": "2019-03-18T23:00:00.000Z", + "end": "2019-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Tue" + }, + { + "date": "2019-04-18 00:00:00", + "start": "2019-04-17T22:00:00.000Z", + "end": "2019-04-18T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2019-04-19 00:00:00", + "start": "2019-04-18T22:00:00.000Z", + "end": "2019-04-19T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2019-04-21 00:00:00", + "start": "2019-04-20T22:00:00.000Z", + "end": "2019-04-21T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2019-04-23 00:00:00", + "start": "2019-04-22T22:00:00.000Z", + "end": "2019-04-23T22:00:00.000Z", + "name": "Fiesta de Castilla y León", + "type": "public", + "rule": "04-23", + "_weekday": "Tue" + }, + { + "date": "2019-05-01 00:00:00", + "start": "2019-04-30T22:00:00.000Z", + "end": "2019-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Wed" + }, + { + "date": "2019-05-05 00:00:00", + "start": "2019-05-04T22:00:00.000Z", + "end": "2019-05-05T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2019-06-09 00:00:00", + "start": "2019-06-08T22:00:00.000Z", + "end": "2019-06-09T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2019-07-25 00:00:00", + "start": "2019-07-24T22:00:00.000Z", + "end": "2019-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Thu" + }, + { + "date": "2019-08-15 00:00:00", + "start": "2019-08-14T22:00:00.000Z", + "end": "2019-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Thu" + }, + { + "date": "2019-10-12 00:00:00", + "start": "2019-10-11T22:00:00.000Z", + "end": "2019-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Sat" + }, + { + "date": "2019-11-01 00:00:00", + "start": "2019-10-31T23:00:00.000Z", + "end": "2019-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Fri" + }, + { + "date": "2019-12-06 00:00:00", + "start": "2019-12-05T23:00:00.000Z", + "end": "2019-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Fri" + }, + { + "date": "2019-12-08 00:00:00", + "start": "2019-12-07T23:00:00.000Z", + "end": "2019-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Sun" + }, + { + "date": "2019-12-09 00:00:00", + "start": "2019-12-08T23:00:00.000Z", + "end": "2019-12-09T23:00:00.000Z", + "name": "La inmaculada concepción (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 12-08 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2019-12-25 00:00:00", + "start": "2019-12-24T23:00:00.000Z", + "end": "2019-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Wed" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-CL-2020.json b/test/fixtures/ES-CL-2020.json new file mode 100644 index 000000000..fed3cba7e --- /dev/null +++ b/test/fixtures/ES-CL-2020.json @@ -0,0 +1,176 @@ +[ + { + "date": "2020-01-01 00:00:00", + "start": "2019-12-31T23:00:00.000Z", + "end": "2020-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Wed" + }, + { + "date": "2020-01-06 00:00:00", + "start": "2020-01-05T23:00:00.000Z", + "end": "2020-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Mon" + }, + { + "date": "2020-03-19 00:00:00", + "start": "2020-03-18T23:00:00.000Z", + "end": "2020-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Thu" + }, + { + "date": "2020-04-09 00:00:00", + "start": "2020-04-08T22:00:00.000Z", + "end": "2020-04-09T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2020-04-10 00:00:00", + "start": "2020-04-09T22:00:00.000Z", + "end": "2020-04-10T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2020-04-12 00:00:00", + "start": "2020-04-11T22:00:00.000Z", + "end": "2020-04-12T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2020-04-23 00:00:00", + "start": "2020-04-22T22:00:00.000Z", + "end": "2020-04-23T22:00:00.000Z", + "name": "Fiesta de Castilla y León", + "type": "public", + "rule": "04-23", + "_weekday": "Thu" + }, + { + "date": "2020-05-01 00:00:00", + "start": "2020-04-30T22:00:00.000Z", + "end": "2020-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Fri" + }, + { + "date": "2020-05-03 00:00:00", + "start": "2020-05-02T22:00:00.000Z", + "end": "2020-05-03T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2020-05-31 00:00:00", + "start": "2020-05-30T22:00:00.000Z", + "end": "2020-05-31T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2020-07-25 00:00:00", + "start": "2020-07-24T22:00:00.000Z", + "end": "2020-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Sat" + }, + { + "date": "2020-08-15 00:00:00", + "start": "2020-08-14T22:00:00.000Z", + "end": "2020-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Sat" + }, + { + "date": "2020-10-12 00:00:00", + "start": "2020-10-11T22:00:00.000Z", + "end": "2020-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Mon" + }, + { + "date": "2020-11-01 00:00:00", + "start": "2020-10-31T23:00:00.000Z", + "end": "2020-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Sun" + }, + { + "date": "2020-11-02 00:00:00", + "start": "2020-11-01T23:00:00.000Z", + "end": "2020-11-02T23:00:00.000Z", + "name": "Todos los Santos (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 11-01 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2020-12-06 00:00:00", + "start": "2020-12-05T23:00:00.000Z", + "end": "2020-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Sun" + }, + { + "date": "2020-12-07 00:00:00", + "start": "2020-12-06T23:00:00.000Z", + "end": "2020-12-07T23:00:00.000Z", + "name": "Día de la Constitución Española (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 12-06 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2020-12-08 00:00:00", + "start": "2020-12-07T23:00:00.000Z", + "end": "2020-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Tue" + }, + { + "date": "2020-12-25 00:00:00", + "start": "2020-12-24T23:00:00.000Z", + "end": "2020-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Fri" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-CL-2021.json b/test/fixtures/ES-CL-2021.json new file mode 100644 index 000000000..337b666f1 --- /dev/null +++ b/test/fixtures/ES-CL-2021.json @@ -0,0 +1,166 @@ +[ + { + "date": "2021-01-01 00:00:00", + "start": "2020-12-31T23:00:00.000Z", + "end": "2021-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Fri" + }, + { + "date": "2021-01-06 00:00:00", + "start": "2021-01-05T23:00:00.000Z", + "end": "2021-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Wed" + }, + { + "date": "2021-03-19 00:00:00", + "start": "2021-03-18T23:00:00.000Z", + "end": "2021-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Fri" + }, + { + "date": "2021-04-01 00:00:00", + "start": "2021-03-31T22:00:00.000Z", + "end": "2021-04-01T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2021-04-02 00:00:00", + "start": "2021-04-01T22:00:00.000Z", + "end": "2021-04-02T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2021-04-04 00:00:00", + "start": "2021-04-03T22:00:00.000Z", + "end": "2021-04-04T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2021-04-23 00:00:00", + "start": "2021-04-22T22:00:00.000Z", + "end": "2021-04-23T22:00:00.000Z", + "name": "Fiesta de Castilla y León", + "type": "public", + "rule": "04-23", + "_weekday": "Fri" + }, + { + "date": "2021-05-01 00:00:00", + "start": "2021-04-30T22:00:00.000Z", + "end": "2021-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Sat" + }, + { + "date": "2021-05-02 00:00:00", + "start": "2021-05-01T22:00:00.000Z", + "end": "2021-05-02T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2021-05-23 00:00:00", + "start": "2021-05-22T22:00:00.000Z", + "end": "2021-05-23T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2021-07-25 00:00:00", + "start": "2021-07-24T22:00:00.000Z", + "end": "2021-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Sun" + }, + { + "date": "2021-08-15 00:00:00", + "start": "2021-08-14T22:00:00.000Z", + "end": "2021-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Sun" + }, + { + "date": "2021-08-16 00:00:00", + "start": "2021-08-15T22:00:00.000Z", + "end": "2021-08-16T22:00:00.000Z", + "name": "Asunción (día sustituto)", + "type": "public", + "substitute": true, + "rule": "substitutes 08-15 if Sunday then next Monday", + "_weekday": "Mon" + }, + { + "date": "2021-10-12 00:00:00", + "start": "2021-10-11T22:00:00.000Z", + "end": "2021-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Tue" + }, + { + "date": "2021-11-01 00:00:00", + "start": "2021-10-31T23:00:00.000Z", + "end": "2021-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Mon" + }, + { + "date": "2021-12-06 00:00:00", + "start": "2021-12-05T23:00:00.000Z", + "end": "2021-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Mon" + }, + { + "date": "2021-12-08 00:00:00", + "start": "2021-12-07T23:00:00.000Z", + "end": "2021-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Wed" + }, + { + "date": "2021-12-25 00:00:00", + "start": "2021-12-24T23:00:00.000Z", + "end": "2021-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Sat" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-CL-2022.json b/test/fixtures/ES-CL-2022.json new file mode 100644 index 000000000..466012f59 --- /dev/null +++ b/test/fixtures/ES-CL-2022.json @@ -0,0 +1,176 @@ +[ + { + "date": "2022-01-01 00:00:00", + "start": "2021-12-31T23:00:00.000Z", + "end": "2022-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Sat" + }, + { + "date": "2022-01-06 00:00:00", + "start": "2022-01-05T23:00:00.000Z", + "end": "2022-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Thu" + }, + { + "date": "2022-03-19 00:00:00", + "start": "2022-03-18T23:00:00.000Z", + "end": "2022-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Sat" + }, + { + "date": "2022-04-14 00:00:00", + "start": "2022-04-13T22:00:00.000Z", + "end": "2022-04-14T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2022-04-15 00:00:00", + "start": "2022-04-14T22:00:00.000Z", + "end": "2022-04-15T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2022-04-17 00:00:00", + "start": "2022-04-16T22:00:00.000Z", + "end": "2022-04-17T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2022-04-23 00:00:00", + "start": "2022-04-22T22:00:00.000Z", + "end": "2022-04-23T22:00:00.000Z", + "name": "Fiesta de Castilla y León", + "type": "public", + "rule": "04-23", + "_weekday": "Sat" + }, + { + "date": "2022-05-01 00:00:00", + "start": "2022-04-30T22:00:00.000Z", + "end": "2022-05-01T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2022-05-01 00:00:00", + "start": "2022-04-30T22:00:00.000Z", + "end": "2022-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Sun" + }, + { + "date": "2022-05-02 00:00:00", + "start": "2022-05-01T22:00:00.000Z", + "end": "2022-05-02T22:00:00.000Z", + "name": "Día del trabajador (día sustituto)", + "type": "public", + "substitute": true, + "rule": "substitutes 05-01 if Sunday then next Monday", + "_weekday": "Mon" + }, + { + "date": "2022-06-05 00:00:00", + "start": "2022-06-04T22:00:00.000Z", + "end": "2022-06-05T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2022-07-25 00:00:00", + "start": "2022-07-24T22:00:00.000Z", + "end": "2022-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Mon" + }, + { + "date": "2022-08-15 00:00:00", + "start": "2022-08-14T22:00:00.000Z", + "end": "2022-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Mon" + }, + { + "date": "2022-10-12 00:00:00", + "start": "2022-10-11T22:00:00.000Z", + "end": "2022-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Wed" + }, + { + "date": "2022-11-01 00:00:00", + "start": "2022-10-31T23:00:00.000Z", + "end": "2022-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Tue" + }, + { + "date": "2022-12-06 00:00:00", + "start": "2022-12-05T23:00:00.000Z", + "end": "2022-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Tue" + }, + { + "date": "2022-12-08 00:00:00", + "start": "2022-12-07T23:00:00.000Z", + "end": "2022-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Thu" + }, + { + "date": "2022-12-25 00:00:00", + "start": "2022-12-24T23:00:00.000Z", + "end": "2022-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Sun" + }, + { + "date": "2022-12-26 00:00:00", + "start": "2022-12-25T23:00:00.000Z", + "end": "2022-12-26T23:00:00.000Z", + "name": "Navidad (día sustituto)", + "type": "public", + "substitute": true, + "rule": "substitutes 12-25 if sunday then next monday", + "_weekday": "Mon" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-CL-2023.json b/test/fixtures/ES-CL-2023.json new file mode 100644 index 000000000..5a437619b --- /dev/null +++ b/test/fixtures/ES-CL-2023.json @@ -0,0 +1,176 @@ +[ + { + "date": "2023-01-01 00:00:00", + "start": "2022-12-31T23:00:00.000Z", + "end": "2023-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Sun" + }, + { + "date": "2023-01-02 00:00:00", + "start": "2023-01-01T23:00:00.000Z", + "end": "2023-01-02T23:00:00.000Z", + "name": "Año Nuevo (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 01-01 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2023-01-06 00:00:00", + "start": "2023-01-05T23:00:00.000Z", + "end": "2023-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Fri" + }, + { + "date": "2023-03-19 00:00:00", + "start": "2023-03-18T23:00:00.000Z", + "end": "2023-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Sun" + }, + { + "date": "2023-04-06 00:00:00", + "start": "2023-04-05T22:00:00.000Z", + "end": "2023-04-06T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2023-04-07 00:00:00", + "start": "2023-04-06T22:00:00.000Z", + "end": "2023-04-07T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2023-04-09 00:00:00", + "start": "2023-04-08T22:00:00.000Z", + "end": "2023-04-09T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2023-04-23 00:00:00", + "start": "2023-04-22T22:00:00.000Z", + "end": "2023-04-23T22:00:00.000Z", + "name": "Fiesta de Castilla y León", + "type": "public", + "rule": "04-23", + "_weekday": "Sun" + }, + { + "date": "2023-04-24 00:00:00", + "start": "2023-04-23T22:00:00.000Z", + "end": "2023-04-24T22:00:00.000Z", + "name": "Fiesta de Castilla y León", + "type": "public", + "substitute": true, + "rule": "substitutes 04-23 if Sunday then next Monday", + "_weekday": "Mon" + }, + { + "date": "2023-05-01 00:00:00", + "start": "2023-04-30T22:00:00.000Z", + "end": "2023-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Mon" + }, + { + "date": "2023-05-07 00:00:00", + "start": "2023-05-06T22:00:00.000Z", + "end": "2023-05-07T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2023-05-28 00:00:00", + "start": "2023-05-27T22:00:00.000Z", + "end": "2023-05-28T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2023-07-25 00:00:00", + "start": "2023-07-24T22:00:00.000Z", + "end": "2023-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Tue" + }, + { + "date": "2023-08-15 00:00:00", + "start": "2023-08-14T22:00:00.000Z", + "end": "2023-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Tue" + }, + { + "date": "2023-10-12 00:00:00", + "start": "2023-10-11T22:00:00.000Z", + "end": "2023-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Thu" + }, + { + "date": "2023-11-01 00:00:00", + "start": "2023-10-31T23:00:00.000Z", + "end": "2023-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Wed" + }, + { + "date": "2023-12-06 00:00:00", + "start": "2023-12-05T23:00:00.000Z", + "end": "2023-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Wed" + }, + { + "date": "2023-12-08 00:00:00", + "start": "2023-12-07T23:00:00.000Z", + "end": "2023-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Fri" + }, + { + "date": "2023-12-25 00:00:00", + "start": "2023-12-24T23:00:00.000Z", + "end": "2023-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Mon" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-CL-2024.json b/test/fixtures/ES-CL-2024.json new file mode 100644 index 000000000..60d303d52 --- /dev/null +++ b/test/fixtures/ES-CL-2024.json @@ -0,0 +1,166 @@ +[ + { + "date": "2024-01-01 00:00:00", + "start": "2023-12-31T23:00:00.000Z", + "end": "2024-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Mon" + }, + { + "date": "2024-01-06 00:00:00", + "start": "2024-01-05T23:00:00.000Z", + "end": "2024-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Sat" + }, + { + "date": "2024-03-19 00:00:00", + "start": "2024-03-18T23:00:00.000Z", + "end": "2024-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Tue" + }, + { + "date": "2024-03-28 00:00:00", + "start": "2024-03-27T23:00:00.000Z", + "end": "2024-03-28T23:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2024-03-29 00:00:00", + "start": "2024-03-28T23:00:00.000Z", + "end": "2024-03-29T23:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2024-03-31 00:00:00", + "start": "2024-03-30T23:00:00.000Z", + "end": "2024-03-31T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2024-04-23 00:00:00", + "start": "2024-04-22T22:00:00.000Z", + "end": "2024-04-23T22:00:00.000Z", + "name": "Fiesta de Castilla y León", + "type": "public", + "rule": "04-23", + "_weekday": "Tue" + }, + { + "date": "2024-05-01 00:00:00", + "start": "2024-04-30T22:00:00.000Z", + "end": "2024-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Wed" + }, + { + "date": "2024-05-05 00:00:00", + "start": "2024-05-04T22:00:00.000Z", + "end": "2024-05-05T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2024-05-19 00:00:00", + "start": "2024-05-18T22:00:00.000Z", + "end": "2024-05-19T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2024-07-25 00:00:00", + "start": "2024-07-24T22:00:00.000Z", + "end": "2024-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Thu" + }, + { + "date": "2024-08-15 00:00:00", + "start": "2024-08-14T22:00:00.000Z", + "end": "2024-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Thu" + }, + { + "date": "2024-10-12 00:00:00", + "start": "2024-10-11T22:00:00.000Z", + "end": "2024-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Sat" + }, + { + "date": "2024-11-01 00:00:00", + "start": "2024-10-31T23:00:00.000Z", + "end": "2024-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Fri" + }, + { + "date": "2024-12-06 00:00:00", + "start": "2024-12-05T23:00:00.000Z", + "end": "2024-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Fri" + }, + { + "date": "2024-12-08 00:00:00", + "start": "2024-12-07T23:00:00.000Z", + "end": "2024-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Sun" + }, + { + "date": "2024-12-09 00:00:00", + "start": "2024-12-08T23:00:00.000Z", + "end": "2024-12-09T23:00:00.000Z", + "name": "La inmaculada concepción (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 12-08 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2024-12-25 00:00:00", + "start": "2024-12-24T23:00:00.000Z", + "end": "2024-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Wed" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-CL-2025.json b/test/fixtures/ES-CL-2025.json new file mode 100644 index 000000000..0d7756ae2 --- /dev/null +++ b/test/fixtures/ES-CL-2025.json @@ -0,0 +1,166 @@ +[ + { + "date": "2025-01-01 00:00:00", + "start": "2024-12-31T23:00:00.000Z", + "end": "2025-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Wed" + }, + { + "date": "2025-01-06 00:00:00", + "start": "2025-01-05T23:00:00.000Z", + "end": "2025-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Mon" + }, + { + "date": "2025-03-19 00:00:00", + "start": "2025-03-18T23:00:00.000Z", + "end": "2025-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Wed" + }, + { + "date": "2025-04-17 00:00:00", + "start": "2025-04-16T22:00:00.000Z", + "end": "2025-04-17T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2025-04-18 00:00:00", + "start": "2025-04-17T22:00:00.000Z", + "end": "2025-04-18T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2025-04-20 00:00:00", + "start": "2025-04-19T22:00:00.000Z", + "end": "2025-04-20T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2025-04-23 00:00:00", + "start": "2025-04-22T22:00:00.000Z", + "end": "2025-04-23T22:00:00.000Z", + "name": "Fiesta de Castilla y León", + "type": "public", + "rule": "04-23", + "_weekday": "Wed" + }, + { + "date": "2025-05-01 00:00:00", + "start": "2025-04-30T22:00:00.000Z", + "end": "2025-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Thu" + }, + { + "date": "2025-05-04 00:00:00", + "start": "2025-05-03T22:00:00.000Z", + "end": "2025-05-04T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2025-06-08 00:00:00", + "start": "2025-06-07T22:00:00.000Z", + "end": "2025-06-08T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2025-07-25 00:00:00", + "start": "2025-07-24T22:00:00.000Z", + "end": "2025-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Fri" + }, + { + "date": "2025-08-15 00:00:00", + "start": "2025-08-14T22:00:00.000Z", + "end": "2025-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Fri" + }, + { + "date": "2025-10-12 00:00:00", + "start": "2025-10-11T22:00:00.000Z", + "end": "2025-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Sun" + }, + { + "date": "2025-10-13 00:00:00", + "start": "2025-10-12T22:00:00.000Z", + "end": "2025-10-13T22:00:00.000Z", + "name": "Fiesta Nacional de España (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 10-12 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2025-11-01 00:00:00", + "start": "2025-10-31T23:00:00.000Z", + "end": "2025-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Sat" + }, + { + "date": "2025-12-06 00:00:00", + "start": "2025-12-05T23:00:00.000Z", + "end": "2025-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Sat" + }, + { + "date": "2025-12-08 00:00:00", + "start": "2025-12-07T23:00:00.000Z", + "end": "2025-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Mon" + }, + { + "date": "2025-12-25 00:00:00", + "start": "2025-12-24T23:00:00.000Z", + "end": "2025-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Thu" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-CM-2015.json b/test/fixtures/ES-CM-2015.json new file mode 100644 index 000000000..9222df2d5 --- /dev/null +++ b/test/fixtures/ES-CM-2015.json @@ -0,0 +1,176 @@ +[ + { + "date": "2015-01-01 00:00:00", + "start": "2014-12-31T23:00:00.000Z", + "end": "2015-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Thu" + }, + { + "date": "2015-01-06 00:00:00", + "start": "2015-01-05T23:00:00.000Z", + "end": "2015-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Tue" + }, + { + "date": "2015-03-19 00:00:00", + "start": "2015-03-18T23:00:00.000Z", + "end": "2015-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Thu" + }, + { + "date": "2015-04-02 00:00:00", + "start": "2015-04-01T22:00:00.000Z", + "end": "2015-04-02T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2015-04-03 00:00:00", + "start": "2015-04-02T22:00:00.000Z", + "end": "2015-04-03T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2015-04-05 00:00:00", + "start": "2015-04-04T22:00:00.000Z", + "end": "2015-04-05T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2015-05-01 00:00:00", + "start": "2015-04-30T22:00:00.000Z", + "end": "2015-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Fri" + }, + { + "date": "2015-05-03 00:00:00", + "start": "2015-05-02T22:00:00.000Z", + "end": "2015-05-03T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2015-05-24 00:00:00", + "start": "2015-05-23T22:00:00.000Z", + "end": "2015-05-24T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2015-06-04 00:00:00", + "start": "2015-06-03T22:00:00.000Z", + "end": "2015-06-04T22:00:00.000Z", + "name": "Corpus Christi", + "type": "public", + "rule": "easter 60", + "_weekday": "Thu" + }, + { + "date": "2015-07-25 00:00:00", + "start": "2015-07-24T22:00:00.000Z", + "end": "2015-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Sat" + }, + { + "date": "2015-08-15 00:00:00", + "start": "2015-08-14T22:00:00.000Z", + "end": "2015-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Sat" + }, + { + "date": "2015-10-12 00:00:00", + "start": "2015-10-11T22:00:00.000Z", + "end": "2015-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Mon" + }, + { + "date": "2015-11-01 00:00:00", + "start": "2015-10-31T23:00:00.000Z", + "end": "2015-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Sun" + }, + { + "date": "2015-11-02 00:00:00", + "start": "2015-11-01T23:00:00.000Z", + "end": "2015-11-02T23:00:00.000Z", + "name": "Todos los Santos (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 11-01 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2015-12-06 00:00:00", + "start": "2015-12-05T23:00:00.000Z", + "end": "2015-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Sun" + }, + { + "date": "2015-12-07 00:00:00", + "start": "2015-12-06T23:00:00.000Z", + "end": "2015-12-07T23:00:00.000Z", + "name": "Día de la Constitución Española (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 12-06 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2015-12-08 00:00:00", + "start": "2015-12-07T23:00:00.000Z", + "end": "2015-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Tue" + }, + { + "date": "2015-12-25 00:00:00", + "start": "2015-12-24T23:00:00.000Z", + "end": "2015-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Fri" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-CM-2016.json b/test/fixtures/ES-CM-2016.json new file mode 100644 index 000000000..1fc569ab7 --- /dev/null +++ b/test/fixtures/ES-CM-2016.json @@ -0,0 +1,166 @@ +[ + { + "date": "2016-01-01 00:00:00", + "start": "2015-12-31T23:00:00.000Z", + "end": "2016-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Fri" + }, + { + "date": "2016-01-06 00:00:00", + "start": "2016-01-05T23:00:00.000Z", + "end": "2016-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Wed" + }, + { + "date": "2016-03-19 00:00:00", + "start": "2016-03-18T23:00:00.000Z", + "end": "2016-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Sat" + }, + { + "date": "2016-03-24 00:00:00", + "start": "2016-03-23T23:00:00.000Z", + "end": "2016-03-24T23:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2016-03-25 00:00:00", + "start": "2016-03-24T23:00:00.000Z", + "end": "2016-03-25T23:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2016-03-27 00:00:00", + "start": "2016-03-26T23:00:00.000Z", + "end": "2016-03-27T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2016-05-01 00:00:00", + "start": "2016-04-30T22:00:00.000Z", + "end": "2016-05-01T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2016-05-01 00:00:00", + "start": "2016-04-30T22:00:00.000Z", + "end": "2016-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Sun" + }, + { + "date": "2016-05-15 00:00:00", + "start": "2016-05-14T22:00:00.000Z", + "end": "2016-05-15T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2016-05-26 00:00:00", + "start": "2016-05-25T22:00:00.000Z", + "end": "2016-05-26T22:00:00.000Z", + "name": "Corpus Christi", + "type": "public", + "rule": "easter 60", + "_weekday": "Thu" + }, + { + "date": "2016-07-25 00:00:00", + "start": "2016-07-24T22:00:00.000Z", + "end": "2016-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Mon" + }, + { + "date": "2016-08-15 00:00:00", + "start": "2016-08-14T22:00:00.000Z", + "end": "2016-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Mon" + }, + { + "date": "2016-10-12 00:00:00", + "start": "2016-10-11T22:00:00.000Z", + "end": "2016-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Wed" + }, + { + "date": "2016-11-01 00:00:00", + "start": "2016-10-31T23:00:00.000Z", + "end": "2016-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Tue" + }, + { + "date": "2016-12-06 00:00:00", + "start": "2016-12-05T23:00:00.000Z", + "end": "2016-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Tue" + }, + { + "date": "2016-12-08 00:00:00", + "start": "2016-12-07T23:00:00.000Z", + "end": "2016-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Thu" + }, + { + "date": "2016-12-25 00:00:00", + "start": "2016-12-24T23:00:00.000Z", + "end": "2016-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Sun" + }, + { + "date": "2016-12-26 00:00:00", + "start": "2016-12-25T23:00:00.000Z", + "end": "2016-12-26T23:00:00.000Z", + "name": "Navidad (día sustituto)", + "type": "public", + "substitute": true, + "rule": "substitutes 12-25 if sunday then next monday", + "_weekday": "Mon" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-CM-2017.json b/test/fixtures/ES-CM-2017.json new file mode 100644 index 000000000..ba3ba8bf9 --- /dev/null +++ b/test/fixtures/ES-CM-2017.json @@ -0,0 +1,166 @@ +[ + { + "date": "2017-01-01 00:00:00", + "start": "2016-12-31T23:00:00.000Z", + "end": "2017-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Sun" + }, + { + "date": "2017-01-02 00:00:00", + "start": "2017-01-01T23:00:00.000Z", + "end": "2017-01-02T23:00:00.000Z", + "name": "Año Nuevo (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 01-01 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2017-01-06 00:00:00", + "start": "2017-01-05T23:00:00.000Z", + "end": "2017-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Fri" + }, + { + "date": "2017-03-19 00:00:00", + "start": "2017-03-18T23:00:00.000Z", + "end": "2017-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Sun" + }, + { + "date": "2017-04-13 00:00:00", + "start": "2017-04-12T22:00:00.000Z", + "end": "2017-04-13T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2017-04-14 00:00:00", + "start": "2017-04-13T22:00:00.000Z", + "end": "2017-04-14T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2017-04-16 00:00:00", + "start": "2017-04-15T22:00:00.000Z", + "end": "2017-04-16T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2017-05-01 00:00:00", + "start": "2017-04-30T22:00:00.000Z", + "end": "2017-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Mon" + }, + { + "date": "2017-05-07 00:00:00", + "start": "2017-05-06T22:00:00.000Z", + "end": "2017-05-07T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2017-06-04 00:00:00", + "start": "2017-06-03T22:00:00.000Z", + "end": "2017-06-04T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2017-06-15 00:00:00", + "start": "2017-06-14T22:00:00.000Z", + "end": "2017-06-15T22:00:00.000Z", + "name": "Corpus Christi", + "type": "public", + "rule": "easter 60", + "_weekday": "Thu" + }, + { + "date": "2017-07-25 00:00:00", + "start": "2017-07-24T22:00:00.000Z", + "end": "2017-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Tue" + }, + { + "date": "2017-08-15 00:00:00", + "start": "2017-08-14T22:00:00.000Z", + "end": "2017-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Tue" + }, + { + "date": "2017-10-12 00:00:00", + "start": "2017-10-11T22:00:00.000Z", + "end": "2017-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Thu" + }, + { + "date": "2017-11-01 00:00:00", + "start": "2017-10-31T23:00:00.000Z", + "end": "2017-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Wed" + }, + { + "date": "2017-12-06 00:00:00", + "start": "2017-12-05T23:00:00.000Z", + "end": "2017-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Wed" + }, + { + "date": "2017-12-08 00:00:00", + "start": "2017-12-07T23:00:00.000Z", + "end": "2017-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Fri" + }, + { + "date": "2017-12-25 00:00:00", + "start": "2017-12-24T23:00:00.000Z", + "end": "2017-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Mon" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-CM-2018.json b/test/fixtures/ES-CM-2018.json new file mode 100644 index 000000000..cff15b28d --- /dev/null +++ b/test/fixtures/ES-CM-2018.json @@ -0,0 +1,156 @@ +[ + { + "date": "2018-01-01 00:00:00", + "start": "2017-12-31T23:00:00.000Z", + "end": "2018-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Mon" + }, + { + "date": "2018-01-06 00:00:00", + "start": "2018-01-05T23:00:00.000Z", + "end": "2018-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Sat" + }, + { + "date": "2018-03-19 00:00:00", + "start": "2018-03-18T23:00:00.000Z", + "end": "2018-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Mon" + }, + { + "date": "2018-03-29 00:00:00", + "start": "2018-03-28T22:00:00.000Z", + "end": "2018-03-29T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2018-03-30 00:00:00", + "start": "2018-03-29T22:00:00.000Z", + "end": "2018-03-30T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2018-04-01 00:00:00", + "start": "2018-03-31T22:00:00.000Z", + "end": "2018-04-01T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2018-05-01 00:00:00", + "start": "2018-04-30T22:00:00.000Z", + "end": "2018-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Tue" + }, + { + "date": "2018-05-06 00:00:00", + "start": "2018-05-05T22:00:00.000Z", + "end": "2018-05-06T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2018-05-20 00:00:00", + "start": "2018-05-19T22:00:00.000Z", + "end": "2018-05-20T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2018-05-31 00:00:00", + "start": "2018-05-30T22:00:00.000Z", + "end": "2018-05-31T22:00:00.000Z", + "name": "Corpus Christi", + "type": "public", + "rule": "easter 60", + "_weekday": "Thu" + }, + { + "date": "2018-07-25 00:00:00", + "start": "2018-07-24T22:00:00.000Z", + "end": "2018-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Wed" + }, + { + "date": "2018-08-15 00:00:00", + "start": "2018-08-14T22:00:00.000Z", + "end": "2018-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Wed" + }, + { + "date": "2018-10-12 00:00:00", + "start": "2018-10-11T22:00:00.000Z", + "end": "2018-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Fri" + }, + { + "date": "2018-11-01 00:00:00", + "start": "2018-10-31T23:00:00.000Z", + "end": "2018-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Thu" + }, + { + "date": "2018-12-06 00:00:00", + "start": "2018-12-05T23:00:00.000Z", + "end": "2018-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Thu" + }, + { + "date": "2018-12-08 00:00:00", + "start": "2018-12-07T23:00:00.000Z", + "end": "2018-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Sat" + }, + { + "date": "2018-12-25 00:00:00", + "start": "2018-12-24T23:00:00.000Z", + "end": "2018-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Tue" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-CM-2019.json b/test/fixtures/ES-CM-2019.json new file mode 100644 index 000000000..039961105 --- /dev/null +++ b/test/fixtures/ES-CM-2019.json @@ -0,0 +1,176 @@ +[ + { + "date": "2019-01-01 00:00:00", + "start": "2018-12-31T23:00:00.000Z", + "end": "2019-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Tue" + }, + { + "date": "2019-01-06 00:00:00", + "start": "2019-01-05T23:00:00.000Z", + "end": "2019-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Sun" + }, + { + "date": "2019-01-07 00:00:00", + "start": "2019-01-06T23:00:00.000Z", + "end": "2019-01-07T23:00:00.000Z", + "name": "Día de los Reyes Magos (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 01-06 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2019-03-19 00:00:00", + "start": "2019-03-18T23:00:00.000Z", + "end": "2019-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Tue" + }, + { + "date": "2019-04-18 00:00:00", + "start": "2019-04-17T22:00:00.000Z", + "end": "2019-04-18T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2019-04-19 00:00:00", + "start": "2019-04-18T22:00:00.000Z", + "end": "2019-04-19T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2019-04-21 00:00:00", + "start": "2019-04-20T22:00:00.000Z", + "end": "2019-04-21T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2019-05-01 00:00:00", + "start": "2019-04-30T22:00:00.000Z", + "end": "2019-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Wed" + }, + { + "date": "2019-05-05 00:00:00", + "start": "2019-05-04T22:00:00.000Z", + "end": "2019-05-05T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2019-06-09 00:00:00", + "start": "2019-06-08T22:00:00.000Z", + "end": "2019-06-09T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2019-06-20 00:00:00", + "start": "2019-06-19T22:00:00.000Z", + "end": "2019-06-20T22:00:00.000Z", + "name": "Corpus Christi", + "type": "public", + "rule": "easter 60", + "_weekday": "Thu" + }, + { + "date": "2019-07-25 00:00:00", + "start": "2019-07-24T22:00:00.000Z", + "end": "2019-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Thu" + }, + { + "date": "2019-08-15 00:00:00", + "start": "2019-08-14T22:00:00.000Z", + "end": "2019-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Thu" + }, + { + "date": "2019-10-12 00:00:00", + "start": "2019-10-11T22:00:00.000Z", + "end": "2019-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Sat" + }, + { + "date": "2019-11-01 00:00:00", + "start": "2019-10-31T23:00:00.000Z", + "end": "2019-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Fri" + }, + { + "date": "2019-12-06 00:00:00", + "start": "2019-12-05T23:00:00.000Z", + "end": "2019-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Fri" + }, + { + "date": "2019-12-08 00:00:00", + "start": "2019-12-07T23:00:00.000Z", + "end": "2019-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Sun" + }, + { + "date": "2019-12-09 00:00:00", + "start": "2019-12-08T23:00:00.000Z", + "end": "2019-12-09T23:00:00.000Z", + "name": "La inmaculada concepción (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 12-08 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2019-12-25 00:00:00", + "start": "2019-12-24T23:00:00.000Z", + "end": "2019-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Wed" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-CM-2020.json b/test/fixtures/ES-CM-2020.json new file mode 100644 index 000000000..bece7243c --- /dev/null +++ b/test/fixtures/ES-CM-2020.json @@ -0,0 +1,195 @@ +[ + { + "date": "2020-01-01 00:00:00", + "start": "2019-12-31T23:00:00.000Z", + "end": "2020-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Wed" + }, + { + "date": "2020-01-06 00:00:00", + "start": "2020-01-05T23:00:00.000Z", + "end": "2020-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Mon" + }, + { + "date": "2020-03-19 00:00:00", + "start": "2020-03-18T23:00:00.000Z", + "end": "2020-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Thu" + }, + { + "date": "2020-04-09 00:00:00", + "start": "2020-04-08T22:00:00.000Z", + "end": "2020-04-09T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2020-04-10 00:00:00", + "start": "2020-04-09T22:00:00.000Z", + "end": "2020-04-10T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2020-04-12 00:00:00", + "start": "2020-04-11T22:00:00.000Z", + "end": "2020-04-12T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2020-05-01 00:00:00", + "start": "2020-04-30T22:00:00.000Z", + "end": "2020-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Fri" + }, + { + "date": "2020-05-03 00:00:00", + "start": "2020-05-02T22:00:00.000Z", + "end": "2020-05-03T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2020-05-31 00:00:00", + "start": "2020-05-30T22:00:00.000Z", + "end": "2020-05-31T22:00:00.000Z", + "name": "Día de Castilla-La Mancha", + "type": "public", + "rule": "05-31 since 2020", + "_weekday": "Sun" + }, + { + "date": "2020-05-31 00:00:00", + "start": "2020-05-30T22:00:00.000Z", + "end": "2020-05-31T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2020-06-01 00:00:00", + "start": "2020-05-31T22:00:00.000Z", + "end": "2020-06-01T22:00:00.000Z", + "name": "Día de Castilla-La Mancha", + "type": "public", + "substitute": true, + "rule": "substitutes 05-31 if Sunday then next Monday since 2020", + "_weekday": "Mon" + }, + { + "date": "2020-06-11 00:00:00", + "start": "2020-06-10T22:00:00.000Z", + "end": "2020-06-11T22:00:00.000Z", + "name": "Corpus Christi", + "type": "public", + "rule": "easter 60", + "_weekday": "Thu" + }, + { + "date": "2020-07-25 00:00:00", + "start": "2020-07-24T22:00:00.000Z", + "end": "2020-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Sat" + }, + { + "date": "2020-08-15 00:00:00", + "start": "2020-08-14T22:00:00.000Z", + "end": "2020-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Sat" + }, + { + "date": "2020-10-12 00:00:00", + "start": "2020-10-11T22:00:00.000Z", + "end": "2020-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Mon" + }, + { + "date": "2020-11-01 00:00:00", + "start": "2020-10-31T23:00:00.000Z", + "end": "2020-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Sun" + }, + { + "date": "2020-11-02 00:00:00", + "start": "2020-11-01T23:00:00.000Z", + "end": "2020-11-02T23:00:00.000Z", + "name": "Todos los Santos (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 11-01 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2020-12-06 00:00:00", + "start": "2020-12-05T23:00:00.000Z", + "end": "2020-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Sun" + }, + { + "date": "2020-12-07 00:00:00", + "start": "2020-12-06T23:00:00.000Z", + "end": "2020-12-07T23:00:00.000Z", + "name": "Día de la Constitución Española (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 12-06 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2020-12-08 00:00:00", + "start": "2020-12-07T23:00:00.000Z", + "end": "2020-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Tue" + }, + { + "date": "2020-12-25 00:00:00", + "start": "2020-12-24T23:00:00.000Z", + "end": "2020-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Fri" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-CM-2021.json b/test/fixtures/ES-CM-2021.json new file mode 100644 index 000000000..058c5f4f7 --- /dev/null +++ b/test/fixtures/ES-CM-2021.json @@ -0,0 +1,165 @@ +[ + { + "date": "2021-01-01 00:00:00", + "start": "2020-12-31T23:00:00.000Z", + "end": "2021-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Fri" + }, + { + "date": "2021-01-06 00:00:00", + "start": "2021-01-05T23:00:00.000Z", + "end": "2021-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Wed" + }, + { + "date": "2021-03-19 00:00:00", + "start": "2021-03-18T23:00:00.000Z", + "end": "2021-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Fri" + }, + { + "date": "2021-04-01 00:00:00", + "start": "2021-03-31T22:00:00.000Z", + "end": "2021-04-01T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2021-04-02 00:00:00", + "start": "2021-04-01T22:00:00.000Z", + "end": "2021-04-02T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2021-04-04 00:00:00", + "start": "2021-04-03T22:00:00.000Z", + "end": "2021-04-04T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2021-05-01 00:00:00", + "start": "2021-04-30T22:00:00.000Z", + "end": "2021-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Sat" + }, + { + "date": "2021-05-02 00:00:00", + "start": "2021-05-01T22:00:00.000Z", + "end": "2021-05-02T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2021-05-23 00:00:00", + "start": "2021-05-22T22:00:00.000Z", + "end": "2021-05-23T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2021-05-31 00:00:00", + "start": "2021-05-30T22:00:00.000Z", + "end": "2021-05-31T22:00:00.000Z", + "name": "Día de Castilla-La Mancha", + "type": "public", + "rule": "05-31 since 2020", + "_weekday": "Mon" + }, + { + "date": "2021-06-03 00:00:00", + "start": "2021-06-02T22:00:00.000Z", + "end": "2021-06-03T22:00:00.000Z", + "name": "Corpus Christi", + "type": "public", + "rule": "easter 60", + "_weekday": "Thu" + }, + { + "date": "2021-07-25 00:00:00", + "start": "2021-07-24T22:00:00.000Z", + "end": "2021-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Sun" + }, + { + "date": "2021-08-15 00:00:00", + "start": "2021-08-14T22:00:00.000Z", + "end": "2021-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Sun" + }, + { + "date": "2021-10-12 00:00:00", + "start": "2021-10-11T22:00:00.000Z", + "end": "2021-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Tue" + }, + { + "date": "2021-11-01 00:00:00", + "start": "2021-10-31T23:00:00.000Z", + "end": "2021-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Mon" + }, + { + "date": "2021-12-06 00:00:00", + "start": "2021-12-05T23:00:00.000Z", + "end": "2021-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Mon" + }, + { + "date": "2021-12-08 00:00:00", + "start": "2021-12-07T23:00:00.000Z", + "end": "2021-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Wed" + }, + { + "date": "2021-12-25 00:00:00", + "start": "2021-12-24T23:00:00.000Z", + "end": "2021-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Sat" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-CM-2022.json b/test/fixtures/ES-CM-2022.json new file mode 100644 index 000000000..76fdef17b --- /dev/null +++ b/test/fixtures/ES-CM-2022.json @@ -0,0 +1,175 @@ +[ + { + "date": "2022-01-01 00:00:00", + "start": "2021-12-31T23:00:00.000Z", + "end": "2022-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Sat" + }, + { + "date": "2022-01-06 00:00:00", + "start": "2022-01-05T23:00:00.000Z", + "end": "2022-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Thu" + }, + { + "date": "2022-03-19 00:00:00", + "start": "2022-03-18T23:00:00.000Z", + "end": "2022-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Sat" + }, + { + "date": "2022-04-14 00:00:00", + "start": "2022-04-13T22:00:00.000Z", + "end": "2022-04-14T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2022-04-15 00:00:00", + "start": "2022-04-14T22:00:00.000Z", + "end": "2022-04-15T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2022-04-17 00:00:00", + "start": "2022-04-16T22:00:00.000Z", + "end": "2022-04-17T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2022-05-01 00:00:00", + "start": "2022-04-30T22:00:00.000Z", + "end": "2022-05-01T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2022-05-01 00:00:00", + "start": "2022-04-30T22:00:00.000Z", + "end": "2022-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Sun" + }, + { + "date": "2022-05-31 00:00:00", + "start": "2022-05-30T22:00:00.000Z", + "end": "2022-05-31T22:00:00.000Z", + "name": "Día de Castilla-La Mancha", + "type": "public", + "rule": "05-31 since 2020", + "_weekday": "Tue" + }, + { + "date": "2022-06-05 00:00:00", + "start": "2022-06-04T22:00:00.000Z", + "end": "2022-06-05T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2022-06-16 00:00:00", + "start": "2022-06-15T22:00:00.000Z", + "end": "2022-06-16T22:00:00.000Z", + "name": "Corpus Christi", + "type": "public", + "rule": "easter 60", + "_weekday": "Thu" + }, + { + "date": "2022-07-25 00:00:00", + "start": "2022-07-24T22:00:00.000Z", + "end": "2022-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Mon" + }, + { + "date": "2022-08-15 00:00:00", + "start": "2022-08-14T22:00:00.000Z", + "end": "2022-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Mon" + }, + { + "date": "2022-10-12 00:00:00", + "start": "2022-10-11T22:00:00.000Z", + "end": "2022-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Wed" + }, + { + "date": "2022-11-01 00:00:00", + "start": "2022-10-31T23:00:00.000Z", + "end": "2022-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Tue" + }, + { + "date": "2022-12-06 00:00:00", + "start": "2022-12-05T23:00:00.000Z", + "end": "2022-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Tue" + }, + { + "date": "2022-12-08 00:00:00", + "start": "2022-12-07T23:00:00.000Z", + "end": "2022-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Thu" + }, + { + "date": "2022-12-25 00:00:00", + "start": "2022-12-24T23:00:00.000Z", + "end": "2022-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Sun" + }, + { + "date": "2022-12-26 00:00:00", + "start": "2022-12-25T23:00:00.000Z", + "end": "2022-12-26T23:00:00.000Z", + "name": "Navidad (día sustituto)", + "type": "public", + "substitute": true, + "rule": "substitutes 12-25 if sunday then next monday", + "_weekday": "Mon" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-CM-2023.json b/test/fixtures/ES-CM-2023.json new file mode 100644 index 000000000..2e95b3ab9 --- /dev/null +++ b/test/fixtures/ES-CM-2023.json @@ -0,0 +1,175 @@ +[ + { + "date": "2023-01-01 00:00:00", + "start": "2022-12-31T23:00:00.000Z", + "end": "2023-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Sun" + }, + { + "date": "2023-01-02 00:00:00", + "start": "2023-01-01T23:00:00.000Z", + "end": "2023-01-02T23:00:00.000Z", + "name": "Año Nuevo (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 01-01 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2023-01-06 00:00:00", + "start": "2023-01-05T23:00:00.000Z", + "end": "2023-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Fri" + }, + { + "date": "2023-03-19 00:00:00", + "start": "2023-03-18T23:00:00.000Z", + "end": "2023-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Sun" + }, + { + "date": "2023-04-06 00:00:00", + "start": "2023-04-05T22:00:00.000Z", + "end": "2023-04-06T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2023-04-07 00:00:00", + "start": "2023-04-06T22:00:00.000Z", + "end": "2023-04-07T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2023-04-09 00:00:00", + "start": "2023-04-08T22:00:00.000Z", + "end": "2023-04-09T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2023-05-01 00:00:00", + "start": "2023-04-30T22:00:00.000Z", + "end": "2023-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Mon" + }, + { + "date": "2023-05-07 00:00:00", + "start": "2023-05-06T22:00:00.000Z", + "end": "2023-05-07T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2023-05-28 00:00:00", + "start": "2023-05-27T22:00:00.000Z", + "end": "2023-05-28T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2023-05-31 00:00:00", + "start": "2023-05-30T22:00:00.000Z", + "end": "2023-05-31T22:00:00.000Z", + "name": "Día de Castilla-La Mancha", + "type": "public", + "rule": "05-31 since 2020", + "_weekday": "Wed" + }, + { + "date": "2023-06-08 00:00:00", + "start": "2023-06-07T22:00:00.000Z", + "end": "2023-06-08T22:00:00.000Z", + "name": "Corpus Christi", + "type": "public", + "rule": "easter 60", + "_weekday": "Thu" + }, + { + "date": "2023-07-25 00:00:00", + "start": "2023-07-24T22:00:00.000Z", + "end": "2023-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Tue" + }, + { + "date": "2023-08-15 00:00:00", + "start": "2023-08-14T22:00:00.000Z", + "end": "2023-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Tue" + }, + { + "date": "2023-10-12 00:00:00", + "start": "2023-10-11T22:00:00.000Z", + "end": "2023-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Thu" + }, + { + "date": "2023-11-01 00:00:00", + "start": "2023-10-31T23:00:00.000Z", + "end": "2023-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Wed" + }, + { + "date": "2023-12-06 00:00:00", + "start": "2023-12-05T23:00:00.000Z", + "end": "2023-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Wed" + }, + { + "date": "2023-12-08 00:00:00", + "start": "2023-12-07T23:00:00.000Z", + "end": "2023-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Fri" + }, + { + "date": "2023-12-25 00:00:00", + "start": "2023-12-24T23:00:00.000Z", + "end": "2023-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Mon" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-CM-2024.json b/test/fixtures/ES-CM-2024.json new file mode 100644 index 000000000..bdcf231c5 --- /dev/null +++ b/test/fixtures/ES-CM-2024.json @@ -0,0 +1,175 @@ +[ + { + "date": "2024-01-01 00:00:00", + "start": "2023-12-31T23:00:00.000Z", + "end": "2024-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Mon" + }, + { + "date": "2024-01-06 00:00:00", + "start": "2024-01-05T23:00:00.000Z", + "end": "2024-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Sat" + }, + { + "date": "2024-03-19 00:00:00", + "start": "2024-03-18T23:00:00.000Z", + "end": "2024-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Tue" + }, + { + "date": "2024-03-28 00:00:00", + "start": "2024-03-27T23:00:00.000Z", + "end": "2024-03-28T23:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2024-03-29 00:00:00", + "start": "2024-03-28T23:00:00.000Z", + "end": "2024-03-29T23:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2024-03-31 00:00:00", + "start": "2024-03-30T23:00:00.000Z", + "end": "2024-03-31T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2024-05-01 00:00:00", + "start": "2024-04-30T22:00:00.000Z", + "end": "2024-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Wed" + }, + { + "date": "2024-05-05 00:00:00", + "start": "2024-05-04T22:00:00.000Z", + "end": "2024-05-05T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2024-05-19 00:00:00", + "start": "2024-05-18T22:00:00.000Z", + "end": "2024-05-19T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2024-05-30 00:00:00", + "start": "2024-05-29T22:00:00.000Z", + "end": "2024-05-30T22:00:00.000Z", + "name": "Corpus Christi", + "type": "public", + "rule": "easter 60", + "_weekday": "Thu" + }, + { + "date": "2024-05-31 00:00:00", + "start": "2024-05-30T22:00:00.000Z", + "end": "2024-05-31T22:00:00.000Z", + "name": "Día de Castilla-La Mancha", + "type": "public", + "rule": "05-31 since 2020", + "_weekday": "Fri" + }, + { + "date": "2024-07-25 00:00:00", + "start": "2024-07-24T22:00:00.000Z", + "end": "2024-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Thu" + }, + { + "date": "2024-08-15 00:00:00", + "start": "2024-08-14T22:00:00.000Z", + "end": "2024-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Thu" + }, + { + "date": "2024-10-12 00:00:00", + "start": "2024-10-11T22:00:00.000Z", + "end": "2024-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Sat" + }, + { + "date": "2024-11-01 00:00:00", + "start": "2024-10-31T23:00:00.000Z", + "end": "2024-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Fri" + }, + { + "date": "2024-12-06 00:00:00", + "start": "2024-12-05T23:00:00.000Z", + "end": "2024-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Fri" + }, + { + "date": "2024-12-08 00:00:00", + "start": "2024-12-07T23:00:00.000Z", + "end": "2024-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Sun" + }, + { + "date": "2024-12-09 00:00:00", + "start": "2024-12-08T23:00:00.000Z", + "end": "2024-12-09T23:00:00.000Z", + "name": "La inmaculada concepción (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 12-08 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2024-12-25 00:00:00", + "start": "2024-12-24T23:00:00.000Z", + "end": "2024-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Wed" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-CM-2025.json b/test/fixtures/ES-CM-2025.json new file mode 100644 index 000000000..09ea99ce8 --- /dev/null +++ b/test/fixtures/ES-CM-2025.json @@ -0,0 +1,175 @@ +[ + { + "date": "2025-01-01 00:00:00", + "start": "2024-12-31T23:00:00.000Z", + "end": "2025-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Wed" + }, + { + "date": "2025-01-06 00:00:00", + "start": "2025-01-05T23:00:00.000Z", + "end": "2025-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Mon" + }, + { + "date": "2025-03-19 00:00:00", + "start": "2025-03-18T23:00:00.000Z", + "end": "2025-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Wed" + }, + { + "date": "2025-04-17 00:00:00", + "start": "2025-04-16T22:00:00.000Z", + "end": "2025-04-17T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2025-04-18 00:00:00", + "start": "2025-04-17T22:00:00.000Z", + "end": "2025-04-18T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2025-04-20 00:00:00", + "start": "2025-04-19T22:00:00.000Z", + "end": "2025-04-20T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2025-05-01 00:00:00", + "start": "2025-04-30T22:00:00.000Z", + "end": "2025-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Thu" + }, + { + "date": "2025-05-04 00:00:00", + "start": "2025-05-03T22:00:00.000Z", + "end": "2025-05-04T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2025-05-31 00:00:00", + "start": "2025-05-30T22:00:00.000Z", + "end": "2025-05-31T22:00:00.000Z", + "name": "Día de Castilla-La Mancha", + "type": "public", + "rule": "05-31 since 2020", + "_weekday": "Sat" + }, + { + "date": "2025-06-08 00:00:00", + "start": "2025-06-07T22:00:00.000Z", + "end": "2025-06-08T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2025-06-19 00:00:00", + "start": "2025-06-18T22:00:00.000Z", + "end": "2025-06-19T22:00:00.000Z", + "name": "Corpus Christi", + "type": "public", + "rule": "easter 60", + "_weekday": "Thu" + }, + { + "date": "2025-07-25 00:00:00", + "start": "2025-07-24T22:00:00.000Z", + "end": "2025-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Fri" + }, + { + "date": "2025-08-15 00:00:00", + "start": "2025-08-14T22:00:00.000Z", + "end": "2025-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Fri" + }, + { + "date": "2025-10-12 00:00:00", + "start": "2025-10-11T22:00:00.000Z", + "end": "2025-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Sun" + }, + { + "date": "2025-10-13 00:00:00", + "start": "2025-10-12T22:00:00.000Z", + "end": "2025-10-13T22:00:00.000Z", + "name": "Fiesta Nacional de España (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 10-12 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2025-11-01 00:00:00", + "start": "2025-10-31T23:00:00.000Z", + "end": "2025-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Sat" + }, + { + "date": "2025-12-06 00:00:00", + "start": "2025-12-05T23:00:00.000Z", + "end": "2025-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Sat" + }, + { + "date": "2025-12-08 00:00:00", + "start": "2025-12-07T23:00:00.000Z", + "end": "2025-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Mon" + }, + { + "date": "2025-12-25 00:00:00", + "start": "2025-12-24T23:00:00.000Z", + "end": "2025-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Thu" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-CN-2015.json b/test/fixtures/ES-CN-2015.json index 161e507ec..66017dd90 100644 --- a/test/fixtures/ES-CN-2015.json +++ b/test/fixtures/ES-CN-2015.json @@ -31,7 +31,7 @@ "start": "2015-04-01T23:00:00.000Z", "end": "2015-04-02T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-CN-2016.json b/test/fixtures/ES-CN-2016.json index 03c987db5..2eba2d1da 100644 --- a/test/fixtures/ES-CN-2016.json +++ b/test/fixtures/ES-CN-2016.json @@ -31,7 +31,7 @@ "start": "2016-03-24T00:00:00.000Z", "end": "2016-03-25T00:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, @@ -71,16 +71,6 @@ "rule": "05-01", "_weekday": "Sun" }, - { - "date": "2016-05-02 00:00:00", - "start": "2016-05-01T23:00:00.000Z", - "end": "2016-05-02T23:00:00.000Z", - "name": "Día del trabajador (día sustituto)", - "type": "observance", - "substitute": true, - "rule": "substitutes 05-01 if sunday then next monday", - "_weekday": "Mon" - }, { "date": "2016-05-15 00:00:00", "start": "2016-05-14T23:00:00.000Z", @@ -168,7 +158,7 @@ "start": "2016-12-26T00:00:00.000Z", "end": "2016-12-27T00:00:00.000Z", "name": "Navidad (día sustituto)", - "type": "observance", + "type": "public", "substitute": true, "rule": "substitutes 12-25 if sunday then next monday", "_weekday": "Mon" diff --git a/test/fixtures/ES-CN-2017.json b/test/fixtures/ES-CN-2017.json index 2d434cebf..5ea6980be 100644 --- a/test/fixtures/ES-CN-2017.json +++ b/test/fixtures/ES-CN-2017.json @@ -41,7 +41,7 @@ "start": "2017-04-12T23:00:00.000Z", "end": "2017-04-13T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-CN-2018.json b/test/fixtures/ES-CN-2018.json index 3710e826c..640eca52f 100644 --- a/test/fixtures/ES-CN-2018.json +++ b/test/fixtures/ES-CN-2018.json @@ -31,7 +31,7 @@ "start": "2018-03-28T23:00:00.000Z", "end": "2018-03-29T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-CN-2019.json b/test/fixtures/ES-CN-2019.json index dc5d5510f..46fb1ad00 100644 --- a/test/fixtures/ES-CN-2019.json +++ b/test/fixtures/ES-CN-2019.json @@ -41,7 +41,7 @@ "start": "2019-04-17T23:00:00.000Z", "end": "2019-04-18T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-CN-2020.json b/test/fixtures/ES-CN-2020.json index b4d225432..b504f1b60 100644 --- a/test/fixtures/ES-CN-2020.json +++ b/test/fixtures/ES-CN-2020.json @@ -31,7 +31,7 @@ "start": "2020-04-08T23:00:00.000Z", "end": "2020-04-09T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-CN-2021.json b/test/fixtures/ES-CN-2021.json index 3e9fc422c..c4d555296 100644 --- a/test/fixtures/ES-CN-2021.json +++ b/test/fixtures/ES-CN-2021.json @@ -31,7 +31,7 @@ "start": "2021-03-31T23:00:00.000Z", "end": "2021-04-01T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, @@ -89,6 +89,16 @@ "rule": "05-30", "_weekday": "Sun" }, + { + "date": "2021-05-31 00:00:00", + "start": "2021-05-30T23:00:00.000Z", + "end": "2021-05-31T23:00:00.000Z", + "name": "Día de Canarias (día sustituto)", + "type": "public", + "substitute": true, + "rule": "substitutes 05-30 if Sunday then next Monday", + "_weekday": "Mon" + }, { "date": "2021-07-25 00:00:00", "start": "2021-07-24T23:00:00.000Z", @@ -113,9 +123,9 @@ "start": "2021-08-15T23:00:00.000Z", "end": "2021-08-16T23:00:00.000Z", "name": "Asunción (día sustituto)", - "type": "observance", + "type": "public", "substitute": true, - "rule": "substitutes 08-15 if sunday then next monday", + "rule": "substitutes 08-15 if Sunday then next Monday", "_weekday": "Mon" }, { diff --git a/test/fixtures/ES-CN-2022.json b/test/fixtures/ES-CN-2022.json index 9a05fa422..4e1b40ae2 100644 --- a/test/fixtures/ES-CN-2022.json +++ b/test/fixtures/ES-CN-2022.json @@ -31,7 +31,7 @@ "start": "2022-04-13T23:00:00.000Z", "end": "2022-04-14T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, @@ -71,16 +71,6 @@ "rule": "05-01", "_weekday": "Sun" }, - { - "date": "2022-05-02 00:00:00", - "start": "2022-05-01T23:00:00.000Z", - "end": "2022-05-02T23:00:00.000Z", - "name": "Día del trabajador (día sustituto)", - "type": "observance", - "substitute": true, - "rule": "substitutes 05-01 if sunday then next monday", - "_weekday": "Mon" - }, { "date": "2022-05-30 00:00:00", "start": "2022-05-29T23:00:00.000Z", @@ -168,7 +158,7 @@ "start": "2022-12-26T00:00:00.000Z", "end": "2022-12-27T00:00:00.000Z", "name": "Navidad (día sustituto)", - "type": "observance", + "type": "public", "substitute": true, "rule": "substitutes 12-25 if sunday then next monday", "_weekday": "Mon" diff --git a/test/fixtures/ES-CN-2023.json b/test/fixtures/ES-CN-2023.json index d0a69c30c..9b0382fc1 100644 --- a/test/fixtures/ES-CN-2023.json +++ b/test/fixtures/ES-CN-2023.json @@ -41,7 +41,7 @@ "start": "2023-04-05T23:00:00.000Z", "end": "2023-04-06T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-CN-2024.json b/test/fixtures/ES-CN-2024.json index 28124963d..4c369b36c 100644 --- a/test/fixtures/ES-CN-2024.json +++ b/test/fixtures/ES-CN-2024.json @@ -31,7 +31,7 @@ "start": "2024-03-28T00:00:00.000Z", "end": "2024-03-29T00:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-CN-2025.json b/test/fixtures/ES-CN-2025.json index 9f4f54d68..e4aa5eb90 100644 --- a/test/fixtures/ES-CN-2025.json +++ b/test/fixtures/ES-CN-2025.json @@ -31,7 +31,7 @@ "start": "2025-04-16T23:00:00.000Z", "end": "2025-04-17T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-CN-EH-2015.json b/test/fixtures/ES-CN-EH-2015.json index 1396b0a04..89a429e1a 100644 --- a/test/fixtures/ES-CN-EH-2015.json +++ b/test/fixtures/ES-CN-EH-2015.json @@ -31,7 +31,7 @@ "start": "2015-04-01T23:00:00.000Z", "end": "2015-04-02T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-CN-EH-2016.json b/test/fixtures/ES-CN-EH-2016.json index dea5f7f7b..e25f80be9 100644 --- a/test/fixtures/ES-CN-EH-2016.json +++ b/test/fixtures/ES-CN-EH-2016.json @@ -31,7 +31,7 @@ "start": "2016-03-24T00:00:00.000Z", "end": "2016-03-25T00:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, @@ -71,16 +71,6 @@ "rule": "05-01", "_weekday": "Sun" }, - { - "date": "2016-05-02 00:00:00", - "start": "2016-05-01T23:00:00.000Z", - "end": "2016-05-02T23:00:00.000Z", - "name": "Día del trabajador (día sustituto)", - "type": "observance", - "substitute": true, - "rule": "substitutes 05-01 if sunday then next monday", - "_weekday": "Mon" - }, { "date": "2016-05-15 00:00:00", "start": "2016-05-14T23:00:00.000Z", @@ -177,7 +167,7 @@ "start": "2016-12-26T00:00:00.000Z", "end": "2016-12-27T00:00:00.000Z", "name": "Navidad (día sustituto)", - "type": "observance", + "type": "public", "substitute": true, "rule": "substitutes 12-25 if sunday then next monday", "_weekday": "Mon" diff --git a/test/fixtures/ES-CN-EH-2017.json b/test/fixtures/ES-CN-EH-2017.json index 99405e15a..9ca9baad9 100644 --- a/test/fixtures/ES-CN-EH-2017.json +++ b/test/fixtures/ES-CN-EH-2017.json @@ -41,7 +41,7 @@ "start": "2017-04-12T23:00:00.000Z", "end": "2017-04-13T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-CN-EH-2018.json b/test/fixtures/ES-CN-EH-2018.json index 4bc4cb1db..8fdadee5d 100644 --- a/test/fixtures/ES-CN-EH-2018.json +++ b/test/fixtures/ES-CN-EH-2018.json @@ -31,7 +31,7 @@ "start": "2018-03-28T23:00:00.000Z", "end": "2018-03-29T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-CN-EH-2019.json b/test/fixtures/ES-CN-EH-2019.json index 290901c73..e8b3c128c 100644 --- a/test/fixtures/ES-CN-EH-2019.json +++ b/test/fixtures/ES-CN-EH-2019.json @@ -41,7 +41,7 @@ "start": "2019-04-17T23:00:00.000Z", "end": "2019-04-18T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-CN-EH-2020.json b/test/fixtures/ES-CN-EH-2020.json index 7b75f2b13..d6b894a8c 100644 --- a/test/fixtures/ES-CN-EH-2020.json +++ b/test/fixtures/ES-CN-EH-2020.json @@ -31,7 +31,7 @@ "start": "2020-04-08T23:00:00.000Z", "end": "2020-04-09T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-CN-EH-2021.json b/test/fixtures/ES-CN-EH-2021.json index 0db0b9955..5559bfbaa 100644 --- a/test/fixtures/ES-CN-EH-2021.json +++ b/test/fixtures/ES-CN-EH-2021.json @@ -31,7 +31,7 @@ "start": "2021-03-31T23:00:00.000Z", "end": "2021-04-01T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, @@ -89,6 +89,16 @@ "rule": "05-30", "_weekday": "Sun" }, + { + "date": "2021-05-31 00:00:00", + "start": "2021-05-30T23:00:00.000Z", + "end": "2021-05-31T23:00:00.000Z", + "name": "Día de Canarias (día sustituto)", + "type": "public", + "substitute": true, + "rule": "substitutes 05-30 if Sunday then next Monday", + "_weekday": "Mon" + }, { "date": "2021-07-25 00:00:00", "start": "2021-07-24T23:00:00.000Z", @@ -113,9 +123,9 @@ "start": "2021-08-15T23:00:00.000Z", "end": "2021-08-16T23:00:00.000Z", "name": "Asunción (día sustituto)", - "type": "observance", + "type": "public", "substitute": true, - "rule": "substitutes 08-15 if sunday then next monday", + "rule": "substitutes 08-15 if Sunday then next Monday", "_weekday": "Mon" }, { diff --git a/test/fixtures/ES-CN-EH-2022.json b/test/fixtures/ES-CN-EH-2022.json index 278d2c0d3..119f361e4 100644 --- a/test/fixtures/ES-CN-EH-2022.json +++ b/test/fixtures/ES-CN-EH-2022.json @@ -31,7 +31,7 @@ "start": "2022-04-13T23:00:00.000Z", "end": "2022-04-14T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, @@ -71,16 +71,6 @@ "rule": "05-01", "_weekday": "Sun" }, - { - "date": "2022-05-02 00:00:00", - "start": "2022-05-01T23:00:00.000Z", - "end": "2022-05-02T23:00:00.000Z", - "name": "Día del trabajador (día sustituto)", - "type": "observance", - "substitute": true, - "rule": "substitutes 05-01 if sunday then next monday", - "_weekday": "Mon" - }, { "date": "2022-05-30 00:00:00", "start": "2022-05-29T23:00:00.000Z", @@ -177,7 +167,7 @@ "start": "2022-12-26T00:00:00.000Z", "end": "2022-12-27T00:00:00.000Z", "name": "Navidad (día sustituto)", - "type": "observance", + "type": "public", "substitute": true, "rule": "substitutes 12-25 if sunday then next monday", "_weekday": "Mon" diff --git a/test/fixtures/ES-CN-EH-2023.json b/test/fixtures/ES-CN-EH-2023.json index 8575a435b..5edba7d4b 100644 --- a/test/fixtures/ES-CN-EH-2023.json +++ b/test/fixtures/ES-CN-EH-2023.json @@ -41,7 +41,7 @@ "start": "2023-04-05T23:00:00.000Z", "end": "2023-04-06T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-CN-EH-2024.json b/test/fixtures/ES-CN-EH-2024.json index 4bfbfdc20..e3ada1462 100644 --- a/test/fixtures/ES-CN-EH-2024.json +++ b/test/fixtures/ES-CN-EH-2024.json @@ -31,7 +31,7 @@ "start": "2024-03-28T00:00:00.000Z", "end": "2024-03-29T00:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-CN-EH-2025.json b/test/fixtures/ES-CN-EH-2025.json index 1f399bee7..79402e73e 100644 --- a/test/fixtures/ES-CN-EH-2025.json +++ b/test/fixtures/ES-CN-EH-2025.json @@ -31,7 +31,7 @@ "start": "2025-04-16T23:00:00.000Z", "end": "2025-04-17T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-CN-FU-2015.json b/test/fixtures/ES-CN-FU-2015.json index 3bad5670d..e7871c96e 100644 --- a/test/fixtures/ES-CN-FU-2015.json +++ b/test/fixtures/ES-CN-FU-2015.json @@ -31,7 +31,7 @@ "start": "2015-04-01T23:00:00.000Z", "end": "2015-04-02T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-CN-FU-2016.json b/test/fixtures/ES-CN-FU-2016.json index 771cdfbc0..24c84c57d 100644 --- a/test/fixtures/ES-CN-FU-2016.json +++ b/test/fixtures/ES-CN-FU-2016.json @@ -31,7 +31,7 @@ "start": "2016-03-24T00:00:00.000Z", "end": "2016-03-25T00:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, @@ -71,16 +71,6 @@ "rule": "05-01", "_weekday": "Sun" }, - { - "date": "2016-05-02 00:00:00", - "start": "2016-05-01T23:00:00.000Z", - "end": "2016-05-02T23:00:00.000Z", - "name": "Día del trabajador (día sustituto)", - "type": "observance", - "substitute": true, - "rule": "substitutes 05-01 if sunday then next monday", - "_weekday": "Mon" - }, { "date": "2016-05-15 00:00:00", "start": "2016-05-14T23:00:00.000Z", @@ -177,7 +167,7 @@ "start": "2016-12-26T00:00:00.000Z", "end": "2016-12-27T00:00:00.000Z", "name": "Navidad (día sustituto)", - "type": "observance", + "type": "public", "substitute": true, "rule": "substitutes 12-25 if sunday then next monday", "_weekday": "Mon" diff --git a/test/fixtures/ES-CN-FU-2017.json b/test/fixtures/ES-CN-FU-2017.json index 5f24e4e5f..b2fe260a5 100644 --- a/test/fixtures/ES-CN-FU-2017.json +++ b/test/fixtures/ES-CN-FU-2017.json @@ -41,7 +41,7 @@ "start": "2017-04-12T23:00:00.000Z", "end": "2017-04-13T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-CN-FU-2018.json b/test/fixtures/ES-CN-FU-2018.json index 17f387a32..dcf30b558 100644 --- a/test/fixtures/ES-CN-FU-2018.json +++ b/test/fixtures/ES-CN-FU-2018.json @@ -31,7 +31,7 @@ "start": "2018-03-28T23:00:00.000Z", "end": "2018-03-29T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-CN-FU-2019.json b/test/fixtures/ES-CN-FU-2019.json index 833a430aa..d4e3f72b8 100644 --- a/test/fixtures/ES-CN-FU-2019.json +++ b/test/fixtures/ES-CN-FU-2019.json @@ -41,7 +41,7 @@ "start": "2019-04-17T23:00:00.000Z", "end": "2019-04-18T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-CN-FU-2020.json b/test/fixtures/ES-CN-FU-2020.json index aa826e4a3..f462689fc 100644 --- a/test/fixtures/ES-CN-FU-2020.json +++ b/test/fixtures/ES-CN-FU-2020.json @@ -31,7 +31,7 @@ "start": "2020-04-08T23:00:00.000Z", "end": "2020-04-09T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-CN-FU-2021.json b/test/fixtures/ES-CN-FU-2021.json index 9379bb1cf..1dec6fc96 100644 --- a/test/fixtures/ES-CN-FU-2021.json +++ b/test/fixtures/ES-CN-FU-2021.json @@ -31,7 +31,7 @@ "start": "2021-03-31T23:00:00.000Z", "end": "2021-04-01T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, @@ -89,6 +89,16 @@ "rule": "05-30", "_weekday": "Sun" }, + { + "date": "2021-05-31 00:00:00", + "start": "2021-05-30T23:00:00.000Z", + "end": "2021-05-31T23:00:00.000Z", + "name": "Día de Canarias (día sustituto)", + "type": "public", + "substitute": true, + "rule": "substitutes 05-30 if Sunday then next Monday", + "_weekday": "Mon" + }, { "date": "2021-07-25 00:00:00", "start": "2021-07-24T23:00:00.000Z", @@ -113,9 +123,9 @@ "start": "2021-08-15T23:00:00.000Z", "end": "2021-08-16T23:00:00.000Z", "name": "Asunción (día sustituto)", - "type": "observance", + "type": "public", "substitute": true, - "rule": "substitutes 08-15 if sunday then next monday", + "rule": "substitutes 08-15 if Sunday then next Monday", "_weekday": "Mon" }, { diff --git a/test/fixtures/ES-CN-FU-2022.json b/test/fixtures/ES-CN-FU-2022.json index 6c60ba5ea..b412b5eab 100644 --- a/test/fixtures/ES-CN-FU-2022.json +++ b/test/fixtures/ES-CN-FU-2022.json @@ -31,7 +31,7 @@ "start": "2022-04-13T23:00:00.000Z", "end": "2022-04-14T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, @@ -71,16 +71,6 @@ "rule": "05-01", "_weekday": "Sun" }, - { - "date": "2022-05-02 00:00:00", - "start": "2022-05-01T23:00:00.000Z", - "end": "2022-05-02T23:00:00.000Z", - "name": "Día del trabajador (día sustituto)", - "type": "observance", - "substitute": true, - "rule": "substitutes 05-01 if sunday then next monday", - "_weekday": "Mon" - }, { "date": "2022-05-30 00:00:00", "start": "2022-05-29T23:00:00.000Z", @@ -177,7 +167,7 @@ "start": "2022-12-26T00:00:00.000Z", "end": "2022-12-27T00:00:00.000Z", "name": "Navidad (día sustituto)", - "type": "observance", + "type": "public", "substitute": true, "rule": "substitutes 12-25 if sunday then next monday", "_weekday": "Mon" diff --git a/test/fixtures/ES-CN-FU-2023.json b/test/fixtures/ES-CN-FU-2023.json index f655c706d..d97fb0808 100644 --- a/test/fixtures/ES-CN-FU-2023.json +++ b/test/fixtures/ES-CN-FU-2023.json @@ -41,7 +41,7 @@ "start": "2023-04-05T23:00:00.000Z", "end": "2023-04-06T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-CN-FU-2024.json b/test/fixtures/ES-CN-FU-2024.json index d218429cf..e728bed75 100644 --- a/test/fixtures/ES-CN-FU-2024.json +++ b/test/fixtures/ES-CN-FU-2024.json @@ -31,7 +31,7 @@ "start": "2024-03-28T00:00:00.000Z", "end": "2024-03-29T00:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-CN-FU-2025.json b/test/fixtures/ES-CN-FU-2025.json index dd2213b98..ea91ab0c7 100644 --- a/test/fixtures/ES-CN-FU-2025.json +++ b/test/fixtures/ES-CN-FU-2025.json @@ -31,7 +31,7 @@ "start": "2025-04-16T23:00:00.000Z", "end": "2025-04-17T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-CN-GC-2015.json b/test/fixtures/ES-CN-GC-2015.json index 69dc806f2..d0ffe3f0d 100644 --- a/test/fixtures/ES-CN-GC-2015.json +++ b/test/fixtures/ES-CN-GC-2015.json @@ -31,7 +31,7 @@ "start": "2015-04-01T23:00:00.000Z", "end": "2015-04-02T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-CN-GC-2016.json b/test/fixtures/ES-CN-GC-2016.json index 915d3e3c6..289eb1edd 100644 --- a/test/fixtures/ES-CN-GC-2016.json +++ b/test/fixtures/ES-CN-GC-2016.json @@ -31,7 +31,7 @@ "start": "2016-03-24T00:00:00.000Z", "end": "2016-03-25T00:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, @@ -71,16 +71,6 @@ "rule": "05-01", "_weekday": "Sun" }, - { - "date": "2016-05-02 00:00:00", - "start": "2016-05-01T23:00:00.000Z", - "end": "2016-05-02T23:00:00.000Z", - "name": "Día del trabajador (día sustituto)", - "type": "observance", - "substitute": true, - "rule": "substitutes 05-01 if sunday then next monday", - "_weekday": "Mon" - }, { "date": "2016-05-15 00:00:00", "start": "2016-05-14T23:00:00.000Z", @@ -177,7 +167,7 @@ "start": "2016-12-26T00:00:00.000Z", "end": "2016-12-27T00:00:00.000Z", "name": "Navidad (día sustituto)", - "type": "observance", + "type": "public", "substitute": true, "rule": "substitutes 12-25 if sunday then next monday", "_weekday": "Mon" diff --git a/test/fixtures/ES-CN-GC-2017.json b/test/fixtures/ES-CN-GC-2017.json index 6bd662a95..041444dfe 100644 --- a/test/fixtures/ES-CN-GC-2017.json +++ b/test/fixtures/ES-CN-GC-2017.json @@ -41,7 +41,7 @@ "start": "2017-04-12T23:00:00.000Z", "end": "2017-04-13T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-CN-GC-2018.json b/test/fixtures/ES-CN-GC-2018.json index b678cb127..10cc0637d 100644 --- a/test/fixtures/ES-CN-GC-2018.json +++ b/test/fixtures/ES-CN-GC-2018.json @@ -31,7 +31,7 @@ "start": "2018-03-28T23:00:00.000Z", "end": "2018-03-29T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-CN-GC-2019.json b/test/fixtures/ES-CN-GC-2019.json index 29df2f9e3..160a27e70 100644 --- a/test/fixtures/ES-CN-GC-2019.json +++ b/test/fixtures/ES-CN-GC-2019.json @@ -41,7 +41,7 @@ "start": "2019-04-17T23:00:00.000Z", "end": "2019-04-18T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-CN-GC-2020.json b/test/fixtures/ES-CN-GC-2020.json index eca809366..df882ecba 100644 --- a/test/fixtures/ES-CN-GC-2020.json +++ b/test/fixtures/ES-CN-GC-2020.json @@ -31,7 +31,7 @@ "start": "2020-04-08T23:00:00.000Z", "end": "2020-04-09T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-CN-GC-2021.json b/test/fixtures/ES-CN-GC-2021.json index 30cc322bb..07004db41 100644 --- a/test/fixtures/ES-CN-GC-2021.json +++ b/test/fixtures/ES-CN-GC-2021.json @@ -31,7 +31,7 @@ "start": "2021-03-31T23:00:00.000Z", "end": "2021-04-01T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, @@ -89,6 +89,16 @@ "rule": "05-30", "_weekday": "Sun" }, + { + "date": "2021-05-31 00:00:00", + "start": "2021-05-30T23:00:00.000Z", + "end": "2021-05-31T23:00:00.000Z", + "name": "Día de Canarias (día sustituto)", + "type": "public", + "substitute": true, + "rule": "substitutes 05-30 if Sunday then next Monday", + "_weekday": "Mon" + }, { "date": "2021-07-25 00:00:00", "start": "2021-07-24T23:00:00.000Z", @@ -113,9 +123,9 @@ "start": "2021-08-15T23:00:00.000Z", "end": "2021-08-16T23:00:00.000Z", "name": "Asunción (día sustituto)", - "type": "observance", + "type": "public", "substitute": true, - "rule": "substitutes 08-15 if sunday then next monday", + "rule": "substitutes 08-15 if Sunday then next Monday", "_weekday": "Mon" }, { diff --git a/test/fixtures/ES-CN-GC-2022.json b/test/fixtures/ES-CN-GC-2022.json index 611449214..a0a384982 100644 --- a/test/fixtures/ES-CN-GC-2022.json +++ b/test/fixtures/ES-CN-GC-2022.json @@ -31,7 +31,7 @@ "start": "2022-04-13T23:00:00.000Z", "end": "2022-04-14T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, @@ -71,16 +71,6 @@ "rule": "05-01", "_weekday": "Sun" }, - { - "date": "2022-05-02 00:00:00", - "start": "2022-05-01T23:00:00.000Z", - "end": "2022-05-02T23:00:00.000Z", - "name": "Día del trabajador (día sustituto)", - "type": "observance", - "substitute": true, - "rule": "substitutes 05-01 if sunday then next monday", - "_weekday": "Mon" - }, { "date": "2022-05-30 00:00:00", "start": "2022-05-29T23:00:00.000Z", @@ -177,7 +167,7 @@ "start": "2022-12-26T00:00:00.000Z", "end": "2022-12-27T00:00:00.000Z", "name": "Navidad (día sustituto)", - "type": "observance", + "type": "public", "substitute": true, "rule": "substitutes 12-25 if sunday then next monday", "_weekday": "Mon" diff --git a/test/fixtures/ES-CN-GC-2023.json b/test/fixtures/ES-CN-GC-2023.json index 7fd0f0e13..57a52247b 100644 --- a/test/fixtures/ES-CN-GC-2023.json +++ b/test/fixtures/ES-CN-GC-2023.json @@ -41,7 +41,7 @@ "start": "2023-04-05T23:00:00.000Z", "end": "2023-04-06T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-CN-GC-2024.json b/test/fixtures/ES-CN-GC-2024.json index 78a9b7729..1028b4801 100644 --- a/test/fixtures/ES-CN-GC-2024.json +++ b/test/fixtures/ES-CN-GC-2024.json @@ -31,7 +31,7 @@ "start": "2024-03-28T00:00:00.000Z", "end": "2024-03-29T00:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-CN-GC-2025.json b/test/fixtures/ES-CN-GC-2025.json index 1dfdcf210..229839ea5 100644 --- a/test/fixtures/ES-CN-GC-2025.json +++ b/test/fixtures/ES-CN-GC-2025.json @@ -31,7 +31,7 @@ "start": "2025-04-16T23:00:00.000Z", "end": "2025-04-17T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-CN-LA-2015.json b/test/fixtures/ES-CN-LA-2015.json index f35853b76..4be65cc22 100644 --- a/test/fixtures/ES-CN-LA-2015.json +++ b/test/fixtures/ES-CN-LA-2015.json @@ -31,7 +31,7 @@ "start": "2015-04-01T23:00:00.000Z", "end": "2015-04-02T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-CN-LA-2016.json b/test/fixtures/ES-CN-LA-2016.json index 6a9941e3f..a085d8a71 100644 --- a/test/fixtures/ES-CN-LA-2016.json +++ b/test/fixtures/ES-CN-LA-2016.json @@ -31,7 +31,7 @@ "start": "2016-03-24T00:00:00.000Z", "end": "2016-03-25T00:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, @@ -71,16 +71,6 @@ "rule": "05-01", "_weekday": "Sun" }, - { - "date": "2016-05-02 00:00:00", - "start": "2016-05-01T23:00:00.000Z", - "end": "2016-05-02T23:00:00.000Z", - "name": "Día del trabajador (día sustituto)", - "type": "observance", - "substitute": true, - "rule": "substitutes 05-01 if sunday then next monday", - "_weekday": "Mon" - }, { "date": "2016-05-15 00:00:00", "start": "2016-05-14T23:00:00.000Z", @@ -177,7 +167,7 @@ "start": "2016-12-26T00:00:00.000Z", "end": "2016-12-27T00:00:00.000Z", "name": "Navidad (día sustituto)", - "type": "observance", + "type": "public", "substitute": true, "rule": "substitutes 12-25 if sunday then next monday", "_weekday": "Mon" diff --git a/test/fixtures/ES-CN-LA-2017.json b/test/fixtures/ES-CN-LA-2017.json index 4e5639c9a..e7bb9601c 100644 --- a/test/fixtures/ES-CN-LA-2017.json +++ b/test/fixtures/ES-CN-LA-2017.json @@ -41,7 +41,7 @@ "start": "2017-04-12T23:00:00.000Z", "end": "2017-04-13T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-CN-LA-2018.json b/test/fixtures/ES-CN-LA-2018.json index 81ef64a03..121fe0a57 100644 --- a/test/fixtures/ES-CN-LA-2018.json +++ b/test/fixtures/ES-CN-LA-2018.json @@ -31,7 +31,7 @@ "start": "2018-03-28T23:00:00.000Z", "end": "2018-03-29T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-CN-LA-2019.json b/test/fixtures/ES-CN-LA-2019.json index d73deacb5..043b4e91c 100644 --- a/test/fixtures/ES-CN-LA-2019.json +++ b/test/fixtures/ES-CN-LA-2019.json @@ -41,7 +41,7 @@ "start": "2019-04-17T23:00:00.000Z", "end": "2019-04-18T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-CN-LA-2020.json b/test/fixtures/ES-CN-LA-2020.json index 1ae44ce18..0ccc60691 100644 --- a/test/fixtures/ES-CN-LA-2020.json +++ b/test/fixtures/ES-CN-LA-2020.json @@ -31,7 +31,7 @@ "start": "2020-04-08T23:00:00.000Z", "end": "2020-04-09T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-CN-LA-2021.json b/test/fixtures/ES-CN-LA-2021.json index 5b45f2d5c..00a5ec1ce 100644 --- a/test/fixtures/ES-CN-LA-2021.json +++ b/test/fixtures/ES-CN-LA-2021.json @@ -31,7 +31,7 @@ "start": "2021-03-31T23:00:00.000Z", "end": "2021-04-01T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, @@ -89,6 +89,16 @@ "rule": "05-30", "_weekday": "Sun" }, + { + "date": "2021-05-31 00:00:00", + "start": "2021-05-30T23:00:00.000Z", + "end": "2021-05-31T23:00:00.000Z", + "name": "Día de Canarias (día sustituto)", + "type": "public", + "substitute": true, + "rule": "substitutes 05-30 if Sunday then next Monday", + "_weekday": "Mon" + }, { "date": "2021-07-25 00:00:00", "start": "2021-07-24T23:00:00.000Z", @@ -113,9 +123,9 @@ "start": "2021-08-15T23:00:00.000Z", "end": "2021-08-16T23:00:00.000Z", "name": "Asunción (día sustituto)", - "type": "observance", + "type": "public", "substitute": true, - "rule": "substitutes 08-15 if sunday then next monday", + "rule": "substitutes 08-15 if Sunday then next Monday", "_weekday": "Mon" }, { diff --git a/test/fixtures/ES-CN-LA-2022.json b/test/fixtures/ES-CN-LA-2022.json index ed2a65829..a692f9d0e 100644 --- a/test/fixtures/ES-CN-LA-2022.json +++ b/test/fixtures/ES-CN-LA-2022.json @@ -31,7 +31,7 @@ "start": "2022-04-13T23:00:00.000Z", "end": "2022-04-14T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, @@ -71,16 +71,6 @@ "rule": "05-01", "_weekday": "Sun" }, - { - "date": "2022-05-02 00:00:00", - "start": "2022-05-01T23:00:00.000Z", - "end": "2022-05-02T23:00:00.000Z", - "name": "Día del trabajador (día sustituto)", - "type": "observance", - "substitute": true, - "rule": "substitutes 05-01 if sunday then next monday", - "_weekday": "Mon" - }, { "date": "2022-05-30 00:00:00", "start": "2022-05-29T23:00:00.000Z", @@ -177,7 +167,7 @@ "start": "2022-12-26T00:00:00.000Z", "end": "2022-12-27T00:00:00.000Z", "name": "Navidad (día sustituto)", - "type": "observance", + "type": "public", "substitute": true, "rule": "substitutes 12-25 if sunday then next monday", "_weekday": "Mon" diff --git a/test/fixtures/ES-CN-LA-2023.json b/test/fixtures/ES-CN-LA-2023.json index 09de5d04a..99077cbe5 100644 --- a/test/fixtures/ES-CN-LA-2023.json +++ b/test/fixtures/ES-CN-LA-2023.json @@ -41,7 +41,7 @@ "start": "2023-04-05T23:00:00.000Z", "end": "2023-04-06T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-CN-LA-2024.json b/test/fixtures/ES-CN-LA-2024.json index 79d858c56..cb94a4e51 100644 --- a/test/fixtures/ES-CN-LA-2024.json +++ b/test/fixtures/ES-CN-LA-2024.json @@ -31,7 +31,7 @@ "start": "2024-03-28T00:00:00.000Z", "end": "2024-03-29T00:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-CN-LA-2025.json b/test/fixtures/ES-CN-LA-2025.json index 608de7fdc..bbd32017c 100644 --- a/test/fixtures/ES-CN-LA-2025.json +++ b/test/fixtures/ES-CN-LA-2025.json @@ -31,7 +31,7 @@ "start": "2025-04-16T23:00:00.000Z", "end": "2025-04-17T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-CN-LG-2015.json b/test/fixtures/ES-CN-LG-2015.json index 9179a6382..21a0dcbb4 100644 --- a/test/fixtures/ES-CN-LG-2015.json +++ b/test/fixtures/ES-CN-LG-2015.json @@ -31,7 +31,7 @@ "start": "2015-04-01T23:00:00.000Z", "end": "2015-04-02T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-CN-LG-2016.json b/test/fixtures/ES-CN-LG-2016.json index 5a296af97..0baa91a0f 100644 --- a/test/fixtures/ES-CN-LG-2016.json +++ b/test/fixtures/ES-CN-LG-2016.json @@ -31,7 +31,7 @@ "start": "2016-03-24T00:00:00.000Z", "end": "2016-03-25T00:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, @@ -71,16 +71,6 @@ "rule": "05-01", "_weekday": "Sun" }, - { - "date": "2016-05-02 00:00:00", - "start": "2016-05-01T23:00:00.000Z", - "end": "2016-05-02T23:00:00.000Z", - "name": "Día del trabajador (día sustituto)", - "type": "observance", - "substitute": true, - "rule": "substitutes 05-01 if sunday then next monday", - "_weekday": "Mon" - }, { "date": "2016-05-15 00:00:00", "start": "2016-05-14T23:00:00.000Z", @@ -177,7 +167,7 @@ "start": "2016-12-26T00:00:00.000Z", "end": "2016-12-27T00:00:00.000Z", "name": "Navidad (día sustituto)", - "type": "observance", + "type": "public", "substitute": true, "rule": "substitutes 12-25 if sunday then next monday", "_weekday": "Mon" diff --git a/test/fixtures/ES-CN-LG-2017.json b/test/fixtures/ES-CN-LG-2017.json index 6a6d8b827..5f8eeba20 100644 --- a/test/fixtures/ES-CN-LG-2017.json +++ b/test/fixtures/ES-CN-LG-2017.json @@ -41,7 +41,7 @@ "start": "2017-04-12T23:00:00.000Z", "end": "2017-04-13T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-CN-LG-2018.json b/test/fixtures/ES-CN-LG-2018.json index 0ea2e62d1..68ba1311c 100644 --- a/test/fixtures/ES-CN-LG-2018.json +++ b/test/fixtures/ES-CN-LG-2018.json @@ -31,7 +31,7 @@ "start": "2018-03-28T23:00:00.000Z", "end": "2018-03-29T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-CN-LG-2019.json b/test/fixtures/ES-CN-LG-2019.json index 1a7501c2b..8d1f42f38 100644 --- a/test/fixtures/ES-CN-LG-2019.json +++ b/test/fixtures/ES-CN-LG-2019.json @@ -41,7 +41,7 @@ "start": "2019-04-17T23:00:00.000Z", "end": "2019-04-18T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-CN-LG-2020.json b/test/fixtures/ES-CN-LG-2020.json index 046072fe7..7b50699fa 100644 --- a/test/fixtures/ES-CN-LG-2020.json +++ b/test/fixtures/ES-CN-LG-2020.json @@ -31,7 +31,7 @@ "start": "2020-04-08T23:00:00.000Z", "end": "2020-04-09T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-CN-LG-2021.json b/test/fixtures/ES-CN-LG-2021.json index f290c1f1b..889fe6ec9 100644 --- a/test/fixtures/ES-CN-LG-2021.json +++ b/test/fixtures/ES-CN-LG-2021.json @@ -31,7 +31,7 @@ "start": "2021-03-31T23:00:00.000Z", "end": "2021-04-01T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, @@ -89,6 +89,16 @@ "rule": "05-30", "_weekday": "Sun" }, + { + "date": "2021-05-31 00:00:00", + "start": "2021-05-30T23:00:00.000Z", + "end": "2021-05-31T23:00:00.000Z", + "name": "Día de Canarias (día sustituto)", + "type": "public", + "substitute": true, + "rule": "substitutes 05-30 if Sunday then next Monday", + "_weekday": "Mon" + }, { "date": "2021-07-25 00:00:00", "start": "2021-07-24T23:00:00.000Z", @@ -113,9 +123,9 @@ "start": "2021-08-15T23:00:00.000Z", "end": "2021-08-16T23:00:00.000Z", "name": "Asunción (día sustituto)", - "type": "observance", + "type": "public", "substitute": true, - "rule": "substitutes 08-15 if sunday then next monday", + "rule": "substitutes 08-15 if Sunday then next Monday", "_weekday": "Mon" }, { diff --git a/test/fixtures/ES-CN-LG-2022.json b/test/fixtures/ES-CN-LG-2022.json index 145589d6c..270e5e056 100644 --- a/test/fixtures/ES-CN-LG-2022.json +++ b/test/fixtures/ES-CN-LG-2022.json @@ -31,7 +31,7 @@ "start": "2022-04-13T23:00:00.000Z", "end": "2022-04-14T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, @@ -71,16 +71,6 @@ "rule": "05-01", "_weekday": "Sun" }, - { - "date": "2022-05-02 00:00:00", - "start": "2022-05-01T23:00:00.000Z", - "end": "2022-05-02T23:00:00.000Z", - "name": "Día del trabajador (día sustituto)", - "type": "observance", - "substitute": true, - "rule": "substitutes 05-01 if sunday then next monday", - "_weekday": "Mon" - }, { "date": "2022-05-30 00:00:00", "start": "2022-05-29T23:00:00.000Z", @@ -177,7 +167,7 @@ "start": "2022-12-26T00:00:00.000Z", "end": "2022-12-27T00:00:00.000Z", "name": "Navidad (día sustituto)", - "type": "observance", + "type": "public", "substitute": true, "rule": "substitutes 12-25 if sunday then next monday", "_weekday": "Mon" diff --git a/test/fixtures/ES-CN-LG-2023.json b/test/fixtures/ES-CN-LG-2023.json index 741391ea0..f94aa88fb 100644 --- a/test/fixtures/ES-CN-LG-2023.json +++ b/test/fixtures/ES-CN-LG-2023.json @@ -41,7 +41,7 @@ "start": "2023-04-05T23:00:00.000Z", "end": "2023-04-06T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-CN-LG-2024.json b/test/fixtures/ES-CN-LG-2024.json index a07681b9a..90702d26e 100644 --- a/test/fixtures/ES-CN-LG-2024.json +++ b/test/fixtures/ES-CN-LG-2024.json @@ -31,7 +31,7 @@ "start": "2024-03-28T00:00:00.000Z", "end": "2024-03-29T00:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-CN-LG-2025.json b/test/fixtures/ES-CN-LG-2025.json index 7fe7f1b3d..b3bfdbf26 100644 --- a/test/fixtures/ES-CN-LG-2025.json +++ b/test/fixtures/ES-CN-LG-2025.json @@ -31,7 +31,7 @@ "start": "2025-04-16T23:00:00.000Z", "end": "2025-04-17T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-CN-LP-2015.json b/test/fixtures/ES-CN-LP-2015.json index 0fed076e0..219167dc5 100644 --- a/test/fixtures/ES-CN-LP-2015.json +++ b/test/fixtures/ES-CN-LP-2015.json @@ -31,7 +31,7 @@ "start": "2015-04-01T23:00:00.000Z", "end": "2015-04-02T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-CN-LP-2016.json b/test/fixtures/ES-CN-LP-2016.json index 06b3363c0..d55b60e03 100644 --- a/test/fixtures/ES-CN-LP-2016.json +++ b/test/fixtures/ES-CN-LP-2016.json @@ -31,7 +31,7 @@ "start": "2016-03-24T00:00:00.000Z", "end": "2016-03-25T00:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, @@ -71,16 +71,6 @@ "rule": "05-01", "_weekday": "Sun" }, - { - "date": "2016-05-02 00:00:00", - "start": "2016-05-01T23:00:00.000Z", - "end": "2016-05-02T23:00:00.000Z", - "name": "Día del trabajador (día sustituto)", - "type": "observance", - "substitute": true, - "rule": "substitutes 05-01 if sunday then next monday", - "_weekday": "Mon" - }, { "date": "2016-05-15 00:00:00", "start": "2016-05-14T23:00:00.000Z", @@ -177,7 +167,7 @@ "start": "2016-12-26T00:00:00.000Z", "end": "2016-12-27T00:00:00.000Z", "name": "Navidad (día sustituto)", - "type": "observance", + "type": "public", "substitute": true, "rule": "substitutes 12-25 if sunday then next monday", "_weekday": "Mon" diff --git a/test/fixtures/ES-CN-LP-2017.json b/test/fixtures/ES-CN-LP-2017.json index 20e27986e..b2eb15600 100644 --- a/test/fixtures/ES-CN-LP-2017.json +++ b/test/fixtures/ES-CN-LP-2017.json @@ -41,7 +41,7 @@ "start": "2017-04-12T23:00:00.000Z", "end": "2017-04-13T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-CN-LP-2018.json b/test/fixtures/ES-CN-LP-2018.json index 8b1d8e162..730f5e84d 100644 --- a/test/fixtures/ES-CN-LP-2018.json +++ b/test/fixtures/ES-CN-LP-2018.json @@ -31,7 +31,7 @@ "start": "2018-03-28T23:00:00.000Z", "end": "2018-03-29T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-CN-LP-2019.json b/test/fixtures/ES-CN-LP-2019.json index 2258d583e..80118d624 100644 --- a/test/fixtures/ES-CN-LP-2019.json +++ b/test/fixtures/ES-CN-LP-2019.json @@ -41,7 +41,7 @@ "start": "2019-04-17T23:00:00.000Z", "end": "2019-04-18T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-CN-LP-2020.json b/test/fixtures/ES-CN-LP-2020.json index 8ae6e881f..716b45679 100644 --- a/test/fixtures/ES-CN-LP-2020.json +++ b/test/fixtures/ES-CN-LP-2020.json @@ -31,7 +31,7 @@ "start": "2020-04-08T23:00:00.000Z", "end": "2020-04-09T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-CN-LP-2021.json b/test/fixtures/ES-CN-LP-2021.json index 9f6a07146..0dd1a01a2 100644 --- a/test/fixtures/ES-CN-LP-2021.json +++ b/test/fixtures/ES-CN-LP-2021.json @@ -31,7 +31,7 @@ "start": "2021-03-31T23:00:00.000Z", "end": "2021-04-01T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, @@ -89,6 +89,16 @@ "rule": "05-30", "_weekday": "Sun" }, + { + "date": "2021-05-31 00:00:00", + "start": "2021-05-30T23:00:00.000Z", + "end": "2021-05-31T23:00:00.000Z", + "name": "Día de Canarias (día sustituto)", + "type": "public", + "substitute": true, + "rule": "substitutes 05-30 if Sunday then next Monday", + "_weekday": "Mon" + }, { "date": "2021-07-25 00:00:00", "start": "2021-07-24T23:00:00.000Z", @@ -122,9 +132,9 @@ "start": "2021-08-15T23:00:00.000Z", "end": "2021-08-16T23:00:00.000Z", "name": "Asunción (día sustituto)", - "type": "observance", + "type": "public", "substitute": true, - "rule": "substitutes 08-15 if sunday then next monday", + "rule": "substitutes 08-15 if Sunday then next Monday", "_weekday": "Mon" }, { diff --git a/test/fixtures/ES-CN-LP-2022.json b/test/fixtures/ES-CN-LP-2022.json index cd083f2e9..b4e78359e 100644 --- a/test/fixtures/ES-CN-LP-2022.json +++ b/test/fixtures/ES-CN-LP-2022.json @@ -31,7 +31,7 @@ "start": "2022-04-13T23:00:00.000Z", "end": "2022-04-14T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, @@ -71,16 +71,6 @@ "rule": "05-01", "_weekday": "Sun" }, - { - "date": "2022-05-02 00:00:00", - "start": "2022-05-01T23:00:00.000Z", - "end": "2022-05-02T23:00:00.000Z", - "name": "Día del trabajador (día sustituto)", - "type": "observance", - "substitute": true, - "rule": "substitutes 05-01 if sunday then next monday", - "_weekday": "Mon" - }, { "date": "2022-05-30 00:00:00", "start": "2022-05-29T23:00:00.000Z", @@ -177,7 +167,7 @@ "start": "2022-12-26T00:00:00.000Z", "end": "2022-12-27T00:00:00.000Z", "name": "Navidad (día sustituto)", - "type": "observance", + "type": "public", "substitute": true, "rule": "substitutes 12-25 if sunday then next monday", "_weekday": "Mon" diff --git a/test/fixtures/ES-CN-LP-2023.json b/test/fixtures/ES-CN-LP-2023.json index 6791c193b..122397fbf 100644 --- a/test/fixtures/ES-CN-LP-2023.json +++ b/test/fixtures/ES-CN-LP-2023.json @@ -41,7 +41,7 @@ "start": "2023-04-05T23:00:00.000Z", "end": "2023-04-06T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-CN-LP-2024.json b/test/fixtures/ES-CN-LP-2024.json index 431c59c52..d48255d42 100644 --- a/test/fixtures/ES-CN-LP-2024.json +++ b/test/fixtures/ES-CN-LP-2024.json @@ -31,7 +31,7 @@ "start": "2024-03-28T00:00:00.000Z", "end": "2024-03-29T00:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-CN-LP-2025.json b/test/fixtures/ES-CN-LP-2025.json index d91383512..e7880e0d4 100644 --- a/test/fixtures/ES-CN-LP-2025.json +++ b/test/fixtures/ES-CN-LP-2025.json @@ -31,7 +31,7 @@ "start": "2025-04-16T23:00:00.000Z", "end": "2025-04-17T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-CN-TE-2015.json b/test/fixtures/ES-CN-TE-2015.json index 441cdcec9..a249bdeeb 100644 --- a/test/fixtures/ES-CN-TE-2015.json +++ b/test/fixtures/ES-CN-TE-2015.json @@ -31,7 +31,7 @@ "start": "2015-04-01T23:00:00.000Z", "end": "2015-04-02T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-CN-TE-2016.json b/test/fixtures/ES-CN-TE-2016.json index 19d203bda..3a94763fe 100644 --- a/test/fixtures/ES-CN-TE-2016.json +++ b/test/fixtures/ES-CN-TE-2016.json @@ -31,7 +31,7 @@ "start": "2016-03-24T00:00:00.000Z", "end": "2016-03-25T00:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, @@ -71,16 +71,6 @@ "rule": "05-01", "_weekday": "Sun" }, - { - "date": "2016-05-02 00:00:00", - "start": "2016-05-01T23:00:00.000Z", - "end": "2016-05-02T23:00:00.000Z", - "name": "Día del trabajador (día sustituto)", - "type": "observance", - "substitute": true, - "rule": "substitutes 05-01 if sunday then next monday", - "_weekday": "Mon" - }, { "date": "2016-05-15 00:00:00", "start": "2016-05-14T23:00:00.000Z", @@ -177,7 +167,7 @@ "start": "2016-12-26T00:00:00.000Z", "end": "2016-12-27T00:00:00.000Z", "name": "Navidad (día sustituto)", - "type": "observance", + "type": "public", "substitute": true, "rule": "substitutes 12-25 if sunday then next monday", "_weekday": "Mon" diff --git a/test/fixtures/ES-CN-TE-2017.json b/test/fixtures/ES-CN-TE-2017.json index 2ca84ed56..74e20b5fb 100644 --- a/test/fixtures/ES-CN-TE-2017.json +++ b/test/fixtures/ES-CN-TE-2017.json @@ -41,7 +41,7 @@ "start": "2017-04-12T23:00:00.000Z", "end": "2017-04-13T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-CN-TE-2018.json b/test/fixtures/ES-CN-TE-2018.json index 22616f2ce..1bef7a598 100644 --- a/test/fixtures/ES-CN-TE-2018.json +++ b/test/fixtures/ES-CN-TE-2018.json @@ -31,7 +31,7 @@ "start": "2018-03-28T23:00:00.000Z", "end": "2018-03-29T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-CN-TE-2019.json b/test/fixtures/ES-CN-TE-2019.json index 9af10f921..8c695cf53 100644 --- a/test/fixtures/ES-CN-TE-2019.json +++ b/test/fixtures/ES-CN-TE-2019.json @@ -41,7 +41,7 @@ "start": "2019-04-17T23:00:00.000Z", "end": "2019-04-18T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-CN-TE-2020.json b/test/fixtures/ES-CN-TE-2020.json index 441ce16e5..a86f4ab66 100644 --- a/test/fixtures/ES-CN-TE-2020.json +++ b/test/fixtures/ES-CN-TE-2020.json @@ -31,7 +31,7 @@ "start": "2020-04-08T23:00:00.000Z", "end": "2020-04-09T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-CN-TE-2021.json b/test/fixtures/ES-CN-TE-2021.json index 7cd36e2dd..4a5c1d6d7 100644 --- a/test/fixtures/ES-CN-TE-2021.json +++ b/test/fixtures/ES-CN-TE-2021.json @@ -31,7 +31,7 @@ "start": "2021-03-31T23:00:00.000Z", "end": "2021-04-01T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, @@ -89,6 +89,16 @@ "rule": "05-30", "_weekday": "Sun" }, + { + "date": "2021-05-31 00:00:00", + "start": "2021-05-30T23:00:00.000Z", + "end": "2021-05-31T23:00:00.000Z", + "name": "Día de Canarias (día sustituto)", + "type": "public", + "substitute": true, + "rule": "substitutes 05-30 if Sunday then next Monday", + "_weekday": "Mon" + }, { "date": "2021-07-25 00:00:00", "start": "2021-07-24T23:00:00.000Z", @@ -113,9 +123,9 @@ "start": "2021-08-15T23:00:00.000Z", "end": "2021-08-16T23:00:00.000Z", "name": "Asunción (día sustituto)", - "type": "observance", + "type": "public", "substitute": true, - "rule": "substitutes 08-15 if sunday then next monday", + "rule": "substitutes 08-15 if Sunday then next Monday", "_weekday": "Mon" }, { diff --git a/test/fixtures/ES-CN-TE-2022.json b/test/fixtures/ES-CN-TE-2022.json index 76ac35552..73626c609 100644 --- a/test/fixtures/ES-CN-TE-2022.json +++ b/test/fixtures/ES-CN-TE-2022.json @@ -31,7 +31,7 @@ "start": "2022-04-13T23:00:00.000Z", "end": "2022-04-14T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, @@ -71,16 +71,6 @@ "rule": "05-01", "_weekday": "Sun" }, - { - "date": "2022-05-02 00:00:00", - "start": "2022-05-01T23:00:00.000Z", - "end": "2022-05-02T23:00:00.000Z", - "name": "Día del trabajador (día sustituto)", - "type": "observance", - "substitute": true, - "rule": "substitutes 05-01 if sunday then next monday", - "_weekday": "Mon" - }, { "date": "2022-05-30 00:00:00", "start": "2022-05-29T23:00:00.000Z", @@ -177,7 +167,7 @@ "start": "2022-12-26T00:00:00.000Z", "end": "2022-12-27T00:00:00.000Z", "name": "Navidad (día sustituto)", - "type": "observance", + "type": "public", "substitute": true, "rule": "substitutes 12-25 if sunday then next monday", "_weekday": "Mon" diff --git a/test/fixtures/ES-CN-TE-2023.json b/test/fixtures/ES-CN-TE-2023.json index 85e05cd4e..3a5c7173a 100644 --- a/test/fixtures/ES-CN-TE-2023.json +++ b/test/fixtures/ES-CN-TE-2023.json @@ -41,7 +41,7 @@ "start": "2023-04-05T23:00:00.000Z", "end": "2023-04-06T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-CN-TE-2024.json b/test/fixtures/ES-CN-TE-2024.json index 36aebab31..81cf36aef 100644 --- a/test/fixtures/ES-CN-TE-2024.json +++ b/test/fixtures/ES-CN-TE-2024.json @@ -31,7 +31,7 @@ "start": "2024-03-28T00:00:00.000Z", "end": "2024-03-29T00:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-CN-TE-2025.json b/test/fixtures/ES-CN-TE-2025.json index c4e874f14..7df60f38b 100644 --- a/test/fixtures/ES-CN-TE-2025.json +++ b/test/fixtures/ES-CN-TE-2025.json @@ -31,7 +31,7 @@ "start": "2025-04-16T23:00:00.000Z", "end": "2025-04-17T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-CT-2015.json b/test/fixtures/ES-CT-2015.json index 5e0d48568..efcadd6a9 100644 --- a/test/fixtures/ES-CT-2015.json +++ b/test/fixtures/ES-CT-2015.json @@ -53,6 +53,15 @@ "rule": "easter", "_weekday": "Sun" }, + { + "date": "2015-04-06 00:00:00", + "start": "2015-04-05T22:00:00.000Z", + "end": "2015-04-06T22:00:00.000Z", + "name": "Lunes de Pascua", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, { "date": "2015-05-01 00:00:00", "start": "2015-04-30T22:00:00.000Z", @@ -80,11 +89,20 @@ "rule": "easter 49", "_weekday": "Sun" }, + { + "date": "2015-05-25 00:00:00", + "start": "2015-05-24T22:00:00.000Z", + "end": "2015-05-25T22:00:00.000Z", + "name": "Lunes de Pentecostés", + "type": "public", + "rule": "easter 50", + "_weekday": "Mon" + }, { "date": "2015-06-24 00:00:00", "start": "2015-06-23T22:00:00.000Z", "end": "2015-06-24T22:00:00.000Z", - "name": "Sant Joan", + "name": "San Juan", "type": "public", "rule": "06-24", "_weekday": "Wed" @@ -112,7 +130,7 @@ "date": "2015-09-11 00:00:00", "start": "2015-09-10T22:00:00.000Z", "end": "2015-09-11T22:00:00.000Z", - "name": "Diada de Catalunya", + "name": "Dia de Cataluña", "type": "public", "rule": "09-11", "_weekday": "Fri" @@ -195,8 +213,8 @@ "date": "2015-12-26 00:00:00", "start": "2015-12-25T23:00:00.000Z", "end": "2015-12-26T23:00:00.000Z", - "name": "Sant Esteve", - "type": "public", + "name": "San Esteban", + "type": "observance", "rule": "12-26", "_weekday": "Sat" } diff --git a/test/fixtures/ES-CT-2016.json b/test/fixtures/ES-CT-2016.json index 8df85f929..4a96a263e 100644 --- a/test/fixtures/ES-CT-2016.json +++ b/test/fixtures/ES-CT-2016.json @@ -53,6 +53,15 @@ "rule": "easter", "_weekday": "Sun" }, + { + "date": "2016-03-28 00:00:00", + "start": "2016-03-27T22:00:00.000Z", + "end": "2016-03-28T22:00:00.000Z", + "name": "Lunes de Pascua", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, { "date": "2016-05-01 00:00:00", "start": "2016-04-30T22:00:00.000Z", @@ -76,9 +85,9 @@ "start": "2016-05-01T22:00:00.000Z", "end": "2016-05-02T22:00:00.000Z", "name": "Día del trabajador (día sustituto)", - "type": "observance", + "type": "public", "substitute": true, - "rule": "substitutes 05-01 if sunday then next monday", + "rule": "substitutes 05-01 if Saturday, Sunday then next Monday", "_weekday": "Mon" }, { @@ -90,11 +99,20 @@ "rule": "easter 49", "_weekday": "Sun" }, + { + "date": "2016-05-16 00:00:00", + "start": "2016-05-15T22:00:00.000Z", + "end": "2016-05-16T22:00:00.000Z", + "name": "Lunes de Pentecostés", + "type": "public", + "rule": "easter 50", + "_weekday": "Mon" + }, { "date": "2016-06-24 00:00:00", "start": "2016-06-23T22:00:00.000Z", "end": "2016-06-24T22:00:00.000Z", - "name": "Sant Joan", + "name": "San Juan", "type": "public", "rule": "06-24", "_weekday": "Fri" @@ -122,7 +140,7 @@ "date": "2016-09-11 00:00:00", "start": "2016-09-10T22:00:00.000Z", "end": "2016-09-11T22:00:00.000Z", - "name": "Diada de Catalunya", + "name": "Dia de Cataluña", "type": "public", "rule": "09-11", "_weekday": "Sun" @@ -186,7 +204,7 @@ "start": "2016-12-25T23:00:00.000Z", "end": "2016-12-26T23:00:00.000Z", "name": "Navidad (día sustituto)", - "type": "observance", + "type": "public", "substitute": true, "rule": "substitutes 12-25 if sunday then next monday", "_weekday": "Mon" @@ -195,8 +213,8 @@ "date": "2016-12-26 00:00:00", "start": "2016-12-25T23:00:00.000Z", "end": "2016-12-26T23:00:00.000Z", - "name": "Sant Esteve", - "type": "public", + "name": "San Esteban", + "type": "observance", "rule": "12-26", "_weekday": "Mon" } diff --git a/test/fixtures/ES-CT-2017.json b/test/fixtures/ES-CT-2017.json index 38da8e73e..4288d6a83 100644 --- a/test/fixtures/ES-CT-2017.json +++ b/test/fixtures/ES-CT-2017.json @@ -63,6 +63,15 @@ "rule": "easter", "_weekday": "Sun" }, + { + "date": "2017-04-17 00:00:00", + "start": "2017-04-16T22:00:00.000Z", + "end": "2017-04-17T22:00:00.000Z", + "name": "Lunes de Pascua", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, { "date": "2017-05-01 00:00:00", "start": "2017-04-30T22:00:00.000Z", @@ -90,11 +99,20 @@ "rule": "easter 49", "_weekday": "Sun" }, + { + "date": "2017-06-05 00:00:00", + "start": "2017-06-04T22:00:00.000Z", + "end": "2017-06-05T22:00:00.000Z", + "name": "Lunes de Pentecostés", + "type": "public", + "rule": "easter 50", + "_weekday": "Mon" + }, { "date": "2017-06-24 00:00:00", "start": "2017-06-23T22:00:00.000Z", "end": "2017-06-24T22:00:00.000Z", - "name": "Sant Joan", + "name": "San Juan", "type": "public", "rule": "06-24", "_weekday": "Sat" @@ -122,7 +140,7 @@ "date": "2017-09-11 00:00:00", "start": "2017-09-10T22:00:00.000Z", "end": "2017-09-11T22:00:00.000Z", - "name": "Diada de Catalunya", + "name": "Dia de Cataluña", "type": "public", "rule": "09-11", "_weekday": "Mon" @@ -185,8 +203,8 @@ "date": "2017-12-26 00:00:00", "start": "2017-12-25T23:00:00.000Z", "end": "2017-12-26T23:00:00.000Z", - "name": "Sant Esteve", - "type": "public", + "name": "San Esteban", + "type": "observance", "rule": "12-26", "_weekday": "Tue" } diff --git a/test/fixtures/ES-CT-2018.json b/test/fixtures/ES-CT-2018.json index cc7c06999..262e0c321 100644 --- a/test/fixtures/ES-CT-2018.json +++ b/test/fixtures/ES-CT-2018.json @@ -53,6 +53,15 @@ "rule": "easter", "_weekday": "Sun" }, + { + "date": "2018-04-02 00:00:00", + "start": "2018-04-01T22:00:00.000Z", + "end": "2018-04-02T22:00:00.000Z", + "name": "Lunes de Pascua", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, { "date": "2018-05-01 00:00:00", "start": "2018-04-30T22:00:00.000Z", @@ -80,11 +89,20 @@ "rule": "easter 49", "_weekday": "Sun" }, + { + "date": "2018-05-21 00:00:00", + "start": "2018-05-20T22:00:00.000Z", + "end": "2018-05-21T22:00:00.000Z", + "name": "Lunes de Pentecostés", + "type": "public", + "rule": "easter 50", + "_weekday": "Mon" + }, { "date": "2018-06-24 00:00:00", "start": "2018-06-23T22:00:00.000Z", "end": "2018-06-24T22:00:00.000Z", - "name": "Sant Joan", + "name": "San Juan", "type": "public", "rule": "06-24", "_weekday": "Sun" @@ -112,7 +130,7 @@ "date": "2018-09-11 00:00:00", "start": "2018-09-10T22:00:00.000Z", "end": "2018-09-11T22:00:00.000Z", - "name": "Diada de Catalunya", + "name": "Dia de Cataluña", "type": "public", "rule": "09-11", "_weekday": "Tue" @@ -175,8 +193,8 @@ "date": "2018-12-26 00:00:00", "start": "2018-12-25T23:00:00.000Z", "end": "2018-12-26T23:00:00.000Z", - "name": "Sant Esteve", - "type": "public", + "name": "San Esteban", + "type": "observance", "rule": "12-26", "_weekday": "Wed" } diff --git a/test/fixtures/ES-CT-2019.json b/test/fixtures/ES-CT-2019.json index d764103a9..d9903e78c 100644 --- a/test/fixtures/ES-CT-2019.json +++ b/test/fixtures/ES-CT-2019.json @@ -63,6 +63,15 @@ "rule": "easter", "_weekday": "Sun" }, + { + "date": "2019-04-22 00:00:00", + "start": "2019-04-21T22:00:00.000Z", + "end": "2019-04-22T22:00:00.000Z", + "name": "Lunes de Pascua", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, { "date": "2019-05-01 00:00:00", "start": "2019-04-30T22:00:00.000Z", @@ -90,11 +99,20 @@ "rule": "easter 49", "_weekday": "Sun" }, + { + "date": "2019-06-10 00:00:00", + "start": "2019-06-09T22:00:00.000Z", + "end": "2019-06-10T22:00:00.000Z", + "name": "Lunes de Pentecostés", + "type": "public", + "rule": "easter 50", + "_weekday": "Mon" + }, { "date": "2019-06-24 00:00:00", "start": "2019-06-23T22:00:00.000Z", "end": "2019-06-24T22:00:00.000Z", - "name": "Sant Joan", + "name": "San Juan", "type": "public", "rule": "06-24", "_weekday": "Mon" @@ -122,7 +140,7 @@ "date": "2019-09-11 00:00:00", "start": "2019-09-10T22:00:00.000Z", "end": "2019-09-11T22:00:00.000Z", - "name": "Diada de Catalunya", + "name": "Dia de Cataluña", "type": "public", "rule": "09-11", "_weekday": "Wed" @@ -195,8 +213,8 @@ "date": "2019-12-26 00:00:00", "start": "2019-12-25T23:00:00.000Z", "end": "2019-12-26T23:00:00.000Z", - "name": "Sant Esteve", - "type": "public", + "name": "San Esteban", + "type": "observance", "rule": "12-26", "_weekday": "Thu" } diff --git a/test/fixtures/ES-CT-2020.json b/test/fixtures/ES-CT-2020.json index 28a61bb8a..f05ea333e 100644 --- a/test/fixtures/ES-CT-2020.json +++ b/test/fixtures/ES-CT-2020.json @@ -53,6 +53,15 @@ "rule": "easter", "_weekday": "Sun" }, + { + "date": "2020-04-13 00:00:00", + "start": "2020-04-12T22:00:00.000Z", + "end": "2020-04-13T22:00:00.000Z", + "name": "Lunes de Pascua", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, { "date": "2020-05-01 00:00:00", "start": "2020-04-30T22:00:00.000Z", @@ -80,11 +89,20 @@ "rule": "easter 49", "_weekday": "Sun" }, + { + "date": "2020-06-01 00:00:00", + "start": "2020-05-31T22:00:00.000Z", + "end": "2020-06-01T22:00:00.000Z", + "name": "Lunes de Pentecostés", + "type": "public", + "rule": "easter 50", + "_weekday": "Mon" + }, { "date": "2020-06-24 00:00:00", "start": "2020-06-23T22:00:00.000Z", "end": "2020-06-24T22:00:00.000Z", - "name": "Sant Joan", + "name": "San Juan", "type": "public", "rule": "06-24", "_weekday": "Wed" @@ -112,7 +130,7 @@ "date": "2020-09-11 00:00:00", "start": "2020-09-10T22:00:00.000Z", "end": "2020-09-11T22:00:00.000Z", - "name": "Diada de Catalunya", + "name": "Dia de Cataluña", "type": "public", "rule": "09-11", "_weekday": "Fri" @@ -195,8 +213,8 @@ "date": "2020-12-26 00:00:00", "start": "2020-12-25T23:00:00.000Z", "end": "2020-12-26T23:00:00.000Z", - "name": "Sant Esteve", - "type": "public", + "name": "San Esteban", + "type": "observance", "rule": "12-26", "_weekday": "Sat" } diff --git a/test/fixtures/ES-CT-2021.json b/test/fixtures/ES-CT-2021.json index 88105ef59..fd7f4c43a 100644 --- a/test/fixtures/ES-CT-2021.json +++ b/test/fixtures/ES-CT-2021.json @@ -53,6 +53,15 @@ "rule": "easter", "_weekday": "Sun" }, + { + "date": "2021-04-05 00:00:00", + "start": "2021-04-04T22:00:00.000Z", + "end": "2021-04-05T22:00:00.000Z", + "name": "Lunes de Pascua", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, { "date": "2021-05-01 00:00:00", "start": "2021-04-30T22:00:00.000Z", @@ -71,6 +80,16 @@ "rule": "1st sunday in May", "_weekday": "Sun" }, + { + "date": "2021-05-03 00:00:00", + "start": "2021-05-02T22:00:00.000Z", + "end": "2021-05-03T22:00:00.000Z", + "name": "Día del trabajador (día sustituto)", + "type": "public", + "substitute": true, + "rule": "substitutes 05-01 if Saturday, Sunday then next Monday", + "_weekday": "Mon" + }, { "date": "2021-05-23 00:00:00", "start": "2021-05-22T22:00:00.000Z", @@ -80,11 +99,20 @@ "rule": "easter 49", "_weekday": "Sun" }, + { + "date": "2021-05-24 00:00:00", + "start": "2021-05-23T22:00:00.000Z", + "end": "2021-05-24T22:00:00.000Z", + "name": "Lunes de Pentecostés", + "type": "public", + "rule": "easter 50", + "_weekday": "Mon" + }, { "date": "2021-06-24 00:00:00", "start": "2021-06-23T22:00:00.000Z", "end": "2021-06-24T22:00:00.000Z", - "name": "Sant Joan", + "name": "San Juan", "type": "public", "rule": "06-24", "_weekday": "Thu" @@ -108,21 +136,11 @@ "rule": "08-15", "_weekday": "Sun" }, - { - "date": "2021-08-16 00:00:00", - "start": "2021-08-15T22:00:00.000Z", - "end": "2021-08-16T22:00:00.000Z", - "name": "Asunción (día sustituto)", - "type": "observance", - "substitute": true, - "rule": "substitutes 08-15 if sunday then next monday", - "_weekday": "Mon" - }, { "date": "2021-09-11 00:00:00", "start": "2021-09-10T22:00:00.000Z", "end": "2021-09-11T22:00:00.000Z", - "name": "Diada de Catalunya", + "name": "Dia de Cataluña", "type": "public", "rule": "09-11", "_weekday": "Sat" @@ -185,8 +203,8 @@ "date": "2021-12-26 00:00:00", "start": "2021-12-25T23:00:00.000Z", "end": "2021-12-26T23:00:00.000Z", - "name": "Sant Esteve", - "type": "public", + "name": "San Esteban", + "type": "observance", "rule": "12-26", "_weekday": "Sun" } diff --git a/test/fixtures/ES-CT-2022.json b/test/fixtures/ES-CT-2022.json index d51cacaa9..06768a47a 100644 --- a/test/fixtures/ES-CT-2022.json +++ b/test/fixtures/ES-CT-2022.json @@ -53,6 +53,15 @@ "rule": "easter", "_weekday": "Sun" }, + { + "date": "2022-04-18 00:00:00", + "start": "2022-04-17T22:00:00.000Z", + "end": "2022-04-18T22:00:00.000Z", + "name": "Lunes de Pascua", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, { "date": "2022-05-01 00:00:00", "start": "2022-04-30T22:00:00.000Z", @@ -76,9 +85,9 @@ "start": "2022-05-01T22:00:00.000Z", "end": "2022-05-02T22:00:00.000Z", "name": "Día del trabajador (día sustituto)", - "type": "observance", + "type": "public", "substitute": true, - "rule": "substitutes 05-01 if sunday then next monday", + "rule": "substitutes 05-01 if Saturday, Sunday then next Monday", "_weekday": "Mon" }, { @@ -90,11 +99,20 @@ "rule": "easter 49", "_weekday": "Sun" }, + { + "date": "2022-06-06 00:00:00", + "start": "2022-06-05T22:00:00.000Z", + "end": "2022-06-06T22:00:00.000Z", + "name": "Lunes de Pentecostés", + "type": "public", + "rule": "easter 50", + "_weekday": "Mon" + }, { "date": "2022-06-24 00:00:00", "start": "2022-06-23T22:00:00.000Z", "end": "2022-06-24T22:00:00.000Z", - "name": "Sant Joan", + "name": "San Juan", "type": "public", "rule": "06-24", "_weekday": "Fri" @@ -122,7 +140,7 @@ "date": "2022-09-11 00:00:00", "start": "2022-09-10T22:00:00.000Z", "end": "2022-09-11T22:00:00.000Z", - "name": "Diada de Catalunya", + "name": "Dia de Cataluña", "type": "public", "rule": "09-11", "_weekday": "Sun" @@ -186,7 +204,7 @@ "start": "2022-12-25T23:00:00.000Z", "end": "2022-12-26T23:00:00.000Z", "name": "Navidad (día sustituto)", - "type": "observance", + "type": "public", "substitute": true, "rule": "substitutes 12-25 if sunday then next monday", "_weekday": "Mon" @@ -195,8 +213,8 @@ "date": "2022-12-26 00:00:00", "start": "2022-12-25T23:00:00.000Z", "end": "2022-12-26T23:00:00.000Z", - "name": "Sant Esteve", - "type": "public", + "name": "San Esteban", + "type": "observance", "rule": "12-26", "_weekday": "Mon" } diff --git a/test/fixtures/ES-CT-2023.json b/test/fixtures/ES-CT-2023.json index af722bf03..e2af5c8f6 100644 --- a/test/fixtures/ES-CT-2023.json +++ b/test/fixtures/ES-CT-2023.json @@ -63,6 +63,15 @@ "rule": "easter", "_weekday": "Sun" }, + { + "date": "2023-04-10 00:00:00", + "start": "2023-04-09T22:00:00.000Z", + "end": "2023-04-10T22:00:00.000Z", + "name": "Lunes de Pascua", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, { "date": "2023-05-01 00:00:00", "start": "2023-04-30T22:00:00.000Z", @@ -90,11 +99,20 @@ "rule": "easter 49", "_weekday": "Sun" }, + { + "date": "2023-05-29 00:00:00", + "start": "2023-05-28T22:00:00.000Z", + "end": "2023-05-29T22:00:00.000Z", + "name": "Lunes de Pentecostés", + "type": "public", + "rule": "easter 50", + "_weekday": "Mon" + }, { "date": "2023-06-24 00:00:00", "start": "2023-06-23T22:00:00.000Z", "end": "2023-06-24T22:00:00.000Z", - "name": "Sant Joan", + "name": "San Juan", "type": "public", "rule": "06-24", "_weekday": "Sat" @@ -122,7 +140,7 @@ "date": "2023-09-11 00:00:00", "start": "2023-09-10T22:00:00.000Z", "end": "2023-09-11T22:00:00.000Z", - "name": "Diada de Catalunya", + "name": "Dia de Cataluña", "type": "public", "rule": "09-11", "_weekday": "Mon" @@ -185,8 +203,8 @@ "date": "2023-12-26 00:00:00", "start": "2023-12-25T23:00:00.000Z", "end": "2023-12-26T23:00:00.000Z", - "name": "Sant Esteve", - "type": "public", + "name": "San Esteban", + "type": "observance", "rule": "12-26", "_weekday": "Tue" } diff --git a/test/fixtures/ES-CT-2024.json b/test/fixtures/ES-CT-2024.json index e65790616..ba83210b2 100644 --- a/test/fixtures/ES-CT-2024.json +++ b/test/fixtures/ES-CT-2024.json @@ -53,6 +53,15 @@ "rule": "easter", "_weekday": "Sun" }, + { + "date": "2024-04-01 00:00:00", + "start": "2024-03-31T22:00:00.000Z", + "end": "2024-04-01T22:00:00.000Z", + "name": "Lunes de Pascua", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, { "date": "2024-05-01 00:00:00", "start": "2024-04-30T22:00:00.000Z", @@ -80,11 +89,20 @@ "rule": "easter 49", "_weekday": "Sun" }, + { + "date": "2024-05-20 00:00:00", + "start": "2024-05-19T22:00:00.000Z", + "end": "2024-05-20T22:00:00.000Z", + "name": "Lunes de Pentecostés", + "type": "public", + "rule": "easter 50", + "_weekday": "Mon" + }, { "date": "2024-06-24 00:00:00", "start": "2024-06-23T22:00:00.000Z", "end": "2024-06-24T22:00:00.000Z", - "name": "Sant Joan", + "name": "San Juan", "type": "public", "rule": "06-24", "_weekday": "Mon" @@ -112,7 +130,7 @@ "date": "2024-09-11 00:00:00", "start": "2024-09-10T22:00:00.000Z", "end": "2024-09-11T22:00:00.000Z", - "name": "Diada de Catalunya", + "name": "Dia de Cataluña", "type": "public", "rule": "09-11", "_weekday": "Wed" @@ -185,8 +203,8 @@ "date": "2024-12-26 00:00:00", "start": "2024-12-25T23:00:00.000Z", "end": "2024-12-26T23:00:00.000Z", - "name": "Sant Esteve", - "type": "public", + "name": "San Esteban", + "type": "observance", "rule": "12-26", "_weekday": "Thu" } diff --git a/test/fixtures/ES-CT-2025.json b/test/fixtures/ES-CT-2025.json index 92efbec71..cb1375a0e 100644 --- a/test/fixtures/ES-CT-2025.json +++ b/test/fixtures/ES-CT-2025.json @@ -53,6 +53,15 @@ "rule": "easter", "_weekday": "Sun" }, + { + "date": "2025-04-21 00:00:00", + "start": "2025-04-20T22:00:00.000Z", + "end": "2025-04-21T22:00:00.000Z", + "name": "Lunes de Pascua", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, { "date": "2025-05-01 00:00:00", "start": "2025-04-30T22:00:00.000Z", @@ -80,11 +89,20 @@ "rule": "easter 49", "_weekday": "Sun" }, + { + "date": "2025-06-09 00:00:00", + "start": "2025-06-08T22:00:00.000Z", + "end": "2025-06-09T22:00:00.000Z", + "name": "Lunes de Pentecostés", + "type": "public", + "rule": "easter 50", + "_weekday": "Mon" + }, { "date": "2025-06-24 00:00:00", "start": "2025-06-23T22:00:00.000Z", "end": "2025-06-24T22:00:00.000Z", - "name": "Sant Joan", + "name": "San Juan", "type": "public", "rule": "06-24", "_weekday": "Tue" @@ -112,7 +130,7 @@ "date": "2025-09-11 00:00:00", "start": "2025-09-10T22:00:00.000Z", "end": "2025-09-11T22:00:00.000Z", - "name": "Diada de Catalunya", + "name": "Dia de Cataluña", "type": "public", "rule": "09-11", "_weekday": "Thu" @@ -185,8 +203,8 @@ "date": "2025-12-26 00:00:00", "start": "2025-12-25T23:00:00.000Z", "end": "2025-12-26T23:00:00.000Z", - "name": "Sant Esteve", - "type": "public", + "name": "San Esteban", + "type": "observance", "rule": "12-26", "_weekday": "Fri" } diff --git a/test/fixtures/ES-EX-2015.json b/test/fixtures/ES-EX-2015.json new file mode 100644 index 000000000..ce864f095 --- /dev/null +++ b/test/fixtures/ES-EX-2015.json @@ -0,0 +1,176 @@ +[ + { + "date": "2015-01-01 00:00:00", + "start": "2014-12-31T23:00:00.000Z", + "end": "2015-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Thu" + }, + { + "date": "2015-01-06 00:00:00", + "start": "2015-01-05T23:00:00.000Z", + "end": "2015-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Tue" + }, + { + "date": "2015-03-19 00:00:00", + "start": "2015-03-18T23:00:00.000Z", + "end": "2015-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Thu" + }, + { + "date": "2015-04-02 00:00:00", + "start": "2015-04-01T22:00:00.000Z", + "end": "2015-04-02T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2015-04-03 00:00:00", + "start": "2015-04-02T22:00:00.000Z", + "end": "2015-04-03T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2015-04-05 00:00:00", + "start": "2015-04-04T22:00:00.000Z", + "end": "2015-04-05T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2015-05-01 00:00:00", + "start": "2015-04-30T22:00:00.000Z", + "end": "2015-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Fri" + }, + { + "date": "2015-05-03 00:00:00", + "start": "2015-05-02T22:00:00.000Z", + "end": "2015-05-03T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2015-05-24 00:00:00", + "start": "2015-05-23T22:00:00.000Z", + "end": "2015-05-24T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2015-07-25 00:00:00", + "start": "2015-07-24T22:00:00.000Z", + "end": "2015-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Sat" + }, + { + "date": "2015-08-15 00:00:00", + "start": "2015-08-14T22:00:00.000Z", + "end": "2015-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Sat" + }, + { + "date": "2015-09-08 00:00:00", + "start": "2015-09-07T22:00:00.000Z", + "end": "2015-09-08T22:00:00.000Z", + "name": "Día de Extremadura", + "type": "public", + "rule": "09-08", + "_weekday": "Tue" + }, + { + "date": "2015-10-12 00:00:00", + "start": "2015-10-11T22:00:00.000Z", + "end": "2015-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Mon" + }, + { + "date": "2015-11-01 00:00:00", + "start": "2015-10-31T23:00:00.000Z", + "end": "2015-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Sun" + }, + { + "date": "2015-11-02 00:00:00", + "start": "2015-11-01T23:00:00.000Z", + "end": "2015-11-02T23:00:00.000Z", + "name": "Todos los Santos (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 11-01 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2015-12-06 00:00:00", + "start": "2015-12-05T23:00:00.000Z", + "end": "2015-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Sun" + }, + { + "date": "2015-12-07 00:00:00", + "start": "2015-12-06T23:00:00.000Z", + "end": "2015-12-07T23:00:00.000Z", + "name": "Día de la Constitución Española (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 12-06 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2015-12-08 00:00:00", + "start": "2015-12-07T23:00:00.000Z", + "end": "2015-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Tue" + }, + { + "date": "2015-12-25 00:00:00", + "start": "2015-12-24T23:00:00.000Z", + "end": "2015-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Fri" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-EX-2016.json b/test/fixtures/ES-EX-2016.json new file mode 100644 index 000000000..bab333060 --- /dev/null +++ b/test/fixtures/ES-EX-2016.json @@ -0,0 +1,176 @@ +[ + { + "date": "2016-01-01 00:00:00", + "start": "2015-12-31T23:00:00.000Z", + "end": "2016-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Fri" + }, + { + "date": "2016-01-06 00:00:00", + "start": "2016-01-05T23:00:00.000Z", + "end": "2016-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Wed" + }, + { + "date": "2016-03-19 00:00:00", + "start": "2016-03-18T23:00:00.000Z", + "end": "2016-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Sat" + }, + { + "date": "2016-03-24 00:00:00", + "start": "2016-03-23T23:00:00.000Z", + "end": "2016-03-24T23:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2016-03-25 00:00:00", + "start": "2016-03-24T23:00:00.000Z", + "end": "2016-03-25T23:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2016-03-27 00:00:00", + "start": "2016-03-26T23:00:00.000Z", + "end": "2016-03-27T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2016-05-01 00:00:00", + "start": "2016-04-30T22:00:00.000Z", + "end": "2016-05-01T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2016-05-01 00:00:00", + "start": "2016-04-30T22:00:00.000Z", + "end": "2016-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Sun" + }, + { + "date": "2016-05-02 00:00:00", + "start": "2016-05-01T22:00:00.000Z", + "end": "2016-05-02T22:00:00.000Z", + "name": "Día del trabajador (día sustituto)", + "type": "public", + "substitute": true, + "rule": "substitutes 05-01 if Sunday then next Monday", + "_weekday": "Mon" + }, + { + "date": "2016-05-15 00:00:00", + "start": "2016-05-14T22:00:00.000Z", + "end": "2016-05-15T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2016-07-25 00:00:00", + "start": "2016-07-24T22:00:00.000Z", + "end": "2016-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Mon" + }, + { + "date": "2016-08-15 00:00:00", + "start": "2016-08-14T22:00:00.000Z", + "end": "2016-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Mon" + }, + { + "date": "2016-09-08 00:00:00", + "start": "2016-09-07T22:00:00.000Z", + "end": "2016-09-08T22:00:00.000Z", + "name": "Día de Extremadura", + "type": "public", + "rule": "09-08", + "_weekday": "Thu" + }, + { + "date": "2016-10-12 00:00:00", + "start": "2016-10-11T22:00:00.000Z", + "end": "2016-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Wed" + }, + { + "date": "2016-11-01 00:00:00", + "start": "2016-10-31T23:00:00.000Z", + "end": "2016-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Tue" + }, + { + "date": "2016-12-06 00:00:00", + "start": "2016-12-05T23:00:00.000Z", + "end": "2016-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Tue" + }, + { + "date": "2016-12-08 00:00:00", + "start": "2016-12-07T23:00:00.000Z", + "end": "2016-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Thu" + }, + { + "date": "2016-12-25 00:00:00", + "start": "2016-12-24T23:00:00.000Z", + "end": "2016-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Sun" + }, + { + "date": "2016-12-26 00:00:00", + "start": "2016-12-25T23:00:00.000Z", + "end": "2016-12-26T23:00:00.000Z", + "name": "Navidad (día sustituto)", + "type": "public", + "substitute": true, + "rule": "substitutes 12-25 if sunday then next monday", + "_weekday": "Mon" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-EX-2017.json b/test/fixtures/ES-EX-2017.json new file mode 100644 index 000000000..70faf447d --- /dev/null +++ b/test/fixtures/ES-EX-2017.json @@ -0,0 +1,166 @@ +[ + { + "date": "2017-01-01 00:00:00", + "start": "2016-12-31T23:00:00.000Z", + "end": "2017-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Sun" + }, + { + "date": "2017-01-02 00:00:00", + "start": "2017-01-01T23:00:00.000Z", + "end": "2017-01-02T23:00:00.000Z", + "name": "Año Nuevo (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 01-01 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2017-01-06 00:00:00", + "start": "2017-01-05T23:00:00.000Z", + "end": "2017-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Fri" + }, + { + "date": "2017-03-19 00:00:00", + "start": "2017-03-18T23:00:00.000Z", + "end": "2017-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Sun" + }, + { + "date": "2017-04-13 00:00:00", + "start": "2017-04-12T22:00:00.000Z", + "end": "2017-04-13T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2017-04-14 00:00:00", + "start": "2017-04-13T22:00:00.000Z", + "end": "2017-04-14T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2017-04-16 00:00:00", + "start": "2017-04-15T22:00:00.000Z", + "end": "2017-04-16T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2017-05-01 00:00:00", + "start": "2017-04-30T22:00:00.000Z", + "end": "2017-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Mon" + }, + { + "date": "2017-05-07 00:00:00", + "start": "2017-05-06T22:00:00.000Z", + "end": "2017-05-07T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2017-06-04 00:00:00", + "start": "2017-06-03T22:00:00.000Z", + "end": "2017-06-04T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2017-07-25 00:00:00", + "start": "2017-07-24T22:00:00.000Z", + "end": "2017-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Tue" + }, + { + "date": "2017-08-15 00:00:00", + "start": "2017-08-14T22:00:00.000Z", + "end": "2017-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Tue" + }, + { + "date": "2017-09-08 00:00:00", + "start": "2017-09-07T22:00:00.000Z", + "end": "2017-09-08T22:00:00.000Z", + "name": "Día de Extremadura", + "type": "public", + "rule": "09-08", + "_weekday": "Fri" + }, + { + "date": "2017-10-12 00:00:00", + "start": "2017-10-11T22:00:00.000Z", + "end": "2017-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Thu" + }, + { + "date": "2017-11-01 00:00:00", + "start": "2017-10-31T23:00:00.000Z", + "end": "2017-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Wed" + }, + { + "date": "2017-12-06 00:00:00", + "start": "2017-12-05T23:00:00.000Z", + "end": "2017-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Wed" + }, + { + "date": "2017-12-08 00:00:00", + "start": "2017-12-07T23:00:00.000Z", + "end": "2017-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Fri" + }, + { + "date": "2017-12-25 00:00:00", + "start": "2017-12-24T23:00:00.000Z", + "end": "2017-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Mon" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-EX-2018.json b/test/fixtures/ES-EX-2018.json new file mode 100644 index 000000000..b03cc2b27 --- /dev/null +++ b/test/fixtures/ES-EX-2018.json @@ -0,0 +1,156 @@ +[ + { + "date": "2018-01-01 00:00:00", + "start": "2017-12-31T23:00:00.000Z", + "end": "2018-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Mon" + }, + { + "date": "2018-01-06 00:00:00", + "start": "2018-01-05T23:00:00.000Z", + "end": "2018-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Sat" + }, + { + "date": "2018-03-19 00:00:00", + "start": "2018-03-18T23:00:00.000Z", + "end": "2018-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Mon" + }, + { + "date": "2018-03-29 00:00:00", + "start": "2018-03-28T22:00:00.000Z", + "end": "2018-03-29T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2018-03-30 00:00:00", + "start": "2018-03-29T22:00:00.000Z", + "end": "2018-03-30T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2018-04-01 00:00:00", + "start": "2018-03-31T22:00:00.000Z", + "end": "2018-04-01T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2018-05-01 00:00:00", + "start": "2018-04-30T22:00:00.000Z", + "end": "2018-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Tue" + }, + { + "date": "2018-05-06 00:00:00", + "start": "2018-05-05T22:00:00.000Z", + "end": "2018-05-06T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2018-05-20 00:00:00", + "start": "2018-05-19T22:00:00.000Z", + "end": "2018-05-20T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2018-07-25 00:00:00", + "start": "2018-07-24T22:00:00.000Z", + "end": "2018-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Wed" + }, + { + "date": "2018-08-15 00:00:00", + "start": "2018-08-14T22:00:00.000Z", + "end": "2018-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Wed" + }, + { + "date": "2018-09-08 00:00:00", + "start": "2018-09-07T22:00:00.000Z", + "end": "2018-09-08T22:00:00.000Z", + "name": "Día de Extremadura", + "type": "public", + "rule": "09-08", + "_weekday": "Sat" + }, + { + "date": "2018-10-12 00:00:00", + "start": "2018-10-11T22:00:00.000Z", + "end": "2018-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Fri" + }, + { + "date": "2018-11-01 00:00:00", + "start": "2018-10-31T23:00:00.000Z", + "end": "2018-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Thu" + }, + { + "date": "2018-12-06 00:00:00", + "start": "2018-12-05T23:00:00.000Z", + "end": "2018-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Thu" + }, + { + "date": "2018-12-08 00:00:00", + "start": "2018-12-07T23:00:00.000Z", + "end": "2018-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Sat" + }, + { + "date": "2018-12-25 00:00:00", + "start": "2018-12-24T23:00:00.000Z", + "end": "2018-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Tue" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-EX-2019.json b/test/fixtures/ES-EX-2019.json new file mode 100644 index 000000000..10a98d8e5 --- /dev/null +++ b/test/fixtures/ES-EX-2019.json @@ -0,0 +1,186 @@ +[ + { + "date": "2019-01-01 00:00:00", + "start": "2018-12-31T23:00:00.000Z", + "end": "2019-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Tue" + }, + { + "date": "2019-01-06 00:00:00", + "start": "2019-01-05T23:00:00.000Z", + "end": "2019-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Sun" + }, + { + "date": "2019-01-07 00:00:00", + "start": "2019-01-06T23:00:00.000Z", + "end": "2019-01-07T23:00:00.000Z", + "name": "Día de los Reyes Magos (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 01-06 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2019-03-19 00:00:00", + "start": "2019-03-18T23:00:00.000Z", + "end": "2019-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Tue" + }, + { + "date": "2019-04-18 00:00:00", + "start": "2019-04-17T22:00:00.000Z", + "end": "2019-04-18T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2019-04-19 00:00:00", + "start": "2019-04-18T22:00:00.000Z", + "end": "2019-04-19T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2019-04-21 00:00:00", + "start": "2019-04-20T22:00:00.000Z", + "end": "2019-04-21T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2019-05-01 00:00:00", + "start": "2019-04-30T22:00:00.000Z", + "end": "2019-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Wed" + }, + { + "date": "2019-05-05 00:00:00", + "start": "2019-05-04T22:00:00.000Z", + "end": "2019-05-05T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2019-06-09 00:00:00", + "start": "2019-06-08T22:00:00.000Z", + "end": "2019-06-09T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2019-07-25 00:00:00", + "start": "2019-07-24T22:00:00.000Z", + "end": "2019-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Thu" + }, + { + "date": "2019-08-15 00:00:00", + "start": "2019-08-14T22:00:00.000Z", + "end": "2019-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Thu" + }, + { + "date": "2019-09-08 00:00:00", + "start": "2019-09-07T22:00:00.000Z", + "end": "2019-09-08T22:00:00.000Z", + "name": "Día de Extremadura", + "type": "public", + "rule": "09-08", + "_weekday": "Sun" + }, + { + "date": "2019-09-09 00:00:00", + "start": "2019-09-08T22:00:00.000Z", + "end": "2019-09-09T22:00:00.000Z", + "name": "Día de Extremadura", + "type": "public", + "substitute": true, + "rule": "substitutes 09-08 if Sunday then next Monday", + "_weekday": "Mon" + }, + { + "date": "2019-10-12 00:00:00", + "start": "2019-10-11T22:00:00.000Z", + "end": "2019-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Sat" + }, + { + "date": "2019-11-01 00:00:00", + "start": "2019-10-31T23:00:00.000Z", + "end": "2019-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Fri" + }, + { + "date": "2019-12-06 00:00:00", + "start": "2019-12-05T23:00:00.000Z", + "end": "2019-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Fri" + }, + { + "date": "2019-12-08 00:00:00", + "start": "2019-12-07T23:00:00.000Z", + "end": "2019-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Sun" + }, + { + "date": "2019-12-09 00:00:00", + "start": "2019-12-08T23:00:00.000Z", + "end": "2019-12-09T23:00:00.000Z", + "name": "La inmaculada concepción (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 12-08 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2019-12-25 00:00:00", + "start": "2019-12-24T23:00:00.000Z", + "end": "2019-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Wed" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-EX-2020.json b/test/fixtures/ES-EX-2020.json new file mode 100644 index 000000000..313915348 --- /dev/null +++ b/test/fixtures/ES-EX-2020.json @@ -0,0 +1,176 @@ +[ + { + "date": "2020-01-01 00:00:00", + "start": "2019-12-31T23:00:00.000Z", + "end": "2020-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Wed" + }, + { + "date": "2020-01-06 00:00:00", + "start": "2020-01-05T23:00:00.000Z", + "end": "2020-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Mon" + }, + { + "date": "2020-03-19 00:00:00", + "start": "2020-03-18T23:00:00.000Z", + "end": "2020-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Thu" + }, + { + "date": "2020-04-09 00:00:00", + "start": "2020-04-08T22:00:00.000Z", + "end": "2020-04-09T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2020-04-10 00:00:00", + "start": "2020-04-09T22:00:00.000Z", + "end": "2020-04-10T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2020-04-12 00:00:00", + "start": "2020-04-11T22:00:00.000Z", + "end": "2020-04-12T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2020-05-01 00:00:00", + "start": "2020-04-30T22:00:00.000Z", + "end": "2020-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Fri" + }, + { + "date": "2020-05-03 00:00:00", + "start": "2020-05-02T22:00:00.000Z", + "end": "2020-05-03T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2020-05-31 00:00:00", + "start": "2020-05-30T22:00:00.000Z", + "end": "2020-05-31T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2020-07-25 00:00:00", + "start": "2020-07-24T22:00:00.000Z", + "end": "2020-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Sat" + }, + { + "date": "2020-08-15 00:00:00", + "start": "2020-08-14T22:00:00.000Z", + "end": "2020-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Sat" + }, + { + "date": "2020-09-08 00:00:00", + "start": "2020-09-07T22:00:00.000Z", + "end": "2020-09-08T22:00:00.000Z", + "name": "Día de Extremadura", + "type": "public", + "rule": "09-08", + "_weekday": "Tue" + }, + { + "date": "2020-10-12 00:00:00", + "start": "2020-10-11T22:00:00.000Z", + "end": "2020-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Mon" + }, + { + "date": "2020-11-01 00:00:00", + "start": "2020-10-31T23:00:00.000Z", + "end": "2020-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Sun" + }, + { + "date": "2020-11-02 00:00:00", + "start": "2020-11-01T23:00:00.000Z", + "end": "2020-11-02T23:00:00.000Z", + "name": "Todos los Santos (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 11-01 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2020-12-06 00:00:00", + "start": "2020-12-05T23:00:00.000Z", + "end": "2020-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Sun" + }, + { + "date": "2020-12-07 00:00:00", + "start": "2020-12-06T23:00:00.000Z", + "end": "2020-12-07T23:00:00.000Z", + "name": "Día de la Constitución Española (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 12-06 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2020-12-08 00:00:00", + "start": "2020-12-07T23:00:00.000Z", + "end": "2020-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Tue" + }, + { + "date": "2020-12-25 00:00:00", + "start": "2020-12-24T23:00:00.000Z", + "end": "2020-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Fri" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-EX-2021.json b/test/fixtures/ES-EX-2021.json new file mode 100644 index 000000000..f5d9d287d --- /dev/null +++ b/test/fixtures/ES-EX-2021.json @@ -0,0 +1,156 @@ +[ + { + "date": "2021-01-01 00:00:00", + "start": "2020-12-31T23:00:00.000Z", + "end": "2021-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Fri" + }, + { + "date": "2021-01-06 00:00:00", + "start": "2021-01-05T23:00:00.000Z", + "end": "2021-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Wed" + }, + { + "date": "2021-03-19 00:00:00", + "start": "2021-03-18T23:00:00.000Z", + "end": "2021-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Fri" + }, + { + "date": "2021-04-01 00:00:00", + "start": "2021-03-31T22:00:00.000Z", + "end": "2021-04-01T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2021-04-02 00:00:00", + "start": "2021-04-01T22:00:00.000Z", + "end": "2021-04-02T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2021-04-04 00:00:00", + "start": "2021-04-03T22:00:00.000Z", + "end": "2021-04-04T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2021-05-01 00:00:00", + "start": "2021-04-30T22:00:00.000Z", + "end": "2021-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Sat" + }, + { + "date": "2021-05-02 00:00:00", + "start": "2021-05-01T22:00:00.000Z", + "end": "2021-05-02T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2021-05-23 00:00:00", + "start": "2021-05-22T22:00:00.000Z", + "end": "2021-05-23T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2021-07-25 00:00:00", + "start": "2021-07-24T22:00:00.000Z", + "end": "2021-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Sun" + }, + { + "date": "2021-08-15 00:00:00", + "start": "2021-08-14T22:00:00.000Z", + "end": "2021-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Sun" + }, + { + "date": "2021-09-08 00:00:00", + "start": "2021-09-07T22:00:00.000Z", + "end": "2021-09-08T22:00:00.000Z", + "name": "Día de Extremadura", + "type": "public", + "rule": "09-08", + "_weekday": "Wed" + }, + { + "date": "2021-10-12 00:00:00", + "start": "2021-10-11T22:00:00.000Z", + "end": "2021-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Tue" + }, + { + "date": "2021-11-01 00:00:00", + "start": "2021-10-31T23:00:00.000Z", + "end": "2021-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Mon" + }, + { + "date": "2021-12-06 00:00:00", + "start": "2021-12-05T23:00:00.000Z", + "end": "2021-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Mon" + }, + { + "date": "2021-12-08 00:00:00", + "start": "2021-12-07T23:00:00.000Z", + "end": "2021-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Wed" + }, + { + "date": "2021-12-25 00:00:00", + "start": "2021-12-24T23:00:00.000Z", + "end": "2021-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Sat" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-EX-2022.json b/test/fixtures/ES-EX-2022.json new file mode 100644 index 000000000..9d718849d --- /dev/null +++ b/test/fixtures/ES-EX-2022.json @@ -0,0 +1,176 @@ +[ + { + "date": "2022-01-01 00:00:00", + "start": "2021-12-31T23:00:00.000Z", + "end": "2022-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Sat" + }, + { + "date": "2022-01-06 00:00:00", + "start": "2022-01-05T23:00:00.000Z", + "end": "2022-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Thu" + }, + { + "date": "2022-03-19 00:00:00", + "start": "2022-03-18T23:00:00.000Z", + "end": "2022-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Sat" + }, + { + "date": "2022-04-14 00:00:00", + "start": "2022-04-13T22:00:00.000Z", + "end": "2022-04-14T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2022-04-15 00:00:00", + "start": "2022-04-14T22:00:00.000Z", + "end": "2022-04-15T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2022-04-17 00:00:00", + "start": "2022-04-16T22:00:00.000Z", + "end": "2022-04-17T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2022-05-01 00:00:00", + "start": "2022-04-30T22:00:00.000Z", + "end": "2022-05-01T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2022-05-01 00:00:00", + "start": "2022-04-30T22:00:00.000Z", + "end": "2022-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Sun" + }, + { + "date": "2022-05-02 00:00:00", + "start": "2022-05-01T22:00:00.000Z", + "end": "2022-05-02T22:00:00.000Z", + "name": "Día del trabajador (día sustituto)", + "type": "public", + "substitute": true, + "rule": "substitutes 05-01 if Sunday then next Monday", + "_weekday": "Mon" + }, + { + "date": "2022-06-05 00:00:00", + "start": "2022-06-04T22:00:00.000Z", + "end": "2022-06-05T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2022-07-25 00:00:00", + "start": "2022-07-24T22:00:00.000Z", + "end": "2022-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Mon" + }, + { + "date": "2022-08-15 00:00:00", + "start": "2022-08-14T22:00:00.000Z", + "end": "2022-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Mon" + }, + { + "date": "2022-09-08 00:00:00", + "start": "2022-09-07T22:00:00.000Z", + "end": "2022-09-08T22:00:00.000Z", + "name": "Día de Extremadura", + "type": "public", + "rule": "09-08", + "_weekday": "Thu" + }, + { + "date": "2022-10-12 00:00:00", + "start": "2022-10-11T22:00:00.000Z", + "end": "2022-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Wed" + }, + { + "date": "2022-11-01 00:00:00", + "start": "2022-10-31T23:00:00.000Z", + "end": "2022-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Tue" + }, + { + "date": "2022-12-06 00:00:00", + "start": "2022-12-05T23:00:00.000Z", + "end": "2022-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Tue" + }, + { + "date": "2022-12-08 00:00:00", + "start": "2022-12-07T23:00:00.000Z", + "end": "2022-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Thu" + }, + { + "date": "2022-12-25 00:00:00", + "start": "2022-12-24T23:00:00.000Z", + "end": "2022-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Sun" + }, + { + "date": "2022-12-26 00:00:00", + "start": "2022-12-25T23:00:00.000Z", + "end": "2022-12-26T23:00:00.000Z", + "name": "Navidad (día sustituto)", + "type": "public", + "substitute": true, + "rule": "substitutes 12-25 if sunday then next monday", + "_weekday": "Mon" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-EX-2023.json b/test/fixtures/ES-EX-2023.json new file mode 100644 index 000000000..2a3b33be3 --- /dev/null +++ b/test/fixtures/ES-EX-2023.json @@ -0,0 +1,166 @@ +[ + { + "date": "2023-01-01 00:00:00", + "start": "2022-12-31T23:00:00.000Z", + "end": "2023-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Sun" + }, + { + "date": "2023-01-02 00:00:00", + "start": "2023-01-01T23:00:00.000Z", + "end": "2023-01-02T23:00:00.000Z", + "name": "Año Nuevo (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 01-01 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2023-01-06 00:00:00", + "start": "2023-01-05T23:00:00.000Z", + "end": "2023-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Fri" + }, + { + "date": "2023-03-19 00:00:00", + "start": "2023-03-18T23:00:00.000Z", + "end": "2023-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Sun" + }, + { + "date": "2023-04-06 00:00:00", + "start": "2023-04-05T22:00:00.000Z", + "end": "2023-04-06T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2023-04-07 00:00:00", + "start": "2023-04-06T22:00:00.000Z", + "end": "2023-04-07T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2023-04-09 00:00:00", + "start": "2023-04-08T22:00:00.000Z", + "end": "2023-04-09T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2023-05-01 00:00:00", + "start": "2023-04-30T22:00:00.000Z", + "end": "2023-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Mon" + }, + { + "date": "2023-05-07 00:00:00", + "start": "2023-05-06T22:00:00.000Z", + "end": "2023-05-07T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2023-05-28 00:00:00", + "start": "2023-05-27T22:00:00.000Z", + "end": "2023-05-28T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2023-07-25 00:00:00", + "start": "2023-07-24T22:00:00.000Z", + "end": "2023-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Tue" + }, + { + "date": "2023-08-15 00:00:00", + "start": "2023-08-14T22:00:00.000Z", + "end": "2023-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Tue" + }, + { + "date": "2023-09-08 00:00:00", + "start": "2023-09-07T22:00:00.000Z", + "end": "2023-09-08T22:00:00.000Z", + "name": "Día de Extremadura", + "type": "public", + "rule": "09-08", + "_weekday": "Fri" + }, + { + "date": "2023-10-12 00:00:00", + "start": "2023-10-11T22:00:00.000Z", + "end": "2023-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Thu" + }, + { + "date": "2023-11-01 00:00:00", + "start": "2023-10-31T23:00:00.000Z", + "end": "2023-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Wed" + }, + { + "date": "2023-12-06 00:00:00", + "start": "2023-12-05T23:00:00.000Z", + "end": "2023-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Wed" + }, + { + "date": "2023-12-08 00:00:00", + "start": "2023-12-07T23:00:00.000Z", + "end": "2023-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Fri" + }, + { + "date": "2023-12-25 00:00:00", + "start": "2023-12-24T23:00:00.000Z", + "end": "2023-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Mon" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-EX-2024.json b/test/fixtures/ES-EX-2024.json new file mode 100644 index 000000000..d971b8e95 --- /dev/null +++ b/test/fixtures/ES-EX-2024.json @@ -0,0 +1,176 @@ +[ + { + "date": "2024-01-01 00:00:00", + "start": "2023-12-31T23:00:00.000Z", + "end": "2024-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Mon" + }, + { + "date": "2024-01-06 00:00:00", + "start": "2024-01-05T23:00:00.000Z", + "end": "2024-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Sat" + }, + { + "date": "2024-03-19 00:00:00", + "start": "2024-03-18T23:00:00.000Z", + "end": "2024-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Tue" + }, + { + "date": "2024-03-28 00:00:00", + "start": "2024-03-27T23:00:00.000Z", + "end": "2024-03-28T23:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2024-03-29 00:00:00", + "start": "2024-03-28T23:00:00.000Z", + "end": "2024-03-29T23:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2024-03-31 00:00:00", + "start": "2024-03-30T23:00:00.000Z", + "end": "2024-03-31T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2024-05-01 00:00:00", + "start": "2024-04-30T22:00:00.000Z", + "end": "2024-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Wed" + }, + { + "date": "2024-05-05 00:00:00", + "start": "2024-05-04T22:00:00.000Z", + "end": "2024-05-05T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2024-05-19 00:00:00", + "start": "2024-05-18T22:00:00.000Z", + "end": "2024-05-19T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2024-07-25 00:00:00", + "start": "2024-07-24T22:00:00.000Z", + "end": "2024-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Thu" + }, + { + "date": "2024-08-15 00:00:00", + "start": "2024-08-14T22:00:00.000Z", + "end": "2024-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Thu" + }, + { + "date": "2024-09-08 00:00:00", + "start": "2024-09-07T22:00:00.000Z", + "end": "2024-09-08T22:00:00.000Z", + "name": "Día de Extremadura", + "type": "public", + "rule": "09-08", + "_weekday": "Sun" + }, + { + "date": "2024-09-09 00:00:00", + "start": "2024-09-08T22:00:00.000Z", + "end": "2024-09-09T22:00:00.000Z", + "name": "Día de Extremadura", + "type": "public", + "substitute": true, + "rule": "substitutes 09-08 if Sunday then next Monday", + "_weekday": "Mon" + }, + { + "date": "2024-10-12 00:00:00", + "start": "2024-10-11T22:00:00.000Z", + "end": "2024-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Sat" + }, + { + "date": "2024-11-01 00:00:00", + "start": "2024-10-31T23:00:00.000Z", + "end": "2024-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Fri" + }, + { + "date": "2024-12-06 00:00:00", + "start": "2024-12-05T23:00:00.000Z", + "end": "2024-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Fri" + }, + { + "date": "2024-12-08 00:00:00", + "start": "2024-12-07T23:00:00.000Z", + "end": "2024-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Sun" + }, + { + "date": "2024-12-09 00:00:00", + "start": "2024-12-08T23:00:00.000Z", + "end": "2024-12-09T23:00:00.000Z", + "name": "La inmaculada concepción (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 12-08 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2024-12-25 00:00:00", + "start": "2024-12-24T23:00:00.000Z", + "end": "2024-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Wed" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-EX-2025.json b/test/fixtures/ES-EX-2025.json new file mode 100644 index 000000000..f6c398d42 --- /dev/null +++ b/test/fixtures/ES-EX-2025.json @@ -0,0 +1,166 @@ +[ + { + "date": "2025-01-01 00:00:00", + "start": "2024-12-31T23:00:00.000Z", + "end": "2025-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Wed" + }, + { + "date": "2025-01-06 00:00:00", + "start": "2025-01-05T23:00:00.000Z", + "end": "2025-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Mon" + }, + { + "date": "2025-03-19 00:00:00", + "start": "2025-03-18T23:00:00.000Z", + "end": "2025-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Wed" + }, + { + "date": "2025-04-17 00:00:00", + "start": "2025-04-16T22:00:00.000Z", + "end": "2025-04-17T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2025-04-18 00:00:00", + "start": "2025-04-17T22:00:00.000Z", + "end": "2025-04-18T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2025-04-20 00:00:00", + "start": "2025-04-19T22:00:00.000Z", + "end": "2025-04-20T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2025-05-01 00:00:00", + "start": "2025-04-30T22:00:00.000Z", + "end": "2025-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Thu" + }, + { + "date": "2025-05-04 00:00:00", + "start": "2025-05-03T22:00:00.000Z", + "end": "2025-05-04T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2025-06-08 00:00:00", + "start": "2025-06-07T22:00:00.000Z", + "end": "2025-06-08T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2025-07-25 00:00:00", + "start": "2025-07-24T22:00:00.000Z", + "end": "2025-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Fri" + }, + { + "date": "2025-08-15 00:00:00", + "start": "2025-08-14T22:00:00.000Z", + "end": "2025-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Fri" + }, + { + "date": "2025-09-08 00:00:00", + "start": "2025-09-07T22:00:00.000Z", + "end": "2025-09-08T22:00:00.000Z", + "name": "Día de Extremadura", + "type": "public", + "rule": "09-08", + "_weekday": "Mon" + }, + { + "date": "2025-10-12 00:00:00", + "start": "2025-10-11T22:00:00.000Z", + "end": "2025-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Sun" + }, + { + "date": "2025-10-13 00:00:00", + "start": "2025-10-12T22:00:00.000Z", + "end": "2025-10-13T22:00:00.000Z", + "name": "Fiesta Nacional de España (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 10-12 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2025-11-01 00:00:00", + "start": "2025-10-31T23:00:00.000Z", + "end": "2025-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Sat" + }, + { + "date": "2025-12-06 00:00:00", + "start": "2025-12-05T23:00:00.000Z", + "end": "2025-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Sat" + }, + { + "date": "2025-12-08 00:00:00", + "start": "2025-12-07T23:00:00.000Z", + "end": "2025-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Mon" + }, + { + "date": "2025-12-25 00:00:00", + "start": "2025-12-24T23:00:00.000Z", + "end": "2025-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Thu" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-GA-2015.json b/test/fixtures/ES-GA-2015.json new file mode 100644 index 000000000..334213741 --- /dev/null +++ b/test/fixtures/ES-GA-2015.json @@ -0,0 +1,186 @@ +[ + { + "date": "2015-01-01 00:00:00", + "start": "2014-12-31T23:00:00.000Z", + "end": "2015-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Thu" + }, + { + "date": "2015-01-06 00:00:00", + "start": "2015-01-05T23:00:00.000Z", + "end": "2015-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Tue" + }, + { + "date": "2015-03-19 00:00:00", + "start": "2015-03-18T23:00:00.000Z", + "end": "2015-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Thu" + }, + { + "date": "2015-04-02 00:00:00", + "start": "2015-04-01T22:00:00.000Z", + "end": "2015-04-02T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2015-04-03 00:00:00", + "start": "2015-04-02T22:00:00.000Z", + "end": "2015-04-03T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2015-04-05 00:00:00", + "start": "2015-04-04T22:00:00.000Z", + "end": "2015-04-05T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2015-05-01 00:00:00", + "start": "2015-04-30T22:00:00.000Z", + "end": "2015-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Fri" + }, + { + "date": "2015-05-03 00:00:00", + "start": "2015-05-02T22:00:00.000Z", + "end": "2015-05-03T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2015-05-17 00:00:00", + "start": "2015-05-16T22:00:00.000Z", + "end": "2015-05-17T22:00:00.000Z", + "name": "Día de las Letras Gallegas", + "type": "public", + "rule": "05-17", + "_weekday": "Sun" + }, + { + "date": "2015-05-18 00:00:00", + "start": "2015-05-17T22:00:00.000Z", + "end": "2015-05-18T22:00:00.000Z", + "name": "Día de las Letras Gallegas", + "type": "public", + "substitute": true, + "rule": "substitutes 05-17 if Sunday then next Monday", + "_weekday": "Mon" + }, + { + "date": "2015-05-24 00:00:00", + "start": "2015-05-23T22:00:00.000Z", + "end": "2015-05-24T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2015-07-25 00:00:00", + "start": "2015-07-24T22:00:00.000Z", + "end": "2015-07-25T22:00:00.000Z", + "name": "Día Nacional de Galicia", + "type": "public", + "note": "regional", + "rule": "07-25", + "_weekday": "Sat" + }, + { + "date": "2015-08-15 00:00:00", + "start": "2015-08-14T22:00:00.000Z", + "end": "2015-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Sat" + }, + { + "date": "2015-10-12 00:00:00", + "start": "2015-10-11T22:00:00.000Z", + "end": "2015-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Mon" + }, + { + "date": "2015-11-01 00:00:00", + "start": "2015-10-31T23:00:00.000Z", + "end": "2015-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Sun" + }, + { + "date": "2015-11-02 00:00:00", + "start": "2015-11-01T23:00:00.000Z", + "end": "2015-11-02T23:00:00.000Z", + "name": "Todos los Santos (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 11-01 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2015-12-06 00:00:00", + "start": "2015-12-05T23:00:00.000Z", + "end": "2015-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Sun" + }, + { + "date": "2015-12-07 00:00:00", + "start": "2015-12-06T23:00:00.000Z", + "end": "2015-12-07T23:00:00.000Z", + "name": "Día de la Constitución Española (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 12-06 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2015-12-08 00:00:00", + "start": "2015-12-07T23:00:00.000Z", + "end": "2015-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Tue" + }, + { + "date": "2015-12-25 00:00:00", + "start": "2015-12-24T23:00:00.000Z", + "end": "2015-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Fri" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-GA-2016.json b/test/fixtures/ES-GA-2016.json new file mode 100644 index 000000000..29b07131e --- /dev/null +++ b/test/fixtures/ES-GA-2016.json @@ -0,0 +1,166 @@ +[ + { + "date": "2016-01-01 00:00:00", + "start": "2015-12-31T23:00:00.000Z", + "end": "2016-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Fri" + }, + { + "date": "2016-01-06 00:00:00", + "start": "2016-01-05T23:00:00.000Z", + "end": "2016-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Wed" + }, + { + "date": "2016-03-19 00:00:00", + "start": "2016-03-18T23:00:00.000Z", + "end": "2016-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Sat" + }, + { + "date": "2016-03-24 00:00:00", + "start": "2016-03-23T23:00:00.000Z", + "end": "2016-03-24T23:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2016-03-25 00:00:00", + "start": "2016-03-24T23:00:00.000Z", + "end": "2016-03-25T23:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2016-03-27 00:00:00", + "start": "2016-03-26T23:00:00.000Z", + "end": "2016-03-27T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2016-05-01 00:00:00", + "start": "2016-04-30T22:00:00.000Z", + "end": "2016-05-01T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2016-05-01 00:00:00", + "start": "2016-04-30T22:00:00.000Z", + "end": "2016-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Sun" + }, + { + "date": "2016-05-15 00:00:00", + "start": "2016-05-14T22:00:00.000Z", + "end": "2016-05-15T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2016-05-17 00:00:00", + "start": "2016-05-16T22:00:00.000Z", + "end": "2016-05-17T22:00:00.000Z", + "name": "Día de las Letras Gallegas", + "type": "public", + "rule": "05-17", + "_weekday": "Tue" + }, + { + "date": "2016-07-25 00:00:00", + "start": "2016-07-24T22:00:00.000Z", + "end": "2016-07-25T22:00:00.000Z", + "name": "Día Nacional de Galicia", + "type": "public", + "note": "regional", + "rule": "07-25", + "_weekday": "Mon" + }, + { + "date": "2016-08-15 00:00:00", + "start": "2016-08-14T22:00:00.000Z", + "end": "2016-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Mon" + }, + { + "date": "2016-10-12 00:00:00", + "start": "2016-10-11T22:00:00.000Z", + "end": "2016-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Wed" + }, + { + "date": "2016-11-01 00:00:00", + "start": "2016-10-31T23:00:00.000Z", + "end": "2016-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Tue" + }, + { + "date": "2016-12-06 00:00:00", + "start": "2016-12-05T23:00:00.000Z", + "end": "2016-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Tue" + }, + { + "date": "2016-12-08 00:00:00", + "start": "2016-12-07T23:00:00.000Z", + "end": "2016-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Thu" + }, + { + "date": "2016-12-25 00:00:00", + "start": "2016-12-24T23:00:00.000Z", + "end": "2016-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Sun" + }, + { + "date": "2016-12-26 00:00:00", + "start": "2016-12-25T23:00:00.000Z", + "end": "2016-12-26T23:00:00.000Z", + "name": "Navidad (día sustituto)", + "type": "public", + "substitute": true, + "rule": "substitutes 12-25 if sunday then next monday", + "_weekday": "Mon" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-GA-2017.json b/test/fixtures/ES-GA-2017.json new file mode 100644 index 000000000..3d865686c --- /dev/null +++ b/test/fixtures/ES-GA-2017.json @@ -0,0 +1,166 @@ +[ + { + "date": "2017-01-01 00:00:00", + "start": "2016-12-31T23:00:00.000Z", + "end": "2017-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Sun" + }, + { + "date": "2017-01-02 00:00:00", + "start": "2017-01-01T23:00:00.000Z", + "end": "2017-01-02T23:00:00.000Z", + "name": "Año Nuevo (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 01-01 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2017-01-06 00:00:00", + "start": "2017-01-05T23:00:00.000Z", + "end": "2017-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Fri" + }, + { + "date": "2017-03-19 00:00:00", + "start": "2017-03-18T23:00:00.000Z", + "end": "2017-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Sun" + }, + { + "date": "2017-04-13 00:00:00", + "start": "2017-04-12T22:00:00.000Z", + "end": "2017-04-13T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2017-04-14 00:00:00", + "start": "2017-04-13T22:00:00.000Z", + "end": "2017-04-14T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2017-04-16 00:00:00", + "start": "2017-04-15T22:00:00.000Z", + "end": "2017-04-16T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2017-05-01 00:00:00", + "start": "2017-04-30T22:00:00.000Z", + "end": "2017-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Mon" + }, + { + "date": "2017-05-07 00:00:00", + "start": "2017-05-06T22:00:00.000Z", + "end": "2017-05-07T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2017-05-17 00:00:00", + "start": "2017-05-16T22:00:00.000Z", + "end": "2017-05-17T22:00:00.000Z", + "name": "Día de las Letras Gallegas", + "type": "public", + "rule": "05-17", + "_weekday": "Wed" + }, + { + "date": "2017-06-04 00:00:00", + "start": "2017-06-03T22:00:00.000Z", + "end": "2017-06-04T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2017-07-25 00:00:00", + "start": "2017-07-24T22:00:00.000Z", + "end": "2017-07-25T22:00:00.000Z", + "name": "Día Nacional de Galicia", + "type": "public", + "note": "regional", + "rule": "07-25", + "_weekday": "Tue" + }, + { + "date": "2017-08-15 00:00:00", + "start": "2017-08-14T22:00:00.000Z", + "end": "2017-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Tue" + }, + { + "date": "2017-10-12 00:00:00", + "start": "2017-10-11T22:00:00.000Z", + "end": "2017-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Thu" + }, + { + "date": "2017-11-01 00:00:00", + "start": "2017-10-31T23:00:00.000Z", + "end": "2017-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Wed" + }, + { + "date": "2017-12-06 00:00:00", + "start": "2017-12-05T23:00:00.000Z", + "end": "2017-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Wed" + }, + { + "date": "2017-12-08 00:00:00", + "start": "2017-12-07T23:00:00.000Z", + "end": "2017-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Fri" + }, + { + "date": "2017-12-25 00:00:00", + "start": "2017-12-24T23:00:00.000Z", + "end": "2017-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Mon" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-GA-2018.json b/test/fixtures/ES-GA-2018.json new file mode 100644 index 000000000..fc88e263c --- /dev/null +++ b/test/fixtures/ES-GA-2018.json @@ -0,0 +1,156 @@ +[ + { + "date": "2018-01-01 00:00:00", + "start": "2017-12-31T23:00:00.000Z", + "end": "2018-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Mon" + }, + { + "date": "2018-01-06 00:00:00", + "start": "2018-01-05T23:00:00.000Z", + "end": "2018-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Sat" + }, + { + "date": "2018-03-19 00:00:00", + "start": "2018-03-18T23:00:00.000Z", + "end": "2018-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Mon" + }, + { + "date": "2018-03-29 00:00:00", + "start": "2018-03-28T22:00:00.000Z", + "end": "2018-03-29T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2018-03-30 00:00:00", + "start": "2018-03-29T22:00:00.000Z", + "end": "2018-03-30T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2018-04-01 00:00:00", + "start": "2018-03-31T22:00:00.000Z", + "end": "2018-04-01T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2018-05-01 00:00:00", + "start": "2018-04-30T22:00:00.000Z", + "end": "2018-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Tue" + }, + { + "date": "2018-05-06 00:00:00", + "start": "2018-05-05T22:00:00.000Z", + "end": "2018-05-06T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2018-05-17 00:00:00", + "start": "2018-05-16T22:00:00.000Z", + "end": "2018-05-17T22:00:00.000Z", + "name": "Día de las Letras Gallegas", + "type": "public", + "rule": "05-17", + "_weekday": "Thu" + }, + { + "date": "2018-05-20 00:00:00", + "start": "2018-05-19T22:00:00.000Z", + "end": "2018-05-20T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2018-07-25 00:00:00", + "start": "2018-07-24T22:00:00.000Z", + "end": "2018-07-25T22:00:00.000Z", + "name": "Día Nacional de Galicia", + "type": "public", + "note": "regional", + "rule": "07-25", + "_weekday": "Wed" + }, + { + "date": "2018-08-15 00:00:00", + "start": "2018-08-14T22:00:00.000Z", + "end": "2018-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Wed" + }, + { + "date": "2018-10-12 00:00:00", + "start": "2018-10-11T22:00:00.000Z", + "end": "2018-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Fri" + }, + { + "date": "2018-11-01 00:00:00", + "start": "2018-10-31T23:00:00.000Z", + "end": "2018-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Thu" + }, + { + "date": "2018-12-06 00:00:00", + "start": "2018-12-05T23:00:00.000Z", + "end": "2018-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Thu" + }, + { + "date": "2018-12-08 00:00:00", + "start": "2018-12-07T23:00:00.000Z", + "end": "2018-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Sat" + }, + { + "date": "2018-12-25 00:00:00", + "start": "2018-12-24T23:00:00.000Z", + "end": "2018-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Tue" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-GA-2019.json b/test/fixtures/ES-GA-2019.json new file mode 100644 index 000000000..696ae8f97 --- /dev/null +++ b/test/fixtures/ES-GA-2019.json @@ -0,0 +1,176 @@ +[ + { + "date": "2019-01-01 00:00:00", + "start": "2018-12-31T23:00:00.000Z", + "end": "2019-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Tue" + }, + { + "date": "2019-01-06 00:00:00", + "start": "2019-01-05T23:00:00.000Z", + "end": "2019-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Sun" + }, + { + "date": "2019-01-07 00:00:00", + "start": "2019-01-06T23:00:00.000Z", + "end": "2019-01-07T23:00:00.000Z", + "name": "Día de los Reyes Magos (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 01-06 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2019-03-19 00:00:00", + "start": "2019-03-18T23:00:00.000Z", + "end": "2019-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Tue" + }, + { + "date": "2019-04-18 00:00:00", + "start": "2019-04-17T22:00:00.000Z", + "end": "2019-04-18T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2019-04-19 00:00:00", + "start": "2019-04-18T22:00:00.000Z", + "end": "2019-04-19T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2019-04-21 00:00:00", + "start": "2019-04-20T22:00:00.000Z", + "end": "2019-04-21T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2019-05-01 00:00:00", + "start": "2019-04-30T22:00:00.000Z", + "end": "2019-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Wed" + }, + { + "date": "2019-05-05 00:00:00", + "start": "2019-05-04T22:00:00.000Z", + "end": "2019-05-05T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2019-05-17 00:00:00", + "start": "2019-05-16T22:00:00.000Z", + "end": "2019-05-17T22:00:00.000Z", + "name": "Día de las Letras Gallegas", + "type": "public", + "rule": "05-17", + "_weekday": "Fri" + }, + { + "date": "2019-06-09 00:00:00", + "start": "2019-06-08T22:00:00.000Z", + "end": "2019-06-09T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2019-07-25 00:00:00", + "start": "2019-07-24T22:00:00.000Z", + "end": "2019-07-25T22:00:00.000Z", + "name": "Día Nacional de Galicia", + "type": "public", + "note": "regional", + "rule": "07-25", + "_weekday": "Thu" + }, + { + "date": "2019-08-15 00:00:00", + "start": "2019-08-14T22:00:00.000Z", + "end": "2019-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Thu" + }, + { + "date": "2019-10-12 00:00:00", + "start": "2019-10-11T22:00:00.000Z", + "end": "2019-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Sat" + }, + { + "date": "2019-11-01 00:00:00", + "start": "2019-10-31T23:00:00.000Z", + "end": "2019-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Fri" + }, + { + "date": "2019-12-06 00:00:00", + "start": "2019-12-05T23:00:00.000Z", + "end": "2019-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Fri" + }, + { + "date": "2019-12-08 00:00:00", + "start": "2019-12-07T23:00:00.000Z", + "end": "2019-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Sun" + }, + { + "date": "2019-12-09 00:00:00", + "start": "2019-12-08T23:00:00.000Z", + "end": "2019-12-09T23:00:00.000Z", + "name": "La inmaculada concepción (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 12-08 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2019-12-25 00:00:00", + "start": "2019-12-24T23:00:00.000Z", + "end": "2019-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Wed" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-GA-2020.json b/test/fixtures/ES-GA-2020.json new file mode 100644 index 000000000..f095a905d --- /dev/null +++ b/test/fixtures/ES-GA-2020.json @@ -0,0 +1,186 @@ +[ + { + "date": "2020-01-01 00:00:00", + "start": "2019-12-31T23:00:00.000Z", + "end": "2020-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Wed" + }, + { + "date": "2020-01-06 00:00:00", + "start": "2020-01-05T23:00:00.000Z", + "end": "2020-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Mon" + }, + { + "date": "2020-03-19 00:00:00", + "start": "2020-03-18T23:00:00.000Z", + "end": "2020-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Thu" + }, + { + "date": "2020-04-09 00:00:00", + "start": "2020-04-08T22:00:00.000Z", + "end": "2020-04-09T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2020-04-10 00:00:00", + "start": "2020-04-09T22:00:00.000Z", + "end": "2020-04-10T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2020-04-12 00:00:00", + "start": "2020-04-11T22:00:00.000Z", + "end": "2020-04-12T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2020-05-01 00:00:00", + "start": "2020-04-30T22:00:00.000Z", + "end": "2020-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Fri" + }, + { + "date": "2020-05-03 00:00:00", + "start": "2020-05-02T22:00:00.000Z", + "end": "2020-05-03T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2020-05-17 00:00:00", + "start": "2020-05-16T22:00:00.000Z", + "end": "2020-05-17T22:00:00.000Z", + "name": "Día de las Letras Gallegas", + "type": "public", + "rule": "05-17", + "_weekday": "Sun" + }, + { + "date": "2020-05-18 00:00:00", + "start": "2020-05-17T22:00:00.000Z", + "end": "2020-05-18T22:00:00.000Z", + "name": "Día de las Letras Gallegas", + "type": "public", + "substitute": true, + "rule": "substitutes 05-17 if Sunday then next Monday", + "_weekday": "Mon" + }, + { + "date": "2020-05-31 00:00:00", + "start": "2020-05-30T22:00:00.000Z", + "end": "2020-05-31T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2020-07-25 00:00:00", + "start": "2020-07-24T22:00:00.000Z", + "end": "2020-07-25T22:00:00.000Z", + "name": "Día Nacional de Galicia", + "type": "public", + "note": "regional", + "rule": "07-25", + "_weekday": "Sat" + }, + { + "date": "2020-08-15 00:00:00", + "start": "2020-08-14T22:00:00.000Z", + "end": "2020-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Sat" + }, + { + "date": "2020-10-12 00:00:00", + "start": "2020-10-11T22:00:00.000Z", + "end": "2020-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Mon" + }, + { + "date": "2020-11-01 00:00:00", + "start": "2020-10-31T23:00:00.000Z", + "end": "2020-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Sun" + }, + { + "date": "2020-11-02 00:00:00", + "start": "2020-11-01T23:00:00.000Z", + "end": "2020-11-02T23:00:00.000Z", + "name": "Todos los Santos (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 11-01 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2020-12-06 00:00:00", + "start": "2020-12-05T23:00:00.000Z", + "end": "2020-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Sun" + }, + { + "date": "2020-12-07 00:00:00", + "start": "2020-12-06T23:00:00.000Z", + "end": "2020-12-07T23:00:00.000Z", + "name": "Día de la Constitución Española (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 12-06 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2020-12-08 00:00:00", + "start": "2020-12-07T23:00:00.000Z", + "end": "2020-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Tue" + }, + { + "date": "2020-12-25 00:00:00", + "start": "2020-12-24T23:00:00.000Z", + "end": "2020-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Fri" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-GA-2021.json b/test/fixtures/ES-GA-2021.json new file mode 100644 index 000000000..4cfd35af5 --- /dev/null +++ b/test/fixtures/ES-GA-2021.json @@ -0,0 +1,166 @@ +[ + { + "date": "2021-01-01 00:00:00", + "start": "2020-12-31T23:00:00.000Z", + "end": "2021-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Fri" + }, + { + "date": "2021-01-06 00:00:00", + "start": "2021-01-05T23:00:00.000Z", + "end": "2021-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Wed" + }, + { + "date": "2021-03-19 00:00:00", + "start": "2021-03-18T23:00:00.000Z", + "end": "2021-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Fri" + }, + { + "date": "2021-04-01 00:00:00", + "start": "2021-03-31T22:00:00.000Z", + "end": "2021-04-01T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2021-04-02 00:00:00", + "start": "2021-04-01T22:00:00.000Z", + "end": "2021-04-02T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2021-04-04 00:00:00", + "start": "2021-04-03T22:00:00.000Z", + "end": "2021-04-04T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2021-05-01 00:00:00", + "start": "2021-04-30T22:00:00.000Z", + "end": "2021-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Sat" + }, + { + "date": "2021-05-02 00:00:00", + "start": "2021-05-01T22:00:00.000Z", + "end": "2021-05-02T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2021-05-17 00:00:00", + "start": "2021-05-16T22:00:00.000Z", + "end": "2021-05-17T22:00:00.000Z", + "name": "Día de las Letras Gallegas", + "type": "public", + "rule": "05-17", + "_weekday": "Mon" + }, + { + "date": "2021-05-23 00:00:00", + "start": "2021-05-22T22:00:00.000Z", + "end": "2021-05-23T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2021-07-25 00:00:00", + "start": "2021-07-24T22:00:00.000Z", + "end": "2021-07-25T22:00:00.000Z", + "name": "Día Nacional de Galicia", + "type": "public", + "note": "regional", + "rule": "07-25", + "_weekday": "Sun" + }, + { + "date": "2021-07-26 00:00:00", + "start": "2021-07-25T22:00:00.000Z", + "end": "2021-07-26T22:00:00.000Z", + "name": "Día Nacional de Galicia", + "type": "public", + "substitute": true, + "rule": "substitutes 07-25 if Sunday then next Monday", + "_weekday": "Mon" + }, + { + "date": "2021-08-15 00:00:00", + "start": "2021-08-14T22:00:00.000Z", + "end": "2021-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Sun" + }, + { + "date": "2021-10-12 00:00:00", + "start": "2021-10-11T22:00:00.000Z", + "end": "2021-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Tue" + }, + { + "date": "2021-11-01 00:00:00", + "start": "2021-10-31T23:00:00.000Z", + "end": "2021-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Mon" + }, + { + "date": "2021-12-06 00:00:00", + "start": "2021-12-05T23:00:00.000Z", + "end": "2021-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Mon" + }, + { + "date": "2021-12-08 00:00:00", + "start": "2021-12-07T23:00:00.000Z", + "end": "2021-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Wed" + }, + { + "date": "2021-12-25 00:00:00", + "start": "2021-12-24T23:00:00.000Z", + "end": "2021-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Sat" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-GA-2022.json b/test/fixtures/ES-GA-2022.json new file mode 100644 index 000000000..5a9ab54c8 --- /dev/null +++ b/test/fixtures/ES-GA-2022.json @@ -0,0 +1,166 @@ +[ + { + "date": "2022-01-01 00:00:00", + "start": "2021-12-31T23:00:00.000Z", + "end": "2022-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Sat" + }, + { + "date": "2022-01-06 00:00:00", + "start": "2022-01-05T23:00:00.000Z", + "end": "2022-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Thu" + }, + { + "date": "2022-03-19 00:00:00", + "start": "2022-03-18T23:00:00.000Z", + "end": "2022-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Sat" + }, + { + "date": "2022-04-14 00:00:00", + "start": "2022-04-13T22:00:00.000Z", + "end": "2022-04-14T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2022-04-15 00:00:00", + "start": "2022-04-14T22:00:00.000Z", + "end": "2022-04-15T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2022-04-17 00:00:00", + "start": "2022-04-16T22:00:00.000Z", + "end": "2022-04-17T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2022-05-01 00:00:00", + "start": "2022-04-30T22:00:00.000Z", + "end": "2022-05-01T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2022-05-01 00:00:00", + "start": "2022-04-30T22:00:00.000Z", + "end": "2022-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Sun" + }, + { + "date": "2022-05-17 00:00:00", + "start": "2022-05-16T22:00:00.000Z", + "end": "2022-05-17T22:00:00.000Z", + "name": "Día de las Letras Gallegas", + "type": "public", + "rule": "05-17", + "_weekday": "Tue" + }, + { + "date": "2022-06-05 00:00:00", + "start": "2022-06-04T22:00:00.000Z", + "end": "2022-06-05T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2022-07-25 00:00:00", + "start": "2022-07-24T22:00:00.000Z", + "end": "2022-07-25T22:00:00.000Z", + "name": "Día Nacional de Galicia", + "type": "public", + "note": "regional", + "rule": "07-25", + "_weekday": "Mon" + }, + { + "date": "2022-08-15 00:00:00", + "start": "2022-08-14T22:00:00.000Z", + "end": "2022-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Mon" + }, + { + "date": "2022-10-12 00:00:00", + "start": "2022-10-11T22:00:00.000Z", + "end": "2022-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Wed" + }, + { + "date": "2022-11-01 00:00:00", + "start": "2022-10-31T23:00:00.000Z", + "end": "2022-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Tue" + }, + { + "date": "2022-12-06 00:00:00", + "start": "2022-12-05T23:00:00.000Z", + "end": "2022-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Tue" + }, + { + "date": "2022-12-08 00:00:00", + "start": "2022-12-07T23:00:00.000Z", + "end": "2022-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Thu" + }, + { + "date": "2022-12-25 00:00:00", + "start": "2022-12-24T23:00:00.000Z", + "end": "2022-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Sun" + }, + { + "date": "2022-12-26 00:00:00", + "start": "2022-12-25T23:00:00.000Z", + "end": "2022-12-26T23:00:00.000Z", + "name": "Navidad (día sustituto)", + "type": "public", + "substitute": true, + "rule": "substitutes 12-25 if sunday then next monday", + "_weekday": "Mon" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-GA-2023.json b/test/fixtures/ES-GA-2023.json new file mode 100644 index 000000000..175686c07 --- /dev/null +++ b/test/fixtures/ES-GA-2023.json @@ -0,0 +1,166 @@ +[ + { + "date": "2023-01-01 00:00:00", + "start": "2022-12-31T23:00:00.000Z", + "end": "2023-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Sun" + }, + { + "date": "2023-01-02 00:00:00", + "start": "2023-01-01T23:00:00.000Z", + "end": "2023-01-02T23:00:00.000Z", + "name": "Año Nuevo (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 01-01 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2023-01-06 00:00:00", + "start": "2023-01-05T23:00:00.000Z", + "end": "2023-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Fri" + }, + { + "date": "2023-03-19 00:00:00", + "start": "2023-03-18T23:00:00.000Z", + "end": "2023-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Sun" + }, + { + "date": "2023-04-06 00:00:00", + "start": "2023-04-05T22:00:00.000Z", + "end": "2023-04-06T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2023-04-07 00:00:00", + "start": "2023-04-06T22:00:00.000Z", + "end": "2023-04-07T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2023-04-09 00:00:00", + "start": "2023-04-08T22:00:00.000Z", + "end": "2023-04-09T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2023-05-01 00:00:00", + "start": "2023-04-30T22:00:00.000Z", + "end": "2023-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Mon" + }, + { + "date": "2023-05-07 00:00:00", + "start": "2023-05-06T22:00:00.000Z", + "end": "2023-05-07T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2023-05-17 00:00:00", + "start": "2023-05-16T22:00:00.000Z", + "end": "2023-05-17T22:00:00.000Z", + "name": "Día de las Letras Gallegas", + "type": "public", + "rule": "05-17", + "_weekday": "Wed" + }, + { + "date": "2023-05-28 00:00:00", + "start": "2023-05-27T22:00:00.000Z", + "end": "2023-05-28T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2023-07-25 00:00:00", + "start": "2023-07-24T22:00:00.000Z", + "end": "2023-07-25T22:00:00.000Z", + "name": "Día Nacional de Galicia", + "type": "public", + "note": "regional", + "rule": "07-25", + "_weekday": "Tue" + }, + { + "date": "2023-08-15 00:00:00", + "start": "2023-08-14T22:00:00.000Z", + "end": "2023-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Tue" + }, + { + "date": "2023-10-12 00:00:00", + "start": "2023-10-11T22:00:00.000Z", + "end": "2023-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Thu" + }, + { + "date": "2023-11-01 00:00:00", + "start": "2023-10-31T23:00:00.000Z", + "end": "2023-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Wed" + }, + { + "date": "2023-12-06 00:00:00", + "start": "2023-12-05T23:00:00.000Z", + "end": "2023-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Wed" + }, + { + "date": "2023-12-08 00:00:00", + "start": "2023-12-07T23:00:00.000Z", + "end": "2023-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Fri" + }, + { + "date": "2023-12-25 00:00:00", + "start": "2023-12-24T23:00:00.000Z", + "end": "2023-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Mon" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-GA-2024.json b/test/fixtures/ES-GA-2024.json new file mode 100644 index 000000000..6c4d6c52a --- /dev/null +++ b/test/fixtures/ES-GA-2024.json @@ -0,0 +1,166 @@ +[ + { + "date": "2024-01-01 00:00:00", + "start": "2023-12-31T23:00:00.000Z", + "end": "2024-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Mon" + }, + { + "date": "2024-01-06 00:00:00", + "start": "2024-01-05T23:00:00.000Z", + "end": "2024-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Sat" + }, + { + "date": "2024-03-19 00:00:00", + "start": "2024-03-18T23:00:00.000Z", + "end": "2024-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Tue" + }, + { + "date": "2024-03-28 00:00:00", + "start": "2024-03-27T23:00:00.000Z", + "end": "2024-03-28T23:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2024-03-29 00:00:00", + "start": "2024-03-28T23:00:00.000Z", + "end": "2024-03-29T23:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2024-03-31 00:00:00", + "start": "2024-03-30T23:00:00.000Z", + "end": "2024-03-31T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2024-05-01 00:00:00", + "start": "2024-04-30T22:00:00.000Z", + "end": "2024-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Wed" + }, + { + "date": "2024-05-05 00:00:00", + "start": "2024-05-04T22:00:00.000Z", + "end": "2024-05-05T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2024-05-17 00:00:00", + "start": "2024-05-16T22:00:00.000Z", + "end": "2024-05-17T22:00:00.000Z", + "name": "Día de las Letras Gallegas", + "type": "public", + "rule": "05-17", + "_weekday": "Fri" + }, + { + "date": "2024-05-19 00:00:00", + "start": "2024-05-18T22:00:00.000Z", + "end": "2024-05-19T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2024-07-25 00:00:00", + "start": "2024-07-24T22:00:00.000Z", + "end": "2024-07-25T22:00:00.000Z", + "name": "Día Nacional de Galicia", + "type": "public", + "note": "regional", + "rule": "07-25", + "_weekday": "Thu" + }, + { + "date": "2024-08-15 00:00:00", + "start": "2024-08-14T22:00:00.000Z", + "end": "2024-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Thu" + }, + { + "date": "2024-10-12 00:00:00", + "start": "2024-10-11T22:00:00.000Z", + "end": "2024-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Sat" + }, + { + "date": "2024-11-01 00:00:00", + "start": "2024-10-31T23:00:00.000Z", + "end": "2024-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Fri" + }, + { + "date": "2024-12-06 00:00:00", + "start": "2024-12-05T23:00:00.000Z", + "end": "2024-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Fri" + }, + { + "date": "2024-12-08 00:00:00", + "start": "2024-12-07T23:00:00.000Z", + "end": "2024-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Sun" + }, + { + "date": "2024-12-09 00:00:00", + "start": "2024-12-08T23:00:00.000Z", + "end": "2024-12-09T23:00:00.000Z", + "name": "La inmaculada concepción (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 12-08 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2024-12-25 00:00:00", + "start": "2024-12-24T23:00:00.000Z", + "end": "2024-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Wed" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-GA-2025.json b/test/fixtures/ES-GA-2025.json new file mode 100644 index 000000000..cf70efcc4 --- /dev/null +++ b/test/fixtures/ES-GA-2025.json @@ -0,0 +1,166 @@ +[ + { + "date": "2025-01-01 00:00:00", + "start": "2024-12-31T23:00:00.000Z", + "end": "2025-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Wed" + }, + { + "date": "2025-01-06 00:00:00", + "start": "2025-01-05T23:00:00.000Z", + "end": "2025-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Mon" + }, + { + "date": "2025-03-19 00:00:00", + "start": "2025-03-18T23:00:00.000Z", + "end": "2025-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Wed" + }, + { + "date": "2025-04-17 00:00:00", + "start": "2025-04-16T22:00:00.000Z", + "end": "2025-04-17T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2025-04-18 00:00:00", + "start": "2025-04-17T22:00:00.000Z", + "end": "2025-04-18T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2025-04-20 00:00:00", + "start": "2025-04-19T22:00:00.000Z", + "end": "2025-04-20T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2025-05-01 00:00:00", + "start": "2025-04-30T22:00:00.000Z", + "end": "2025-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Thu" + }, + { + "date": "2025-05-04 00:00:00", + "start": "2025-05-03T22:00:00.000Z", + "end": "2025-05-04T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2025-05-17 00:00:00", + "start": "2025-05-16T22:00:00.000Z", + "end": "2025-05-17T22:00:00.000Z", + "name": "Día de las Letras Gallegas", + "type": "public", + "rule": "05-17", + "_weekday": "Sat" + }, + { + "date": "2025-06-08 00:00:00", + "start": "2025-06-07T22:00:00.000Z", + "end": "2025-06-08T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2025-07-25 00:00:00", + "start": "2025-07-24T22:00:00.000Z", + "end": "2025-07-25T22:00:00.000Z", + "name": "Día Nacional de Galicia", + "type": "public", + "note": "regional", + "rule": "07-25", + "_weekday": "Fri" + }, + { + "date": "2025-08-15 00:00:00", + "start": "2025-08-14T22:00:00.000Z", + "end": "2025-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Fri" + }, + { + "date": "2025-10-12 00:00:00", + "start": "2025-10-11T22:00:00.000Z", + "end": "2025-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Sun" + }, + { + "date": "2025-10-13 00:00:00", + "start": "2025-10-12T22:00:00.000Z", + "end": "2025-10-13T22:00:00.000Z", + "name": "Fiesta Nacional de España (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 10-12 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2025-11-01 00:00:00", + "start": "2025-10-31T23:00:00.000Z", + "end": "2025-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Sat" + }, + { + "date": "2025-12-06 00:00:00", + "start": "2025-12-05T23:00:00.000Z", + "end": "2025-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Sat" + }, + { + "date": "2025-12-08 00:00:00", + "start": "2025-12-07T23:00:00.000Z", + "end": "2025-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Mon" + }, + { + "date": "2025-12-25 00:00:00", + "start": "2025-12-24T23:00:00.000Z", + "end": "2025-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Thu" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-IB-2015.json b/test/fixtures/ES-IB-2015.json new file mode 100644 index 000000000..0d65cef6d --- /dev/null +++ b/test/fixtures/ES-IB-2015.json @@ -0,0 +1,204 @@ +[ + { + "date": "2015-01-01 00:00:00", + "start": "2014-12-31T23:00:00.000Z", + "end": "2015-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Thu" + }, + { + "date": "2015-01-06 00:00:00", + "start": "2015-01-05T23:00:00.000Z", + "end": "2015-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Tue" + }, + { + "date": "2015-03-01 00:00:00", + "start": "2015-02-28T23:00:00.000Z", + "end": "2015-03-01T23:00:00.000Z", + "name": "Día de les Illes Balears", + "type": "public", + "rule": "03-01", + "_weekday": "Sun" + }, + { + "date": "2015-03-02 00:00:00", + "start": "2015-03-01T23:00:00.000Z", + "end": "2015-03-02T23:00:00.000Z", + "name": "Día de les Illes Balears (día sustituto)", + "type": "public", + "substitute": true, + "rule": "substitutes 03-01 if Sunday then next Monday", + "_weekday": "Mon" + }, + { + "date": "2015-03-19 00:00:00", + "start": "2015-03-18T23:00:00.000Z", + "end": "2015-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Thu" + }, + { + "date": "2015-04-02 00:00:00", + "start": "2015-04-01T22:00:00.000Z", + "end": "2015-04-02T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2015-04-03 00:00:00", + "start": "2015-04-02T22:00:00.000Z", + "end": "2015-04-03T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2015-04-05 00:00:00", + "start": "2015-04-04T22:00:00.000Z", + "end": "2015-04-05T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2015-04-06 00:00:00", + "start": "2015-04-05T22:00:00.000Z", + "end": "2015-04-06T22:00:00.000Z", + "name": "Lunes de Pascua", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2015-05-01 00:00:00", + "start": "2015-04-30T22:00:00.000Z", + "end": "2015-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Fri" + }, + { + "date": "2015-05-03 00:00:00", + "start": "2015-05-02T22:00:00.000Z", + "end": "2015-05-03T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2015-05-24 00:00:00", + "start": "2015-05-23T22:00:00.000Z", + "end": "2015-05-24T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2015-07-25 00:00:00", + "start": "2015-07-24T22:00:00.000Z", + "end": "2015-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Sat" + }, + { + "date": "2015-08-15 00:00:00", + "start": "2015-08-14T22:00:00.000Z", + "end": "2015-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Sat" + }, + { + "date": "2015-10-12 00:00:00", + "start": "2015-10-11T22:00:00.000Z", + "end": "2015-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Mon" + }, + { + "date": "2015-11-01 00:00:00", + "start": "2015-10-31T23:00:00.000Z", + "end": "2015-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Sun" + }, + { + "date": "2015-11-02 00:00:00", + "start": "2015-11-01T23:00:00.000Z", + "end": "2015-11-02T23:00:00.000Z", + "name": "Todos los Santos (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 11-01 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2015-12-06 00:00:00", + "start": "2015-12-05T23:00:00.000Z", + "end": "2015-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Sun" + }, + { + "date": "2015-12-07 00:00:00", + "start": "2015-12-06T23:00:00.000Z", + "end": "2015-12-07T23:00:00.000Z", + "name": "Día de la Constitución Española (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 12-06 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2015-12-08 00:00:00", + "start": "2015-12-07T23:00:00.000Z", + "end": "2015-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Tue" + }, + { + "date": "2015-12-25 00:00:00", + "start": "2015-12-24T23:00:00.000Z", + "end": "2015-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Fri" + }, + { + "date": "2015-12-26 00:00:00", + "start": "2015-12-25T23:00:00.000Z", + "end": "2015-12-26T23:00:00.000Z", + "name": "Sant Esteve", + "type": "observance", + "rule": "12-26", + "_weekday": "Sat" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-IB-2016.json b/test/fixtures/ES-IB-2016.json new file mode 100644 index 000000000..4da02f3f3 --- /dev/null +++ b/test/fixtures/ES-IB-2016.json @@ -0,0 +1,184 @@ +[ + { + "date": "2016-01-01 00:00:00", + "start": "2015-12-31T23:00:00.000Z", + "end": "2016-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Fri" + }, + { + "date": "2016-01-06 00:00:00", + "start": "2016-01-05T23:00:00.000Z", + "end": "2016-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Wed" + }, + { + "date": "2016-03-01 00:00:00", + "start": "2016-02-29T23:00:00.000Z", + "end": "2016-03-01T23:00:00.000Z", + "name": "Día de les Illes Balears", + "type": "public", + "rule": "03-01", + "_weekday": "Tue" + }, + { + "date": "2016-03-19 00:00:00", + "start": "2016-03-18T23:00:00.000Z", + "end": "2016-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Sat" + }, + { + "date": "2016-03-24 00:00:00", + "start": "2016-03-23T23:00:00.000Z", + "end": "2016-03-24T23:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2016-03-25 00:00:00", + "start": "2016-03-24T23:00:00.000Z", + "end": "2016-03-25T23:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2016-03-27 00:00:00", + "start": "2016-03-26T23:00:00.000Z", + "end": "2016-03-27T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2016-03-28 00:00:00", + "start": "2016-03-27T22:00:00.000Z", + "end": "2016-03-28T22:00:00.000Z", + "name": "Lunes de Pascua", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2016-05-01 00:00:00", + "start": "2016-04-30T22:00:00.000Z", + "end": "2016-05-01T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2016-05-01 00:00:00", + "start": "2016-04-30T22:00:00.000Z", + "end": "2016-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Sun" + }, + { + "date": "2016-05-15 00:00:00", + "start": "2016-05-14T22:00:00.000Z", + "end": "2016-05-15T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2016-07-25 00:00:00", + "start": "2016-07-24T22:00:00.000Z", + "end": "2016-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Mon" + }, + { + "date": "2016-08-15 00:00:00", + "start": "2016-08-14T22:00:00.000Z", + "end": "2016-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Mon" + }, + { + "date": "2016-10-12 00:00:00", + "start": "2016-10-11T22:00:00.000Z", + "end": "2016-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Wed" + }, + { + "date": "2016-11-01 00:00:00", + "start": "2016-10-31T23:00:00.000Z", + "end": "2016-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Tue" + }, + { + "date": "2016-12-06 00:00:00", + "start": "2016-12-05T23:00:00.000Z", + "end": "2016-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Tue" + }, + { + "date": "2016-12-08 00:00:00", + "start": "2016-12-07T23:00:00.000Z", + "end": "2016-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Thu" + }, + { + "date": "2016-12-25 00:00:00", + "start": "2016-12-24T23:00:00.000Z", + "end": "2016-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Sun" + }, + { + "date": "2016-12-26 00:00:00", + "start": "2016-12-25T23:00:00.000Z", + "end": "2016-12-26T23:00:00.000Z", + "name": "Navidad (día sustituto)", + "type": "public", + "substitute": true, + "rule": "substitutes 12-25 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2016-12-26 00:00:00", + "start": "2016-12-25T23:00:00.000Z", + "end": "2016-12-26T23:00:00.000Z", + "name": "Sant Esteve", + "type": "observance", + "rule": "12-26", + "_weekday": "Mon" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-IB-2017.json b/test/fixtures/ES-IB-2017.json new file mode 100644 index 000000000..783ec5432 --- /dev/null +++ b/test/fixtures/ES-IB-2017.json @@ -0,0 +1,184 @@ +[ + { + "date": "2017-01-01 00:00:00", + "start": "2016-12-31T23:00:00.000Z", + "end": "2017-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Sun" + }, + { + "date": "2017-01-02 00:00:00", + "start": "2017-01-01T23:00:00.000Z", + "end": "2017-01-02T23:00:00.000Z", + "name": "Año Nuevo (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 01-01 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2017-01-06 00:00:00", + "start": "2017-01-05T23:00:00.000Z", + "end": "2017-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Fri" + }, + { + "date": "2017-03-01 00:00:00", + "start": "2017-02-28T23:00:00.000Z", + "end": "2017-03-01T23:00:00.000Z", + "name": "Día de les Illes Balears", + "type": "public", + "rule": "03-01", + "_weekday": "Wed" + }, + { + "date": "2017-03-19 00:00:00", + "start": "2017-03-18T23:00:00.000Z", + "end": "2017-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Sun" + }, + { + "date": "2017-04-13 00:00:00", + "start": "2017-04-12T22:00:00.000Z", + "end": "2017-04-13T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2017-04-14 00:00:00", + "start": "2017-04-13T22:00:00.000Z", + "end": "2017-04-14T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2017-04-16 00:00:00", + "start": "2017-04-15T22:00:00.000Z", + "end": "2017-04-16T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2017-04-17 00:00:00", + "start": "2017-04-16T22:00:00.000Z", + "end": "2017-04-17T22:00:00.000Z", + "name": "Lunes de Pascua", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2017-05-01 00:00:00", + "start": "2017-04-30T22:00:00.000Z", + "end": "2017-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Mon" + }, + { + "date": "2017-05-07 00:00:00", + "start": "2017-05-06T22:00:00.000Z", + "end": "2017-05-07T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2017-06-04 00:00:00", + "start": "2017-06-03T22:00:00.000Z", + "end": "2017-06-04T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2017-07-25 00:00:00", + "start": "2017-07-24T22:00:00.000Z", + "end": "2017-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Tue" + }, + { + "date": "2017-08-15 00:00:00", + "start": "2017-08-14T22:00:00.000Z", + "end": "2017-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Tue" + }, + { + "date": "2017-10-12 00:00:00", + "start": "2017-10-11T22:00:00.000Z", + "end": "2017-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Thu" + }, + { + "date": "2017-11-01 00:00:00", + "start": "2017-10-31T23:00:00.000Z", + "end": "2017-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Wed" + }, + { + "date": "2017-12-06 00:00:00", + "start": "2017-12-05T23:00:00.000Z", + "end": "2017-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Wed" + }, + { + "date": "2017-12-08 00:00:00", + "start": "2017-12-07T23:00:00.000Z", + "end": "2017-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Fri" + }, + { + "date": "2017-12-25 00:00:00", + "start": "2017-12-24T23:00:00.000Z", + "end": "2017-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Mon" + }, + { + "date": "2017-12-26 00:00:00", + "start": "2017-12-25T23:00:00.000Z", + "end": "2017-12-26T23:00:00.000Z", + "name": "Sant Esteve", + "type": "observance", + "rule": "12-26", + "_weekday": "Tue" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-IB-2018.json b/test/fixtures/ES-IB-2018.json new file mode 100644 index 000000000..fae74f5ad --- /dev/null +++ b/test/fixtures/ES-IB-2018.json @@ -0,0 +1,174 @@ +[ + { + "date": "2018-01-01 00:00:00", + "start": "2017-12-31T23:00:00.000Z", + "end": "2018-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Mon" + }, + { + "date": "2018-01-06 00:00:00", + "start": "2018-01-05T23:00:00.000Z", + "end": "2018-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Sat" + }, + { + "date": "2018-03-01 00:00:00", + "start": "2018-02-28T23:00:00.000Z", + "end": "2018-03-01T23:00:00.000Z", + "name": "Día de les Illes Balears", + "type": "public", + "rule": "03-01", + "_weekday": "Thu" + }, + { + "date": "2018-03-19 00:00:00", + "start": "2018-03-18T23:00:00.000Z", + "end": "2018-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Mon" + }, + { + "date": "2018-03-29 00:00:00", + "start": "2018-03-28T22:00:00.000Z", + "end": "2018-03-29T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2018-03-30 00:00:00", + "start": "2018-03-29T22:00:00.000Z", + "end": "2018-03-30T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2018-04-01 00:00:00", + "start": "2018-03-31T22:00:00.000Z", + "end": "2018-04-01T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2018-04-02 00:00:00", + "start": "2018-04-01T22:00:00.000Z", + "end": "2018-04-02T22:00:00.000Z", + "name": "Lunes de Pascua", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2018-05-01 00:00:00", + "start": "2018-04-30T22:00:00.000Z", + "end": "2018-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Tue" + }, + { + "date": "2018-05-06 00:00:00", + "start": "2018-05-05T22:00:00.000Z", + "end": "2018-05-06T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2018-05-20 00:00:00", + "start": "2018-05-19T22:00:00.000Z", + "end": "2018-05-20T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2018-07-25 00:00:00", + "start": "2018-07-24T22:00:00.000Z", + "end": "2018-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Wed" + }, + { + "date": "2018-08-15 00:00:00", + "start": "2018-08-14T22:00:00.000Z", + "end": "2018-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Wed" + }, + { + "date": "2018-10-12 00:00:00", + "start": "2018-10-11T22:00:00.000Z", + "end": "2018-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Fri" + }, + { + "date": "2018-11-01 00:00:00", + "start": "2018-10-31T23:00:00.000Z", + "end": "2018-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Thu" + }, + { + "date": "2018-12-06 00:00:00", + "start": "2018-12-05T23:00:00.000Z", + "end": "2018-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Thu" + }, + { + "date": "2018-12-08 00:00:00", + "start": "2018-12-07T23:00:00.000Z", + "end": "2018-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Sat" + }, + { + "date": "2018-12-25 00:00:00", + "start": "2018-12-24T23:00:00.000Z", + "end": "2018-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Tue" + }, + { + "date": "2018-12-26 00:00:00", + "start": "2018-12-25T23:00:00.000Z", + "end": "2018-12-26T23:00:00.000Z", + "name": "Sant Esteve", + "type": "observance", + "rule": "12-26", + "_weekday": "Wed" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-IB-2019.json b/test/fixtures/ES-IB-2019.json new file mode 100644 index 000000000..9c0efe507 --- /dev/null +++ b/test/fixtures/ES-IB-2019.json @@ -0,0 +1,194 @@ +[ + { + "date": "2019-01-01 00:00:00", + "start": "2018-12-31T23:00:00.000Z", + "end": "2019-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Tue" + }, + { + "date": "2019-01-06 00:00:00", + "start": "2019-01-05T23:00:00.000Z", + "end": "2019-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Sun" + }, + { + "date": "2019-01-07 00:00:00", + "start": "2019-01-06T23:00:00.000Z", + "end": "2019-01-07T23:00:00.000Z", + "name": "Día de los Reyes Magos (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 01-06 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2019-03-01 00:00:00", + "start": "2019-02-28T23:00:00.000Z", + "end": "2019-03-01T23:00:00.000Z", + "name": "Día de les Illes Balears", + "type": "public", + "rule": "03-01", + "_weekday": "Fri" + }, + { + "date": "2019-03-19 00:00:00", + "start": "2019-03-18T23:00:00.000Z", + "end": "2019-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Tue" + }, + { + "date": "2019-04-18 00:00:00", + "start": "2019-04-17T22:00:00.000Z", + "end": "2019-04-18T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2019-04-19 00:00:00", + "start": "2019-04-18T22:00:00.000Z", + "end": "2019-04-19T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2019-04-21 00:00:00", + "start": "2019-04-20T22:00:00.000Z", + "end": "2019-04-21T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2019-04-22 00:00:00", + "start": "2019-04-21T22:00:00.000Z", + "end": "2019-04-22T22:00:00.000Z", + "name": "Lunes de Pascua", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2019-05-01 00:00:00", + "start": "2019-04-30T22:00:00.000Z", + "end": "2019-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Wed" + }, + { + "date": "2019-05-05 00:00:00", + "start": "2019-05-04T22:00:00.000Z", + "end": "2019-05-05T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2019-06-09 00:00:00", + "start": "2019-06-08T22:00:00.000Z", + "end": "2019-06-09T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2019-07-25 00:00:00", + "start": "2019-07-24T22:00:00.000Z", + "end": "2019-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Thu" + }, + { + "date": "2019-08-15 00:00:00", + "start": "2019-08-14T22:00:00.000Z", + "end": "2019-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Thu" + }, + { + "date": "2019-10-12 00:00:00", + "start": "2019-10-11T22:00:00.000Z", + "end": "2019-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Sat" + }, + { + "date": "2019-11-01 00:00:00", + "start": "2019-10-31T23:00:00.000Z", + "end": "2019-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Fri" + }, + { + "date": "2019-12-06 00:00:00", + "start": "2019-12-05T23:00:00.000Z", + "end": "2019-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Fri" + }, + { + "date": "2019-12-08 00:00:00", + "start": "2019-12-07T23:00:00.000Z", + "end": "2019-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Sun" + }, + { + "date": "2019-12-09 00:00:00", + "start": "2019-12-08T23:00:00.000Z", + "end": "2019-12-09T23:00:00.000Z", + "name": "La inmaculada concepción (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 12-08 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2019-12-25 00:00:00", + "start": "2019-12-24T23:00:00.000Z", + "end": "2019-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Wed" + }, + { + "date": "2019-12-26 00:00:00", + "start": "2019-12-25T23:00:00.000Z", + "end": "2019-12-26T23:00:00.000Z", + "name": "Sant Esteve", + "type": "observance", + "rule": "12-26", + "_weekday": "Thu" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-IB-2020.json b/test/fixtures/ES-IB-2020.json new file mode 100644 index 000000000..4d22e0845 --- /dev/null +++ b/test/fixtures/ES-IB-2020.json @@ -0,0 +1,204 @@ +[ + { + "date": "2020-01-01 00:00:00", + "start": "2019-12-31T23:00:00.000Z", + "end": "2020-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Wed" + }, + { + "date": "2020-01-06 00:00:00", + "start": "2020-01-05T23:00:00.000Z", + "end": "2020-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Mon" + }, + { + "date": "2020-03-01 00:00:00", + "start": "2020-02-29T23:00:00.000Z", + "end": "2020-03-01T23:00:00.000Z", + "name": "Día de les Illes Balears", + "type": "public", + "rule": "03-01", + "_weekday": "Sun" + }, + { + "date": "2020-03-02 00:00:00", + "start": "2020-03-01T23:00:00.000Z", + "end": "2020-03-02T23:00:00.000Z", + "name": "Día de les Illes Balears (día sustituto)", + "type": "public", + "substitute": true, + "rule": "substitutes 03-01 if Sunday then next Monday", + "_weekday": "Mon" + }, + { + "date": "2020-03-19 00:00:00", + "start": "2020-03-18T23:00:00.000Z", + "end": "2020-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Thu" + }, + { + "date": "2020-04-09 00:00:00", + "start": "2020-04-08T22:00:00.000Z", + "end": "2020-04-09T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2020-04-10 00:00:00", + "start": "2020-04-09T22:00:00.000Z", + "end": "2020-04-10T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2020-04-12 00:00:00", + "start": "2020-04-11T22:00:00.000Z", + "end": "2020-04-12T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2020-04-13 00:00:00", + "start": "2020-04-12T22:00:00.000Z", + "end": "2020-04-13T22:00:00.000Z", + "name": "Lunes de Pascua", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2020-05-01 00:00:00", + "start": "2020-04-30T22:00:00.000Z", + "end": "2020-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Fri" + }, + { + "date": "2020-05-03 00:00:00", + "start": "2020-05-02T22:00:00.000Z", + "end": "2020-05-03T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2020-05-31 00:00:00", + "start": "2020-05-30T22:00:00.000Z", + "end": "2020-05-31T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2020-07-25 00:00:00", + "start": "2020-07-24T22:00:00.000Z", + "end": "2020-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Sat" + }, + { + "date": "2020-08-15 00:00:00", + "start": "2020-08-14T22:00:00.000Z", + "end": "2020-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Sat" + }, + { + "date": "2020-10-12 00:00:00", + "start": "2020-10-11T22:00:00.000Z", + "end": "2020-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Mon" + }, + { + "date": "2020-11-01 00:00:00", + "start": "2020-10-31T23:00:00.000Z", + "end": "2020-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Sun" + }, + { + "date": "2020-11-02 00:00:00", + "start": "2020-11-01T23:00:00.000Z", + "end": "2020-11-02T23:00:00.000Z", + "name": "Todos los Santos (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 11-01 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2020-12-06 00:00:00", + "start": "2020-12-05T23:00:00.000Z", + "end": "2020-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Sun" + }, + { + "date": "2020-12-07 00:00:00", + "start": "2020-12-06T23:00:00.000Z", + "end": "2020-12-07T23:00:00.000Z", + "name": "Día de la Constitución Española (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 12-06 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2020-12-08 00:00:00", + "start": "2020-12-07T23:00:00.000Z", + "end": "2020-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Tue" + }, + { + "date": "2020-12-25 00:00:00", + "start": "2020-12-24T23:00:00.000Z", + "end": "2020-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Fri" + }, + { + "date": "2020-12-26 00:00:00", + "start": "2020-12-25T23:00:00.000Z", + "end": "2020-12-26T23:00:00.000Z", + "name": "Sant Esteve", + "type": "observance", + "rule": "12-26", + "_weekday": "Sat" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-IB-2021.json b/test/fixtures/ES-IB-2021.json new file mode 100644 index 000000000..d35b6ab59 --- /dev/null +++ b/test/fixtures/ES-IB-2021.json @@ -0,0 +1,174 @@ +[ + { + "date": "2021-01-01 00:00:00", + "start": "2020-12-31T23:00:00.000Z", + "end": "2021-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Fri" + }, + { + "date": "2021-01-06 00:00:00", + "start": "2021-01-05T23:00:00.000Z", + "end": "2021-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Wed" + }, + { + "date": "2021-03-01 00:00:00", + "start": "2021-02-28T23:00:00.000Z", + "end": "2021-03-01T23:00:00.000Z", + "name": "Día de les Illes Balears", + "type": "public", + "rule": "03-01", + "_weekday": "Mon" + }, + { + "date": "2021-03-19 00:00:00", + "start": "2021-03-18T23:00:00.000Z", + "end": "2021-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Fri" + }, + { + "date": "2021-04-01 00:00:00", + "start": "2021-03-31T22:00:00.000Z", + "end": "2021-04-01T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2021-04-02 00:00:00", + "start": "2021-04-01T22:00:00.000Z", + "end": "2021-04-02T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2021-04-04 00:00:00", + "start": "2021-04-03T22:00:00.000Z", + "end": "2021-04-04T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2021-04-05 00:00:00", + "start": "2021-04-04T22:00:00.000Z", + "end": "2021-04-05T22:00:00.000Z", + "name": "Lunes de Pascua", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2021-05-01 00:00:00", + "start": "2021-04-30T22:00:00.000Z", + "end": "2021-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Sat" + }, + { + "date": "2021-05-02 00:00:00", + "start": "2021-05-01T22:00:00.000Z", + "end": "2021-05-02T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2021-05-23 00:00:00", + "start": "2021-05-22T22:00:00.000Z", + "end": "2021-05-23T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2021-07-25 00:00:00", + "start": "2021-07-24T22:00:00.000Z", + "end": "2021-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Sun" + }, + { + "date": "2021-08-15 00:00:00", + "start": "2021-08-14T22:00:00.000Z", + "end": "2021-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Sun" + }, + { + "date": "2021-10-12 00:00:00", + "start": "2021-10-11T22:00:00.000Z", + "end": "2021-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Tue" + }, + { + "date": "2021-11-01 00:00:00", + "start": "2021-10-31T23:00:00.000Z", + "end": "2021-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Mon" + }, + { + "date": "2021-12-06 00:00:00", + "start": "2021-12-05T23:00:00.000Z", + "end": "2021-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Mon" + }, + { + "date": "2021-12-08 00:00:00", + "start": "2021-12-07T23:00:00.000Z", + "end": "2021-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Wed" + }, + { + "date": "2021-12-25 00:00:00", + "start": "2021-12-24T23:00:00.000Z", + "end": "2021-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Sat" + }, + { + "date": "2021-12-26 00:00:00", + "start": "2021-12-25T23:00:00.000Z", + "end": "2021-12-26T23:00:00.000Z", + "name": "Sant Esteve", + "type": "observance", + "rule": "12-26", + "_weekday": "Sun" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-IB-2022.json b/test/fixtures/ES-IB-2022.json new file mode 100644 index 000000000..b44c71228 --- /dev/null +++ b/test/fixtures/ES-IB-2022.json @@ -0,0 +1,184 @@ +[ + { + "date": "2022-01-01 00:00:00", + "start": "2021-12-31T23:00:00.000Z", + "end": "2022-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Sat" + }, + { + "date": "2022-01-06 00:00:00", + "start": "2022-01-05T23:00:00.000Z", + "end": "2022-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Thu" + }, + { + "date": "2022-03-01 00:00:00", + "start": "2022-02-28T23:00:00.000Z", + "end": "2022-03-01T23:00:00.000Z", + "name": "Día de les Illes Balears", + "type": "public", + "rule": "03-01", + "_weekday": "Tue" + }, + { + "date": "2022-03-19 00:00:00", + "start": "2022-03-18T23:00:00.000Z", + "end": "2022-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Sat" + }, + { + "date": "2022-04-14 00:00:00", + "start": "2022-04-13T22:00:00.000Z", + "end": "2022-04-14T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2022-04-15 00:00:00", + "start": "2022-04-14T22:00:00.000Z", + "end": "2022-04-15T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2022-04-17 00:00:00", + "start": "2022-04-16T22:00:00.000Z", + "end": "2022-04-17T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2022-04-18 00:00:00", + "start": "2022-04-17T22:00:00.000Z", + "end": "2022-04-18T22:00:00.000Z", + "name": "Lunes de Pascua", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2022-05-01 00:00:00", + "start": "2022-04-30T22:00:00.000Z", + "end": "2022-05-01T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2022-05-01 00:00:00", + "start": "2022-04-30T22:00:00.000Z", + "end": "2022-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Sun" + }, + { + "date": "2022-06-05 00:00:00", + "start": "2022-06-04T22:00:00.000Z", + "end": "2022-06-05T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2022-07-25 00:00:00", + "start": "2022-07-24T22:00:00.000Z", + "end": "2022-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Mon" + }, + { + "date": "2022-08-15 00:00:00", + "start": "2022-08-14T22:00:00.000Z", + "end": "2022-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Mon" + }, + { + "date": "2022-10-12 00:00:00", + "start": "2022-10-11T22:00:00.000Z", + "end": "2022-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Wed" + }, + { + "date": "2022-11-01 00:00:00", + "start": "2022-10-31T23:00:00.000Z", + "end": "2022-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Tue" + }, + { + "date": "2022-12-06 00:00:00", + "start": "2022-12-05T23:00:00.000Z", + "end": "2022-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Tue" + }, + { + "date": "2022-12-08 00:00:00", + "start": "2022-12-07T23:00:00.000Z", + "end": "2022-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Thu" + }, + { + "date": "2022-12-25 00:00:00", + "start": "2022-12-24T23:00:00.000Z", + "end": "2022-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Sun" + }, + { + "date": "2022-12-26 00:00:00", + "start": "2022-12-25T23:00:00.000Z", + "end": "2022-12-26T23:00:00.000Z", + "name": "Navidad (día sustituto)", + "type": "public", + "substitute": true, + "rule": "substitutes 12-25 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2022-12-26 00:00:00", + "start": "2022-12-25T23:00:00.000Z", + "end": "2022-12-26T23:00:00.000Z", + "name": "Sant Esteve", + "type": "observance", + "rule": "12-26", + "_weekday": "Mon" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-IB-2023.json b/test/fixtures/ES-IB-2023.json new file mode 100644 index 000000000..1701ab781 --- /dev/null +++ b/test/fixtures/ES-IB-2023.json @@ -0,0 +1,184 @@ +[ + { + "date": "2023-01-01 00:00:00", + "start": "2022-12-31T23:00:00.000Z", + "end": "2023-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Sun" + }, + { + "date": "2023-01-02 00:00:00", + "start": "2023-01-01T23:00:00.000Z", + "end": "2023-01-02T23:00:00.000Z", + "name": "Año Nuevo (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 01-01 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2023-01-06 00:00:00", + "start": "2023-01-05T23:00:00.000Z", + "end": "2023-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Fri" + }, + { + "date": "2023-03-01 00:00:00", + "start": "2023-02-28T23:00:00.000Z", + "end": "2023-03-01T23:00:00.000Z", + "name": "Día de les Illes Balears", + "type": "public", + "rule": "03-01", + "_weekday": "Wed" + }, + { + "date": "2023-03-19 00:00:00", + "start": "2023-03-18T23:00:00.000Z", + "end": "2023-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Sun" + }, + { + "date": "2023-04-06 00:00:00", + "start": "2023-04-05T22:00:00.000Z", + "end": "2023-04-06T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2023-04-07 00:00:00", + "start": "2023-04-06T22:00:00.000Z", + "end": "2023-04-07T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2023-04-09 00:00:00", + "start": "2023-04-08T22:00:00.000Z", + "end": "2023-04-09T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2023-04-10 00:00:00", + "start": "2023-04-09T22:00:00.000Z", + "end": "2023-04-10T22:00:00.000Z", + "name": "Lunes de Pascua", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2023-05-01 00:00:00", + "start": "2023-04-30T22:00:00.000Z", + "end": "2023-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Mon" + }, + { + "date": "2023-05-07 00:00:00", + "start": "2023-05-06T22:00:00.000Z", + "end": "2023-05-07T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2023-05-28 00:00:00", + "start": "2023-05-27T22:00:00.000Z", + "end": "2023-05-28T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2023-07-25 00:00:00", + "start": "2023-07-24T22:00:00.000Z", + "end": "2023-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Tue" + }, + { + "date": "2023-08-15 00:00:00", + "start": "2023-08-14T22:00:00.000Z", + "end": "2023-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Tue" + }, + { + "date": "2023-10-12 00:00:00", + "start": "2023-10-11T22:00:00.000Z", + "end": "2023-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Thu" + }, + { + "date": "2023-11-01 00:00:00", + "start": "2023-10-31T23:00:00.000Z", + "end": "2023-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Wed" + }, + { + "date": "2023-12-06 00:00:00", + "start": "2023-12-05T23:00:00.000Z", + "end": "2023-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Wed" + }, + { + "date": "2023-12-08 00:00:00", + "start": "2023-12-07T23:00:00.000Z", + "end": "2023-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Fri" + }, + { + "date": "2023-12-25 00:00:00", + "start": "2023-12-24T23:00:00.000Z", + "end": "2023-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Mon" + }, + { + "date": "2023-12-26 00:00:00", + "start": "2023-12-25T23:00:00.000Z", + "end": "2023-12-26T23:00:00.000Z", + "name": "Sant Esteve", + "type": "observance", + "rule": "12-26", + "_weekday": "Tue" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-IB-2024.json b/test/fixtures/ES-IB-2024.json new file mode 100644 index 000000000..3cbb18800 --- /dev/null +++ b/test/fixtures/ES-IB-2024.json @@ -0,0 +1,184 @@ +[ + { + "date": "2024-01-01 00:00:00", + "start": "2023-12-31T23:00:00.000Z", + "end": "2024-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Mon" + }, + { + "date": "2024-01-06 00:00:00", + "start": "2024-01-05T23:00:00.000Z", + "end": "2024-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Sat" + }, + { + "date": "2024-03-01 00:00:00", + "start": "2024-02-29T23:00:00.000Z", + "end": "2024-03-01T23:00:00.000Z", + "name": "Día de les Illes Balears", + "type": "public", + "rule": "03-01", + "_weekday": "Fri" + }, + { + "date": "2024-03-19 00:00:00", + "start": "2024-03-18T23:00:00.000Z", + "end": "2024-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Tue" + }, + { + "date": "2024-03-28 00:00:00", + "start": "2024-03-27T23:00:00.000Z", + "end": "2024-03-28T23:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2024-03-29 00:00:00", + "start": "2024-03-28T23:00:00.000Z", + "end": "2024-03-29T23:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2024-03-31 00:00:00", + "start": "2024-03-30T23:00:00.000Z", + "end": "2024-03-31T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2024-04-01 00:00:00", + "start": "2024-03-31T22:00:00.000Z", + "end": "2024-04-01T22:00:00.000Z", + "name": "Lunes de Pascua", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2024-05-01 00:00:00", + "start": "2024-04-30T22:00:00.000Z", + "end": "2024-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Wed" + }, + { + "date": "2024-05-05 00:00:00", + "start": "2024-05-04T22:00:00.000Z", + "end": "2024-05-05T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2024-05-19 00:00:00", + "start": "2024-05-18T22:00:00.000Z", + "end": "2024-05-19T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2024-07-25 00:00:00", + "start": "2024-07-24T22:00:00.000Z", + "end": "2024-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Thu" + }, + { + "date": "2024-08-15 00:00:00", + "start": "2024-08-14T22:00:00.000Z", + "end": "2024-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Thu" + }, + { + "date": "2024-10-12 00:00:00", + "start": "2024-10-11T22:00:00.000Z", + "end": "2024-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Sat" + }, + { + "date": "2024-11-01 00:00:00", + "start": "2024-10-31T23:00:00.000Z", + "end": "2024-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Fri" + }, + { + "date": "2024-12-06 00:00:00", + "start": "2024-12-05T23:00:00.000Z", + "end": "2024-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Fri" + }, + { + "date": "2024-12-08 00:00:00", + "start": "2024-12-07T23:00:00.000Z", + "end": "2024-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Sun" + }, + { + "date": "2024-12-09 00:00:00", + "start": "2024-12-08T23:00:00.000Z", + "end": "2024-12-09T23:00:00.000Z", + "name": "La inmaculada concepción (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 12-08 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2024-12-25 00:00:00", + "start": "2024-12-24T23:00:00.000Z", + "end": "2024-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Wed" + }, + { + "date": "2024-12-26 00:00:00", + "start": "2024-12-25T23:00:00.000Z", + "end": "2024-12-26T23:00:00.000Z", + "name": "Sant Esteve", + "type": "observance", + "rule": "12-26", + "_weekday": "Thu" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-IB-2025.json b/test/fixtures/ES-IB-2025.json new file mode 100644 index 000000000..d21f28a64 --- /dev/null +++ b/test/fixtures/ES-IB-2025.json @@ -0,0 +1,184 @@ +[ + { + "date": "2025-01-01 00:00:00", + "start": "2024-12-31T23:00:00.000Z", + "end": "2025-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Wed" + }, + { + "date": "2025-01-06 00:00:00", + "start": "2025-01-05T23:00:00.000Z", + "end": "2025-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Mon" + }, + { + "date": "2025-03-01 00:00:00", + "start": "2025-02-28T23:00:00.000Z", + "end": "2025-03-01T23:00:00.000Z", + "name": "Día de les Illes Balears", + "type": "public", + "rule": "03-01", + "_weekday": "Sat" + }, + { + "date": "2025-03-19 00:00:00", + "start": "2025-03-18T23:00:00.000Z", + "end": "2025-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Wed" + }, + { + "date": "2025-04-17 00:00:00", + "start": "2025-04-16T22:00:00.000Z", + "end": "2025-04-17T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2025-04-18 00:00:00", + "start": "2025-04-17T22:00:00.000Z", + "end": "2025-04-18T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2025-04-20 00:00:00", + "start": "2025-04-19T22:00:00.000Z", + "end": "2025-04-20T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2025-04-21 00:00:00", + "start": "2025-04-20T22:00:00.000Z", + "end": "2025-04-21T22:00:00.000Z", + "name": "Lunes de Pascua", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2025-05-01 00:00:00", + "start": "2025-04-30T22:00:00.000Z", + "end": "2025-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Thu" + }, + { + "date": "2025-05-04 00:00:00", + "start": "2025-05-03T22:00:00.000Z", + "end": "2025-05-04T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2025-06-08 00:00:00", + "start": "2025-06-07T22:00:00.000Z", + "end": "2025-06-08T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2025-07-25 00:00:00", + "start": "2025-07-24T22:00:00.000Z", + "end": "2025-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Fri" + }, + { + "date": "2025-08-15 00:00:00", + "start": "2025-08-14T22:00:00.000Z", + "end": "2025-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Fri" + }, + { + "date": "2025-10-12 00:00:00", + "start": "2025-10-11T22:00:00.000Z", + "end": "2025-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Sun" + }, + { + "date": "2025-10-13 00:00:00", + "start": "2025-10-12T22:00:00.000Z", + "end": "2025-10-13T22:00:00.000Z", + "name": "Fiesta Nacional de España (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 10-12 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2025-11-01 00:00:00", + "start": "2025-10-31T23:00:00.000Z", + "end": "2025-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Sat" + }, + { + "date": "2025-12-06 00:00:00", + "start": "2025-12-05T23:00:00.000Z", + "end": "2025-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Sat" + }, + { + "date": "2025-12-08 00:00:00", + "start": "2025-12-07T23:00:00.000Z", + "end": "2025-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Mon" + }, + { + "date": "2025-12-25 00:00:00", + "start": "2025-12-24T23:00:00.000Z", + "end": "2025-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Thu" + }, + { + "date": "2025-12-26 00:00:00", + "start": "2025-12-25T23:00:00.000Z", + "end": "2025-12-26T23:00:00.000Z", + "name": "Sant Esteve", + "type": "observance", + "rule": "12-26", + "_weekday": "Fri" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-MC-2015.json b/test/fixtures/ES-MC-2015.json new file mode 100644 index 000000000..c3e31406d --- /dev/null +++ b/test/fixtures/ES-MC-2015.json @@ -0,0 +1,167 @@ +[ + { + "date": "2015-01-01 00:00:00", + "start": "2014-12-31T23:00:00.000Z", + "end": "2015-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Thu" + }, + { + "date": "2015-01-06 00:00:00", + "start": "2015-01-05T23:00:00.000Z", + "end": "2015-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Tue" + }, + { + "date": "2015-03-19 00:00:00", + "start": "2015-03-18T23:00:00.000Z", + "end": "2015-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Thu" + }, + { + "date": "2015-04-02 00:00:00", + "start": "2015-04-01T22:00:00.000Z", + "end": "2015-04-02T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2015-04-03 00:00:00", + "start": "2015-04-02T22:00:00.000Z", + "end": "2015-04-03T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2015-04-05 00:00:00", + "start": "2015-04-04T22:00:00.000Z", + "end": "2015-04-05T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2015-05-01 00:00:00", + "start": "2015-04-30T22:00:00.000Z", + "end": "2015-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Fri" + }, + { + "date": "2015-05-03 00:00:00", + "start": "2015-05-02T22:00:00.000Z", + "end": "2015-05-03T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2015-05-24 00:00:00", + "start": "2015-05-23T22:00:00.000Z", + "end": "2015-05-24T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2015-07-25 00:00:00", + "start": "2015-07-24T22:00:00.000Z", + "end": "2015-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Sat" + }, + { + "date": "2015-08-15 00:00:00", + "start": "2015-08-14T22:00:00.000Z", + "end": "2015-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Sat" + }, + { + "date": "2015-10-12 00:00:00", + "start": "2015-10-11T22:00:00.000Z", + "end": "2015-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Mon" + }, + { + "date": "2015-11-01 00:00:00", + "start": "2015-10-31T23:00:00.000Z", + "end": "2015-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Sun" + }, + { + "date": "2015-11-02 00:00:00", + "start": "2015-11-01T23:00:00.000Z", + "end": "2015-11-02T23:00:00.000Z", + "name": "Todos los Santos (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 11-01 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2015-12-06 00:00:00", + "start": "2015-12-05T23:00:00.000Z", + "end": "2015-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Sun" + }, + { + "date": "2015-12-07 00:00:00", + "start": "2015-12-06T23:00:00.000Z", + "end": "2015-12-07T23:00:00.000Z", + "name": "Día de la Constitución Española (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 12-06 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2015-12-08 00:00:00", + "start": "2015-12-07T23:00:00.000Z", + "end": "2015-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Tue" + }, + { + "date": "2015-12-25 00:00:00", + "start": "2015-12-24T23:00:00.000Z", + "end": "2015-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Fri" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-MC-2016.json b/test/fixtures/ES-MC-2016.json new file mode 100644 index 000000000..924fdcb03 --- /dev/null +++ b/test/fixtures/ES-MC-2016.json @@ -0,0 +1,167 @@ +[ + { + "date": "2016-01-01 00:00:00", + "start": "2015-12-31T23:00:00.000Z", + "end": "2016-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Fri" + }, + { + "date": "2016-01-06 00:00:00", + "start": "2016-01-05T23:00:00.000Z", + "end": "2016-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Wed" + }, + { + "date": "2016-03-19 00:00:00", + "start": "2016-03-18T23:00:00.000Z", + "end": "2016-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Sat" + }, + { + "date": "2016-03-24 00:00:00", + "start": "2016-03-23T23:00:00.000Z", + "end": "2016-03-24T23:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2016-03-25 00:00:00", + "start": "2016-03-24T23:00:00.000Z", + "end": "2016-03-25T23:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2016-03-27 00:00:00", + "start": "2016-03-26T23:00:00.000Z", + "end": "2016-03-27T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2016-05-01 00:00:00", + "start": "2016-04-30T22:00:00.000Z", + "end": "2016-05-01T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2016-05-01 00:00:00", + "start": "2016-04-30T22:00:00.000Z", + "end": "2016-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Sun" + }, + { + "date": "2016-05-02 00:00:00", + "start": "2016-05-01T22:00:00.000Z", + "end": "2016-05-02T22:00:00.000Z", + "name": "Día del trabajador (día sustituto)", + "type": "public", + "substitute": true, + "rule": "substitutes 05-01 if Sunday then next Monday", + "_weekday": "Mon" + }, + { + "date": "2016-05-15 00:00:00", + "start": "2016-05-14T22:00:00.000Z", + "end": "2016-05-15T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2016-07-25 00:00:00", + "start": "2016-07-24T22:00:00.000Z", + "end": "2016-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Mon" + }, + { + "date": "2016-08-15 00:00:00", + "start": "2016-08-14T22:00:00.000Z", + "end": "2016-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Mon" + }, + { + "date": "2016-10-12 00:00:00", + "start": "2016-10-11T22:00:00.000Z", + "end": "2016-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Wed" + }, + { + "date": "2016-11-01 00:00:00", + "start": "2016-10-31T23:00:00.000Z", + "end": "2016-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Tue" + }, + { + "date": "2016-12-06 00:00:00", + "start": "2016-12-05T23:00:00.000Z", + "end": "2016-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Tue" + }, + { + "date": "2016-12-08 00:00:00", + "start": "2016-12-07T23:00:00.000Z", + "end": "2016-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Thu" + }, + { + "date": "2016-12-25 00:00:00", + "start": "2016-12-24T23:00:00.000Z", + "end": "2016-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Sun" + }, + { + "date": "2016-12-26 00:00:00", + "start": "2016-12-25T23:00:00.000Z", + "end": "2016-12-26T23:00:00.000Z", + "name": "Navidad (día sustituto)", + "type": "public", + "substitute": true, + "rule": "substitutes 12-25 if sunday then next monday", + "_weekday": "Mon" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-MC-2017.json b/test/fixtures/ES-MC-2017.json new file mode 100644 index 000000000..1ce29aaf9 --- /dev/null +++ b/test/fixtures/ES-MC-2017.json @@ -0,0 +1,157 @@ +[ + { + "date": "2017-01-01 00:00:00", + "start": "2016-12-31T23:00:00.000Z", + "end": "2017-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Sun" + }, + { + "date": "2017-01-02 00:00:00", + "start": "2017-01-01T23:00:00.000Z", + "end": "2017-01-02T23:00:00.000Z", + "name": "Año Nuevo (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 01-01 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2017-01-06 00:00:00", + "start": "2017-01-05T23:00:00.000Z", + "end": "2017-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Fri" + }, + { + "date": "2017-03-19 00:00:00", + "start": "2017-03-18T23:00:00.000Z", + "end": "2017-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Sun" + }, + { + "date": "2017-04-13 00:00:00", + "start": "2017-04-12T22:00:00.000Z", + "end": "2017-04-13T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2017-04-14 00:00:00", + "start": "2017-04-13T22:00:00.000Z", + "end": "2017-04-14T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2017-04-16 00:00:00", + "start": "2017-04-15T22:00:00.000Z", + "end": "2017-04-16T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2017-05-01 00:00:00", + "start": "2017-04-30T22:00:00.000Z", + "end": "2017-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Mon" + }, + { + "date": "2017-05-07 00:00:00", + "start": "2017-05-06T22:00:00.000Z", + "end": "2017-05-07T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2017-06-04 00:00:00", + "start": "2017-06-03T22:00:00.000Z", + "end": "2017-06-04T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2017-07-25 00:00:00", + "start": "2017-07-24T22:00:00.000Z", + "end": "2017-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Tue" + }, + { + "date": "2017-08-15 00:00:00", + "start": "2017-08-14T22:00:00.000Z", + "end": "2017-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Tue" + }, + { + "date": "2017-10-12 00:00:00", + "start": "2017-10-11T22:00:00.000Z", + "end": "2017-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Thu" + }, + { + "date": "2017-11-01 00:00:00", + "start": "2017-10-31T23:00:00.000Z", + "end": "2017-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Wed" + }, + { + "date": "2017-12-06 00:00:00", + "start": "2017-12-05T23:00:00.000Z", + "end": "2017-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Wed" + }, + { + "date": "2017-12-08 00:00:00", + "start": "2017-12-07T23:00:00.000Z", + "end": "2017-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Fri" + }, + { + "date": "2017-12-25 00:00:00", + "start": "2017-12-24T23:00:00.000Z", + "end": "2017-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Mon" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-MC-2018.json b/test/fixtures/ES-MC-2018.json new file mode 100644 index 000000000..3df60d481 --- /dev/null +++ b/test/fixtures/ES-MC-2018.json @@ -0,0 +1,147 @@ +[ + { + "date": "2018-01-01 00:00:00", + "start": "2017-12-31T23:00:00.000Z", + "end": "2018-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Mon" + }, + { + "date": "2018-01-06 00:00:00", + "start": "2018-01-05T23:00:00.000Z", + "end": "2018-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Sat" + }, + { + "date": "2018-03-19 00:00:00", + "start": "2018-03-18T23:00:00.000Z", + "end": "2018-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Mon" + }, + { + "date": "2018-03-29 00:00:00", + "start": "2018-03-28T22:00:00.000Z", + "end": "2018-03-29T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2018-03-30 00:00:00", + "start": "2018-03-29T22:00:00.000Z", + "end": "2018-03-30T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2018-04-01 00:00:00", + "start": "2018-03-31T22:00:00.000Z", + "end": "2018-04-01T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2018-05-01 00:00:00", + "start": "2018-04-30T22:00:00.000Z", + "end": "2018-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Tue" + }, + { + "date": "2018-05-06 00:00:00", + "start": "2018-05-05T22:00:00.000Z", + "end": "2018-05-06T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2018-05-20 00:00:00", + "start": "2018-05-19T22:00:00.000Z", + "end": "2018-05-20T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2018-07-25 00:00:00", + "start": "2018-07-24T22:00:00.000Z", + "end": "2018-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Wed" + }, + { + "date": "2018-08-15 00:00:00", + "start": "2018-08-14T22:00:00.000Z", + "end": "2018-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Wed" + }, + { + "date": "2018-10-12 00:00:00", + "start": "2018-10-11T22:00:00.000Z", + "end": "2018-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Fri" + }, + { + "date": "2018-11-01 00:00:00", + "start": "2018-10-31T23:00:00.000Z", + "end": "2018-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Thu" + }, + { + "date": "2018-12-06 00:00:00", + "start": "2018-12-05T23:00:00.000Z", + "end": "2018-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Thu" + }, + { + "date": "2018-12-08 00:00:00", + "start": "2018-12-07T23:00:00.000Z", + "end": "2018-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Sat" + }, + { + "date": "2018-12-25 00:00:00", + "start": "2018-12-24T23:00:00.000Z", + "end": "2018-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Tue" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-MC-2019.json b/test/fixtures/ES-MC-2019.json new file mode 100644 index 000000000..28c8331e2 --- /dev/null +++ b/test/fixtures/ES-MC-2019.json @@ -0,0 +1,167 @@ +[ + { + "date": "2019-01-01 00:00:00", + "start": "2018-12-31T23:00:00.000Z", + "end": "2019-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Tue" + }, + { + "date": "2019-01-06 00:00:00", + "start": "2019-01-05T23:00:00.000Z", + "end": "2019-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Sun" + }, + { + "date": "2019-01-07 00:00:00", + "start": "2019-01-06T23:00:00.000Z", + "end": "2019-01-07T23:00:00.000Z", + "name": "Día de los Reyes Magos (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 01-06 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2019-03-19 00:00:00", + "start": "2019-03-18T23:00:00.000Z", + "end": "2019-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Tue" + }, + { + "date": "2019-04-18 00:00:00", + "start": "2019-04-17T22:00:00.000Z", + "end": "2019-04-18T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2019-04-19 00:00:00", + "start": "2019-04-18T22:00:00.000Z", + "end": "2019-04-19T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2019-04-21 00:00:00", + "start": "2019-04-20T22:00:00.000Z", + "end": "2019-04-21T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2019-05-01 00:00:00", + "start": "2019-04-30T22:00:00.000Z", + "end": "2019-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Wed" + }, + { + "date": "2019-05-05 00:00:00", + "start": "2019-05-04T22:00:00.000Z", + "end": "2019-05-05T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2019-06-09 00:00:00", + "start": "2019-06-08T22:00:00.000Z", + "end": "2019-06-09T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2019-07-25 00:00:00", + "start": "2019-07-24T22:00:00.000Z", + "end": "2019-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Thu" + }, + { + "date": "2019-08-15 00:00:00", + "start": "2019-08-14T22:00:00.000Z", + "end": "2019-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Thu" + }, + { + "date": "2019-10-12 00:00:00", + "start": "2019-10-11T22:00:00.000Z", + "end": "2019-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Sat" + }, + { + "date": "2019-11-01 00:00:00", + "start": "2019-10-31T23:00:00.000Z", + "end": "2019-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Fri" + }, + { + "date": "2019-12-06 00:00:00", + "start": "2019-12-05T23:00:00.000Z", + "end": "2019-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Fri" + }, + { + "date": "2019-12-08 00:00:00", + "start": "2019-12-07T23:00:00.000Z", + "end": "2019-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Sun" + }, + { + "date": "2019-12-09 00:00:00", + "start": "2019-12-08T23:00:00.000Z", + "end": "2019-12-09T23:00:00.000Z", + "name": "La inmaculada concepción (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 12-08 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2019-12-25 00:00:00", + "start": "2019-12-24T23:00:00.000Z", + "end": "2019-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Wed" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-MC-2020.json b/test/fixtures/ES-MC-2020.json new file mode 100644 index 000000000..a15502df7 --- /dev/null +++ b/test/fixtures/ES-MC-2020.json @@ -0,0 +1,167 @@ +[ + { + "date": "2020-01-01 00:00:00", + "start": "2019-12-31T23:00:00.000Z", + "end": "2020-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Wed" + }, + { + "date": "2020-01-06 00:00:00", + "start": "2020-01-05T23:00:00.000Z", + "end": "2020-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Mon" + }, + { + "date": "2020-03-19 00:00:00", + "start": "2020-03-18T23:00:00.000Z", + "end": "2020-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Thu" + }, + { + "date": "2020-04-09 00:00:00", + "start": "2020-04-08T22:00:00.000Z", + "end": "2020-04-09T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2020-04-10 00:00:00", + "start": "2020-04-09T22:00:00.000Z", + "end": "2020-04-10T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2020-04-12 00:00:00", + "start": "2020-04-11T22:00:00.000Z", + "end": "2020-04-12T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2020-05-01 00:00:00", + "start": "2020-04-30T22:00:00.000Z", + "end": "2020-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Fri" + }, + { + "date": "2020-05-03 00:00:00", + "start": "2020-05-02T22:00:00.000Z", + "end": "2020-05-03T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2020-05-31 00:00:00", + "start": "2020-05-30T22:00:00.000Z", + "end": "2020-05-31T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2020-07-25 00:00:00", + "start": "2020-07-24T22:00:00.000Z", + "end": "2020-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Sat" + }, + { + "date": "2020-08-15 00:00:00", + "start": "2020-08-14T22:00:00.000Z", + "end": "2020-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Sat" + }, + { + "date": "2020-10-12 00:00:00", + "start": "2020-10-11T22:00:00.000Z", + "end": "2020-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Mon" + }, + { + "date": "2020-11-01 00:00:00", + "start": "2020-10-31T23:00:00.000Z", + "end": "2020-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Sun" + }, + { + "date": "2020-11-02 00:00:00", + "start": "2020-11-01T23:00:00.000Z", + "end": "2020-11-02T23:00:00.000Z", + "name": "Todos los Santos (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 11-01 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2020-12-06 00:00:00", + "start": "2020-12-05T23:00:00.000Z", + "end": "2020-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Sun" + }, + { + "date": "2020-12-07 00:00:00", + "start": "2020-12-06T23:00:00.000Z", + "end": "2020-12-07T23:00:00.000Z", + "name": "Día de la Constitución Española (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 12-06 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2020-12-08 00:00:00", + "start": "2020-12-07T23:00:00.000Z", + "end": "2020-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Tue" + }, + { + "date": "2020-12-25 00:00:00", + "start": "2020-12-24T23:00:00.000Z", + "end": "2020-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Fri" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-MC-2021.json b/test/fixtures/ES-MC-2021.json new file mode 100644 index 000000000..1a14873c2 --- /dev/null +++ b/test/fixtures/ES-MC-2021.json @@ -0,0 +1,147 @@ +[ + { + "date": "2021-01-01 00:00:00", + "start": "2020-12-31T23:00:00.000Z", + "end": "2021-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Fri" + }, + { + "date": "2021-01-06 00:00:00", + "start": "2021-01-05T23:00:00.000Z", + "end": "2021-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Wed" + }, + { + "date": "2021-03-19 00:00:00", + "start": "2021-03-18T23:00:00.000Z", + "end": "2021-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Fri" + }, + { + "date": "2021-04-01 00:00:00", + "start": "2021-03-31T22:00:00.000Z", + "end": "2021-04-01T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2021-04-02 00:00:00", + "start": "2021-04-01T22:00:00.000Z", + "end": "2021-04-02T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2021-04-04 00:00:00", + "start": "2021-04-03T22:00:00.000Z", + "end": "2021-04-04T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2021-05-01 00:00:00", + "start": "2021-04-30T22:00:00.000Z", + "end": "2021-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Sat" + }, + { + "date": "2021-05-02 00:00:00", + "start": "2021-05-01T22:00:00.000Z", + "end": "2021-05-02T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2021-05-23 00:00:00", + "start": "2021-05-22T22:00:00.000Z", + "end": "2021-05-23T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2021-07-25 00:00:00", + "start": "2021-07-24T22:00:00.000Z", + "end": "2021-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Sun" + }, + { + "date": "2021-08-15 00:00:00", + "start": "2021-08-14T22:00:00.000Z", + "end": "2021-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Sun" + }, + { + "date": "2021-10-12 00:00:00", + "start": "2021-10-11T22:00:00.000Z", + "end": "2021-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Tue" + }, + { + "date": "2021-11-01 00:00:00", + "start": "2021-10-31T23:00:00.000Z", + "end": "2021-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Mon" + }, + { + "date": "2021-12-06 00:00:00", + "start": "2021-12-05T23:00:00.000Z", + "end": "2021-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Mon" + }, + { + "date": "2021-12-08 00:00:00", + "start": "2021-12-07T23:00:00.000Z", + "end": "2021-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Wed" + }, + { + "date": "2021-12-25 00:00:00", + "start": "2021-12-24T23:00:00.000Z", + "end": "2021-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Sat" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-MC-2022.json b/test/fixtures/ES-MC-2022.json new file mode 100644 index 000000000..072c9b24f --- /dev/null +++ b/test/fixtures/ES-MC-2022.json @@ -0,0 +1,167 @@ +[ + { + "date": "2022-01-01 00:00:00", + "start": "2021-12-31T23:00:00.000Z", + "end": "2022-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Sat" + }, + { + "date": "2022-01-06 00:00:00", + "start": "2022-01-05T23:00:00.000Z", + "end": "2022-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Thu" + }, + { + "date": "2022-03-19 00:00:00", + "start": "2022-03-18T23:00:00.000Z", + "end": "2022-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Sat" + }, + { + "date": "2022-04-14 00:00:00", + "start": "2022-04-13T22:00:00.000Z", + "end": "2022-04-14T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2022-04-15 00:00:00", + "start": "2022-04-14T22:00:00.000Z", + "end": "2022-04-15T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2022-04-17 00:00:00", + "start": "2022-04-16T22:00:00.000Z", + "end": "2022-04-17T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2022-05-01 00:00:00", + "start": "2022-04-30T22:00:00.000Z", + "end": "2022-05-01T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2022-05-01 00:00:00", + "start": "2022-04-30T22:00:00.000Z", + "end": "2022-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Sun" + }, + { + "date": "2022-05-02 00:00:00", + "start": "2022-05-01T22:00:00.000Z", + "end": "2022-05-02T22:00:00.000Z", + "name": "Día del trabajador (día sustituto)", + "type": "public", + "substitute": true, + "rule": "substitutes 05-01 if Sunday then next Monday", + "_weekday": "Mon" + }, + { + "date": "2022-06-05 00:00:00", + "start": "2022-06-04T22:00:00.000Z", + "end": "2022-06-05T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2022-07-25 00:00:00", + "start": "2022-07-24T22:00:00.000Z", + "end": "2022-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Mon" + }, + { + "date": "2022-08-15 00:00:00", + "start": "2022-08-14T22:00:00.000Z", + "end": "2022-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Mon" + }, + { + "date": "2022-10-12 00:00:00", + "start": "2022-10-11T22:00:00.000Z", + "end": "2022-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Wed" + }, + { + "date": "2022-11-01 00:00:00", + "start": "2022-10-31T23:00:00.000Z", + "end": "2022-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Tue" + }, + { + "date": "2022-12-06 00:00:00", + "start": "2022-12-05T23:00:00.000Z", + "end": "2022-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Tue" + }, + { + "date": "2022-12-08 00:00:00", + "start": "2022-12-07T23:00:00.000Z", + "end": "2022-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Thu" + }, + { + "date": "2022-12-25 00:00:00", + "start": "2022-12-24T23:00:00.000Z", + "end": "2022-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Sun" + }, + { + "date": "2022-12-26 00:00:00", + "start": "2022-12-25T23:00:00.000Z", + "end": "2022-12-26T23:00:00.000Z", + "name": "Navidad (día sustituto)", + "type": "public", + "substitute": true, + "rule": "substitutes 12-25 if sunday then next monday", + "_weekday": "Mon" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-MC-2023.json b/test/fixtures/ES-MC-2023.json new file mode 100644 index 000000000..7ed847d4b --- /dev/null +++ b/test/fixtures/ES-MC-2023.json @@ -0,0 +1,157 @@ +[ + { + "date": "2023-01-01 00:00:00", + "start": "2022-12-31T23:00:00.000Z", + "end": "2023-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Sun" + }, + { + "date": "2023-01-02 00:00:00", + "start": "2023-01-01T23:00:00.000Z", + "end": "2023-01-02T23:00:00.000Z", + "name": "Año Nuevo (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 01-01 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2023-01-06 00:00:00", + "start": "2023-01-05T23:00:00.000Z", + "end": "2023-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Fri" + }, + { + "date": "2023-03-19 00:00:00", + "start": "2023-03-18T23:00:00.000Z", + "end": "2023-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Sun" + }, + { + "date": "2023-04-06 00:00:00", + "start": "2023-04-05T22:00:00.000Z", + "end": "2023-04-06T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2023-04-07 00:00:00", + "start": "2023-04-06T22:00:00.000Z", + "end": "2023-04-07T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2023-04-09 00:00:00", + "start": "2023-04-08T22:00:00.000Z", + "end": "2023-04-09T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2023-05-01 00:00:00", + "start": "2023-04-30T22:00:00.000Z", + "end": "2023-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Mon" + }, + { + "date": "2023-05-07 00:00:00", + "start": "2023-05-06T22:00:00.000Z", + "end": "2023-05-07T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2023-05-28 00:00:00", + "start": "2023-05-27T22:00:00.000Z", + "end": "2023-05-28T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2023-07-25 00:00:00", + "start": "2023-07-24T22:00:00.000Z", + "end": "2023-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Tue" + }, + { + "date": "2023-08-15 00:00:00", + "start": "2023-08-14T22:00:00.000Z", + "end": "2023-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Tue" + }, + { + "date": "2023-10-12 00:00:00", + "start": "2023-10-11T22:00:00.000Z", + "end": "2023-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Thu" + }, + { + "date": "2023-11-01 00:00:00", + "start": "2023-10-31T23:00:00.000Z", + "end": "2023-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Wed" + }, + { + "date": "2023-12-06 00:00:00", + "start": "2023-12-05T23:00:00.000Z", + "end": "2023-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Wed" + }, + { + "date": "2023-12-08 00:00:00", + "start": "2023-12-07T23:00:00.000Z", + "end": "2023-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Fri" + }, + { + "date": "2023-12-25 00:00:00", + "start": "2023-12-24T23:00:00.000Z", + "end": "2023-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Mon" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-MC-2024.json b/test/fixtures/ES-MC-2024.json new file mode 100644 index 000000000..7c35a9e6f --- /dev/null +++ b/test/fixtures/ES-MC-2024.json @@ -0,0 +1,157 @@ +[ + { + "date": "2024-01-01 00:00:00", + "start": "2023-12-31T23:00:00.000Z", + "end": "2024-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Mon" + }, + { + "date": "2024-01-06 00:00:00", + "start": "2024-01-05T23:00:00.000Z", + "end": "2024-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Sat" + }, + { + "date": "2024-03-19 00:00:00", + "start": "2024-03-18T23:00:00.000Z", + "end": "2024-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Tue" + }, + { + "date": "2024-03-28 00:00:00", + "start": "2024-03-27T23:00:00.000Z", + "end": "2024-03-28T23:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2024-03-29 00:00:00", + "start": "2024-03-28T23:00:00.000Z", + "end": "2024-03-29T23:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2024-03-31 00:00:00", + "start": "2024-03-30T23:00:00.000Z", + "end": "2024-03-31T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2024-05-01 00:00:00", + "start": "2024-04-30T22:00:00.000Z", + "end": "2024-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Wed" + }, + { + "date": "2024-05-05 00:00:00", + "start": "2024-05-04T22:00:00.000Z", + "end": "2024-05-05T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2024-05-19 00:00:00", + "start": "2024-05-18T22:00:00.000Z", + "end": "2024-05-19T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2024-07-25 00:00:00", + "start": "2024-07-24T22:00:00.000Z", + "end": "2024-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Thu" + }, + { + "date": "2024-08-15 00:00:00", + "start": "2024-08-14T22:00:00.000Z", + "end": "2024-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Thu" + }, + { + "date": "2024-10-12 00:00:00", + "start": "2024-10-11T22:00:00.000Z", + "end": "2024-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Sat" + }, + { + "date": "2024-11-01 00:00:00", + "start": "2024-10-31T23:00:00.000Z", + "end": "2024-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Fri" + }, + { + "date": "2024-12-06 00:00:00", + "start": "2024-12-05T23:00:00.000Z", + "end": "2024-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Fri" + }, + { + "date": "2024-12-08 00:00:00", + "start": "2024-12-07T23:00:00.000Z", + "end": "2024-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Sun" + }, + { + "date": "2024-12-09 00:00:00", + "start": "2024-12-08T23:00:00.000Z", + "end": "2024-12-09T23:00:00.000Z", + "name": "La inmaculada concepción (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 12-08 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2024-12-25 00:00:00", + "start": "2024-12-24T23:00:00.000Z", + "end": "2024-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Wed" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-MC-2025.json b/test/fixtures/ES-MC-2025.json new file mode 100644 index 000000000..fdf56a610 --- /dev/null +++ b/test/fixtures/ES-MC-2025.json @@ -0,0 +1,157 @@ +[ + { + "date": "2025-01-01 00:00:00", + "start": "2024-12-31T23:00:00.000Z", + "end": "2025-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Wed" + }, + { + "date": "2025-01-06 00:00:00", + "start": "2025-01-05T23:00:00.000Z", + "end": "2025-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Mon" + }, + { + "date": "2025-03-19 00:00:00", + "start": "2025-03-18T23:00:00.000Z", + "end": "2025-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Wed" + }, + { + "date": "2025-04-17 00:00:00", + "start": "2025-04-16T22:00:00.000Z", + "end": "2025-04-17T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2025-04-18 00:00:00", + "start": "2025-04-17T22:00:00.000Z", + "end": "2025-04-18T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2025-04-20 00:00:00", + "start": "2025-04-19T22:00:00.000Z", + "end": "2025-04-20T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2025-05-01 00:00:00", + "start": "2025-04-30T22:00:00.000Z", + "end": "2025-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Thu" + }, + { + "date": "2025-05-04 00:00:00", + "start": "2025-05-03T22:00:00.000Z", + "end": "2025-05-04T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2025-06-08 00:00:00", + "start": "2025-06-07T22:00:00.000Z", + "end": "2025-06-08T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2025-07-25 00:00:00", + "start": "2025-07-24T22:00:00.000Z", + "end": "2025-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Fri" + }, + { + "date": "2025-08-15 00:00:00", + "start": "2025-08-14T22:00:00.000Z", + "end": "2025-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Fri" + }, + { + "date": "2025-10-12 00:00:00", + "start": "2025-10-11T22:00:00.000Z", + "end": "2025-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Sun" + }, + { + "date": "2025-10-13 00:00:00", + "start": "2025-10-12T22:00:00.000Z", + "end": "2025-10-13T22:00:00.000Z", + "name": "Fiesta Nacional de España (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 10-12 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2025-11-01 00:00:00", + "start": "2025-10-31T23:00:00.000Z", + "end": "2025-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Sat" + }, + { + "date": "2025-12-06 00:00:00", + "start": "2025-12-05T23:00:00.000Z", + "end": "2025-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Sat" + }, + { + "date": "2025-12-08 00:00:00", + "start": "2025-12-07T23:00:00.000Z", + "end": "2025-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Mon" + }, + { + "date": "2025-12-25 00:00:00", + "start": "2025-12-24T23:00:00.000Z", + "end": "2025-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Thu" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-MD-2015.json b/test/fixtures/ES-MD-2015.json index d51251cb3..0adb3a319 100644 --- a/test/fixtures/ES-MD-2015.json +++ b/test/fixtures/ES-MD-2015.json @@ -31,7 +31,7 @@ "start": "2015-04-01T22:00:00.000Z", "end": "2015-04-02T22:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, @@ -62,6 +62,15 @@ "rule": "05-01", "_weekday": "Fri" }, + { + "date": "2015-05-02 00:00:00", + "start": "2015-05-01T22:00:00.000Z", + "end": "2015-05-02T22:00:00.000Z", + "name": "Día de la Comunidad de Madrid", + "type": "public", + "rule": "05-02 if Sunday then next Monday", + "_weekday": "Sat" + }, { "date": "2015-05-03 00:00:00", "start": "2015-05-02T22:00:00.000Z", @@ -76,7 +85,7 @@ "start": "2015-05-15T22:00:00.000Z", "end": "2015-05-16T22:00:00.000Z", "name": "San Isidro Labrador", - "type": "public", + "type": "observance", "rule": "05-16", "_weekday": "Sat" }, @@ -93,8 +102,8 @@ "date": "2015-07-25 00:00:00", "start": "2015-07-24T22:00:00.000Z", "end": "2015-07-25T22:00:00.000Z", - "name": "Santiago Apostol", - "type": "observance", + "name": "Santiago Apóstol", + "type": "public", "note": "regional", "rule": "07-25", "_weekday": "Sat" @@ -141,7 +150,7 @@ "start": "2015-11-08T23:00:00.000Z", "end": "2015-11-09T23:00:00.000Z", "name": "Nuestra Señora de la Almudena", - "type": "public", + "type": "observance", "rule": "11-09 if sunday then next monday", "_weekday": "Mon" }, diff --git a/test/fixtures/ES-MD-2016.json b/test/fixtures/ES-MD-2016.json index 6fc8daca1..85945527d 100644 --- a/test/fixtures/ES-MD-2016.json +++ b/test/fixtures/ES-MD-2016.json @@ -31,7 +31,7 @@ "start": "2016-03-23T23:00:00.000Z", "end": "2016-03-24T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, @@ -75,10 +75,9 @@ "date": "2016-05-02 00:00:00", "start": "2016-05-01T22:00:00.000Z", "end": "2016-05-02T22:00:00.000Z", - "name": "Día del trabajador (día sustituto)", - "type": "observance", - "substitute": true, - "rule": "substitutes 05-01 if sunday then next monday", + "name": "Día de la Comunidad de Madrid", + "type": "public", + "rule": "05-02 if Sunday then next Monday", "_weekday": "Mon" }, { @@ -95,7 +94,7 @@ "start": "2016-05-15T22:00:00.000Z", "end": "2016-05-16T22:00:00.000Z", "name": "San Isidro Labrador", - "type": "public", + "type": "observance", "rule": "05-16", "_weekday": "Mon" }, @@ -103,8 +102,8 @@ "date": "2016-07-25 00:00:00", "start": "2016-07-24T22:00:00.000Z", "end": "2016-07-25T22:00:00.000Z", - "name": "Santiago Apostol", - "type": "observance", + "name": "Santiago Apóstol", + "type": "public", "note": "regional", "rule": "07-25", "_weekday": "Mon" @@ -141,7 +140,7 @@ "start": "2016-11-08T23:00:00.000Z", "end": "2016-11-09T23:00:00.000Z", "name": "Nuestra Señora de la Almudena", - "type": "public", + "type": "observance", "rule": "11-09 if sunday then next monday", "_weekday": "Wed" }, @@ -177,7 +176,7 @@ "start": "2016-12-25T23:00:00.000Z", "end": "2016-12-26T23:00:00.000Z", "name": "Navidad (día sustituto)", - "type": "observance", + "type": "public", "substitute": true, "rule": "substitutes 12-25 if sunday then next monday", "_weekday": "Mon" diff --git a/test/fixtures/ES-MD-2017.json b/test/fixtures/ES-MD-2017.json index 837b2db8d..8570c7a1f 100644 --- a/test/fixtures/ES-MD-2017.json +++ b/test/fixtures/ES-MD-2017.json @@ -41,7 +41,7 @@ "start": "2017-04-12T22:00:00.000Z", "end": "2017-04-13T22:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, @@ -72,6 +72,15 @@ "rule": "05-01", "_weekday": "Mon" }, + { + "date": "2017-05-02 00:00:00", + "start": "2017-05-01T22:00:00.000Z", + "end": "2017-05-02T22:00:00.000Z", + "name": "Día de la Comunidad de Madrid", + "type": "public", + "rule": "05-02 if Sunday then next Monday", + "_weekday": "Tue" + }, { "date": "2017-05-07 00:00:00", "start": "2017-05-06T22:00:00.000Z", @@ -86,7 +95,7 @@ "start": "2017-05-15T22:00:00.000Z", "end": "2017-05-16T22:00:00.000Z", "name": "San Isidro Labrador", - "type": "public", + "type": "observance", "rule": "05-16", "_weekday": "Tue" }, @@ -103,8 +112,8 @@ "date": "2017-07-25 00:00:00", "start": "2017-07-24T22:00:00.000Z", "end": "2017-07-25T22:00:00.000Z", - "name": "Santiago Apostol", - "type": "observance", + "name": "Santiago Apóstol", + "type": "public", "note": "regional", "rule": "07-25", "_weekday": "Tue" @@ -141,7 +150,7 @@ "start": "2017-11-08T23:00:00.000Z", "end": "2017-11-09T23:00:00.000Z", "name": "Nuestra Señora de la Almudena", - "type": "public", + "type": "observance", "rule": "11-09 if sunday then next monday", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-MD-2018.json b/test/fixtures/ES-MD-2018.json index 8efe8cbda..7ec6a9239 100644 --- a/test/fixtures/ES-MD-2018.json +++ b/test/fixtures/ES-MD-2018.json @@ -31,7 +31,7 @@ "start": "2018-03-28T22:00:00.000Z", "end": "2018-03-29T22:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, @@ -62,6 +62,15 @@ "rule": "05-01", "_weekday": "Tue" }, + { + "date": "2018-05-02 00:00:00", + "start": "2018-05-01T22:00:00.000Z", + "end": "2018-05-02T22:00:00.000Z", + "name": "Día de la Comunidad de Madrid", + "type": "public", + "rule": "05-02 if Sunday then next Monday", + "_weekday": "Wed" + }, { "date": "2018-05-06 00:00:00", "start": "2018-05-05T22:00:00.000Z", @@ -76,7 +85,7 @@ "start": "2018-05-15T22:00:00.000Z", "end": "2018-05-16T22:00:00.000Z", "name": "San Isidro Labrador", - "type": "public", + "type": "observance", "rule": "05-16", "_weekday": "Wed" }, @@ -93,8 +102,8 @@ "date": "2018-07-25 00:00:00", "start": "2018-07-24T22:00:00.000Z", "end": "2018-07-25T22:00:00.000Z", - "name": "Santiago Apostol", - "type": "observance", + "name": "Santiago Apóstol", + "type": "public", "note": "regional", "rule": "07-25", "_weekday": "Wed" @@ -131,7 +140,7 @@ "start": "2018-11-08T23:00:00.000Z", "end": "2018-11-09T23:00:00.000Z", "name": "Nuestra Señora de la Almudena", - "type": "public", + "type": "observance", "rule": "11-09 if sunday then next monday", "_weekday": "Fri" }, diff --git a/test/fixtures/ES-MD-2019.json b/test/fixtures/ES-MD-2019.json index 0b9e89409..76e3b8dc5 100644 --- a/test/fixtures/ES-MD-2019.json +++ b/test/fixtures/ES-MD-2019.json @@ -41,7 +41,7 @@ "start": "2019-04-17T22:00:00.000Z", "end": "2019-04-18T22:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, @@ -72,6 +72,15 @@ "rule": "05-01", "_weekday": "Wed" }, + { + "date": "2019-05-02 00:00:00", + "start": "2019-05-01T22:00:00.000Z", + "end": "2019-05-02T22:00:00.000Z", + "name": "Día de la Comunidad de Madrid", + "type": "public", + "rule": "05-02 if Sunday then next Monday", + "_weekday": "Thu" + }, { "date": "2019-05-05 00:00:00", "start": "2019-05-04T22:00:00.000Z", @@ -86,7 +95,7 @@ "start": "2019-05-15T22:00:00.000Z", "end": "2019-05-16T22:00:00.000Z", "name": "San Isidro Labrador", - "type": "public", + "type": "observance", "rule": "05-16", "_weekday": "Thu" }, @@ -103,8 +112,8 @@ "date": "2019-07-25 00:00:00", "start": "2019-07-24T22:00:00.000Z", "end": "2019-07-25T22:00:00.000Z", - "name": "Santiago Apostol", - "type": "observance", + "name": "Santiago Apóstol", + "type": "public", "note": "regional", "rule": "07-25", "_weekday": "Thu" @@ -141,7 +150,7 @@ "start": "2019-11-08T23:00:00.000Z", "end": "2019-11-09T23:00:00.000Z", "name": "Nuestra Señora de la Almudena", - "type": "public", + "type": "observance", "rule": "11-09 if sunday then next monday", "_weekday": "Sat" }, diff --git a/test/fixtures/ES-MD-2020.json b/test/fixtures/ES-MD-2020.json index e008e820e..8e216a0bf 100644 --- a/test/fixtures/ES-MD-2020.json +++ b/test/fixtures/ES-MD-2020.json @@ -31,7 +31,7 @@ "start": "2020-04-08T22:00:00.000Z", "end": "2020-04-09T22:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, @@ -62,6 +62,15 @@ "rule": "05-01", "_weekday": "Fri" }, + { + "date": "2020-05-02 00:00:00", + "start": "2020-05-01T22:00:00.000Z", + "end": "2020-05-02T22:00:00.000Z", + "name": "Día de la Comunidad de Madrid", + "type": "public", + "rule": "05-02 if Sunday then next Monday", + "_weekday": "Sat" + }, { "date": "2020-05-03 00:00:00", "start": "2020-05-02T22:00:00.000Z", @@ -76,7 +85,7 @@ "start": "2020-05-15T22:00:00.000Z", "end": "2020-05-16T22:00:00.000Z", "name": "San Isidro Labrador", - "type": "public", + "type": "observance", "rule": "05-16", "_weekday": "Sat" }, @@ -93,8 +102,8 @@ "date": "2020-07-25 00:00:00", "start": "2020-07-24T22:00:00.000Z", "end": "2020-07-25T22:00:00.000Z", - "name": "Santiago Apostol", - "type": "observance", + "name": "Santiago Apóstol", + "type": "public", "note": "regional", "rule": "07-25", "_weekday": "Sat" @@ -141,7 +150,7 @@ "start": "2020-11-08T23:00:00.000Z", "end": "2020-11-09T23:00:00.000Z", "name": "Nuestra Señora de la Almudena", - "type": "public", + "type": "observance", "rule": "11-09 if sunday then next monday", "_weekday": "Mon" }, diff --git a/test/fixtures/ES-MD-2021.json b/test/fixtures/ES-MD-2021.json index 06c50ad9f..fc7ef0439 100644 --- a/test/fixtures/ES-MD-2021.json +++ b/test/fixtures/ES-MD-2021.json @@ -31,7 +31,7 @@ "start": "2021-03-31T22:00:00.000Z", "end": "2021-04-01T22:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, @@ -71,12 +71,31 @@ "rule": "1st sunday in May", "_weekday": "Sun" }, + { + "date": "2021-05-03 00:00:00", + "start": "2021-05-02T22:00:00.000Z", + "end": "2021-05-03T22:00:00.000Z", + "name": "Día de la Comunidad de Madrid", + "type": "public", + "rule": "05-02 if Sunday then next Monday", + "_weekday": "Mon" + }, + { + "date": "2021-05-03 00:00:00", + "start": "2021-05-02T22:00:00.000Z", + "end": "2021-05-03T22:00:00.000Z", + "name": "Día de la Comunidad de Madrid (día sustituto)", + "type": "public", + "substitute": true, + "rule": "substitutes 05-02 if Sunday then next Monday", + "_weekday": "Mon" + }, { "date": "2021-05-16 00:00:00", "start": "2021-05-15T22:00:00.000Z", "end": "2021-05-16T22:00:00.000Z", "name": "San Isidro Labrador", - "type": "public", + "type": "observance", "rule": "05-16", "_weekday": "Sun" }, @@ -93,12 +112,22 @@ "date": "2021-07-25 00:00:00", "start": "2021-07-24T22:00:00.000Z", "end": "2021-07-25T22:00:00.000Z", - "name": "Santiago Apostol", - "type": "observance", + "name": "Santiago Apóstol", + "type": "public", "note": "regional", "rule": "07-25", "_weekday": "Sun" }, + { + "date": "2021-07-26 00:00:00", + "start": "2021-07-25T22:00:00.000Z", + "end": "2021-07-26T22:00:00.000Z", + "name": "Santiago Apóstol", + "type": "public", + "substitute": true, + "rule": "substitutes 07-25 if Sunday then next Monday", + "_weekday": "Mon" + }, { "date": "2021-08-15 00:00:00", "start": "2021-08-14T22:00:00.000Z", @@ -108,16 +137,6 @@ "rule": "08-15", "_weekday": "Sun" }, - { - "date": "2021-08-16 00:00:00", - "start": "2021-08-15T22:00:00.000Z", - "end": "2021-08-16T22:00:00.000Z", - "name": "Asunción (día sustituto)", - "type": "observance", - "substitute": true, - "rule": "substitutes 08-15 if sunday then next monday", - "_weekday": "Mon" - }, { "date": "2021-10-12 00:00:00", "start": "2021-10-11T22:00:00.000Z", @@ -141,7 +160,7 @@ "start": "2021-11-08T23:00:00.000Z", "end": "2021-11-09T23:00:00.000Z", "name": "Nuestra Señora de la Almudena", - "type": "public", + "type": "observance", "rule": "11-09 if sunday then next monday", "_weekday": "Tue" }, diff --git a/test/fixtures/ES-MD-2022.json b/test/fixtures/ES-MD-2022.json index 1c0abfe01..90bfc5de9 100644 --- a/test/fixtures/ES-MD-2022.json +++ b/test/fixtures/ES-MD-2022.json @@ -31,7 +31,7 @@ "start": "2022-04-13T22:00:00.000Z", "end": "2022-04-14T22:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, @@ -75,10 +75,9 @@ "date": "2022-05-02 00:00:00", "start": "2022-05-01T22:00:00.000Z", "end": "2022-05-02T22:00:00.000Z", - "name": "Día del trabajador (día sustituto)", - "type": "observance", - "substitute": true, - "rule": "substitutes 05-01 if sunday then next monday", + "name": "Día de la Comunidad de Madrid", + "type": "public", + "rule": "05-02 if Sunday then next Monday", "_weekday": "Mon" }, { @@ -86,7 +85,7 @@ "start": "2022-05-15T22:00:00.000Z", "end": "2022-05-16T22:00:00.000Z", "name": "San Isidro Labrador", - "type": "public", + "type": "observance", "rule": "05-16", "_weekday": "Mon" }, @@ -103,8 +102,8 @@ "date": "2022-07-25 00:00:00", "start": "2022-07-24T22:00:00.000Z", "end": "2022-07-25T22:00:00.000Z", - "name": "Santiago Apostol", - "type": "observance", + "name": "Santiago Apóstol", + "type": "public", "note": "regional", "rule": "07-25", "_weekday": "Mon" @@ -141,7 +140,7 @@ "start": "2022-11-08T23:00:00.000Z", "end": "2022-11-09T23:00:00.000Z", "name": "Nuestra Señora de la Almudena", - "type": "public", + "type": "observance", "rule": "11-09 if sunday then next monday", "_weekday": "Wed" }, @@ -177,7 +176,7 @@ "start": "2022-12-25T23:00:00.000Z", "end": "2022-12-26T23:00:00.000Z", "name": "Navidad (día sustituto)", - "type": "observance", + "type": "public", "substitute": true, "rule": "substitutes 12-25 if sunday then next monday", "_weekday": "Mon" diff --git a/test/fixtures/ES-MD-2023.json b/test/fixtures/ES-MD-2023.json index 72326c419..df06a5e74 100644 --- a/test/fixtures/ES-MD-2023.json +++ b/test/fixtures/ES-MD-2023.json @@ -41,7 +41,7 @@ "start": "2023-04-05T22:00:00.000Z", "end": "2023-04-06T22:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, @@ -72,6 +72,15 @@ "rule": "05-01", "_weekday": "Mon" }, + { + "date": "2023-05-02 00:00:00", + "start": "2023-05-01T22:00:00.000Z", + "end": "2023-05-02T22:00:00.000Z", + "name": "Día de la Comunidad de Madrid", + "type": "public", + "rule": "05-02 if Sunday then next Monday", + "_weekday": "Tue" + }, { "date": "2023-05-07 00:00:00", "start": "2023-05-06T22:00:00.000Z", @@ -86,7 +95,7 @@ "start": "2023-05-15T22:00:00.000Z", "end": "2023-05-16T22:00:00.000Z", "name": "San Isidro Labrador", - "type": "public", + "type": "observance", "rule": "05-16", "_weekday": "Tue" }, @@ -103,8 +112,8 @@ "date": "2023-07-25 00:00:00", "start": "2023-07-24T22:00:00.000Z", "end": "2023-07-25T22:00:00.000Z", - "name": "Santiago Apostol", - "type": "observance", + "name": "Santiago Apóstol", + "type": "public", "note": "regional", "rule": "07-25", "_weekday": "Tue" @@ -141,7 +150,7 @@ "start": "2023-11-08T23:00:00.000Z", "end": "2023-11-09T23:00:00.000Z", "name": "Nuestra Señora de la Almudena", - "type": "public", + "type": "observance", "rule": "11-09 if sunday then next monday", "_weekday": "Thu" }, diff --git a/test/fixtures/ES-MD-2024.json b/test/fixtures/ES-MD-2024.json index 1ad9fc208..57bf646a8 100644 --- a/test/fixtures/ES-MD-2024.json +++ b/test/fixtures/ES-MD-2024.json @@ -31,7 +31,7 @@ "start": "2024-03-27T23:00:00.000Z", "end": "2024-03-28T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, @@ -62,6 +62,15 @@ "rule": "05-01", "_weekday": "Wed" }, + { + "date": "2024-05-02 00:00:00", + "start": "2024-05-01T22:00:00.000Z", + "end": "2024-05-02T22:00:00.000Z", + "name": "Día de la Comunidad de Madrid", + "type": "public", + "rule": "05-02 if Sunday then next Monday", + "_weekday": "Thu" + }, { "date": "2024-05-05 00:00:00", "start": "2024-05-04T22:00:00.000Z", @@ -76,7 +85,7 @@ "start": "2024-05-15T22:00:00.000Z", "end": "2024-05-16T22:00:00.000Z", "name": "San Isidro Labrador", - "type": "public", + "type": "observance", "rule": "05-16", "_weekday": "Thu" }, @@ -93,8 +102,8 @@ "date": "2024-07-25 00:00:00", "start": "2024-07-24T22:00:00.000Z", "end": "2024-07-25T22:00:00.000Z", - "name": "Santiago Apostol", - "type": "observance", + "name": "Santiago Apóstol", + "type": "public", "note": "regional", "rule": "07-25", "_weekday": "Thu" @@ -131,7 +140,7 @@ "start": "2024-11-08T23:00:00.000Z", "end": "2024-11-09T23:00:00.000Z", "name": "Nuestra Señora de la Almudena", - "type": "public", + "type": "observance", "rule": "11-09 if sunday then next monday", "_weekday": "Sat" }, diff --git a/test/fixtures/ES-MD-2025.json b/test/fixtures/ES-MD-2025.json index 0b46b899e..e6a36e5ad 100644 --- a/test/fixtures/ES-MD-2025.json +++ b/test/fixtures/ES-MD-2025.json @@ -31,7 +31,7 @@ "start": "2025-04-16T22:00:00.000Z", "end": "2025-04-17T22:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, @@ -62,6 +62,15 @@ "rule": "05-01", "_weekday": "Thu" }, + { + "date": "2025-05-02 00:00:00", + "start": "2025-05-01T22:00:00.000Z", + "end": "2025-05-02T22:00:00.000Z", + "name": "Día de la Comunidad de Madrid", + "type": "public", + "rule": "05-02 if Sunday then next Monday", + "_weekday": "Fri" + }, { "date": "2025-05-04 00:00:00", "start": "2025-05-03T22:00:00.000Z", @@ -76,7 +85,7 @@ "start": "2025-05-15T22:00:00.000Z", "end": "2025-05-16T22:00:00.000Z", "name": "San Isidro Labrador", - "type": "public", + "type": "observance", "rule": "05-16", "_weekday": "Fri" }, @@ -93,8 +102,8 @@ "date": "2025-07-25 00:00:00", "start": "2025-07-24T22:00:00.000Z", "end": "2025-07-25T22:00:00.000Z", - "name": "Santiago Apostol", - "type": "observance", + "name": "Santiago Apóstol", + "type": "public", "note": "regional", "rule": "07-25", "_weekday": "Fri" @@ -141,7 +150,7 @@ "start": "2025-11-09T23:00:00.000Z", "end": "2025-11-10T23:00:00.000Z", "name": "Nuestra Señora de la Almudena", - "type": "public", + "type": "observance", "rule": "11-09 if sunday then next monday", "_weekday": "Mon" }, diff --git a/test/fixtures/ES-ML-2015.json b/test/fixtures/ES-ML-2015.json new file mode 100644 index 000000000..9747862e8 --- /dev/null +++ b/test/fixtures/ES-ML-2015.json @@ -0,0 +1,185 @@ +[ + { + "date": "2015-01-01 00:00:00", + "start": "2014-12-31T23:00:00.000Z", + "end": "2015-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Thu" + }, + { + "date": "2015-01-06 00:00:00", + "start": "2015-01-05T23:00:00.000Z", + "end": "2015-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Tue" + }, + { + "date": "2015-03-19 00:00:00", + "start": "2015-03-18T23:00:00.000Z", + "end": "2015-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Thu" + }, + { + "date": "2015-04-02 00:00:00", + "start": "2015-04-01T22:00:00.000Z", + "end": "2015-04-02T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2015-04-03 00:00:00", + "start": "2015-04-02T22:00:00.000Z", + "end": "2015-04-03T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2015-04-05 00:00:00", + "start": "2015-04-04T22:00:00.000Z", + "end": "2015-04-05T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2015-05-01 00:00:00", + "start": "2015-04-30T22:00:00.000Z", + "end": "2015-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Fri" + }, + { + "date": "2015-05-03 00:00:00", + "start": "2015-05-02T22:00:00.000Z", + "end": "2015-05-03T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2015-05-24 00:00:00", + "start": "2015-05-23T22:00:00.000Z", + "end": "2015-05-24T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2015-07-17 00:00:00 -0600", + "start": "2015-07-16T16:00:00.000Z", + "end": "2015-07-17T16:00:00.000Z", + "name": "Fiesta del Eid Fitr", + "type": "public", + "rule": "1 Shawwal", + "_weekday": "Fri" + }, + { + "date": "2015-07-25 00:00:00", + "start": "2015-07-24T22:00:00.000Z", + "end": "2015-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Sat" + }, + { + "date": "2015-08-15 00:00:00", + "start": "2015-08-14T22:00:00.000Z", + "end": "2015-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Sat" + }, + { + "date": "2015-09-23 00:00:00 -0600", + "start": "2015-09-22T16:00:00.000Z", + "end": "2015-09-23T16:00:00.000Z", + "name": "Fiesta del Sacrificio-Aid Al Adha", + "type": "public", + "rule": "10 Dhu al-Hijjah", + "_weekday": "Wed" + }, + { + "date": "2015-10-12 00:00:00", + "start": "2015-10-11T22:00:00.000Z", + "end": "2015-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Mon" + }, + { + "date": "2015-11-01 00:00:00", + "start": "2015-10-31T23:00:00.000Z", + "end": "2015-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Sun" + }, + { + "date": "2015-11-02 00:00:00", + "start": "2015-11-01T23:00:00.000Z", + "end": "2015-11-02T23:00:00.000Z", + "name": "Todos los Santos (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 11-01 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2015-12-06 00:00:00", + "start": "2015-12-05T23:00:00.000Z", + "end": "2015-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Sun" + }, + { + "date": "2015-12-07 00:00:00", + "start": "2015-12-06T23:00:00.000Z", + "end": "2015-12-07T23:00:00.000Z", + "name": "Día de la Constitución Española (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 12-06 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2015-12-08 00:00:00", + "start": "2015-12-07T23:00:00.000Z", + "end": "2015-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Tue" + }, + { + "date": "2015-12-25 00:00:00", + "start": "2015-12-24T23:00:00.000Z", + "end": "2015-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Fri" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-ML-2016.json b/test/fixtures/ES-ML-2016.json new file mode 100644 index 000000000..8333e71e5 --- /dev/null +++ b/test/fixtures/ES-ML-2016.json @@ -0,0 +1,175 @@ +[ + { + "date": "2016-01-01 00:00:00", + "start": "2015-12-31T23:00:00.000Z", + "end": "2016-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Fri" + }, + { + "date": "2016-01-06 00:00:00", + "start": "2016-01-05T23:00:00.000Z", + "end": "2016-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Wed" + }, + { + "date": "2016-03-19 00:00:00", + "start": "2016-03-18T23:00:00.000Z", + "end": "2016-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Sat" + }, + { + "date": "2016-03-24 00:00:00", + "start": "2016-03-23T23:00:00.000Z", + "end": "2016-03-24T23:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2016-03-25 00:00:00", + "start": "2016-03-24T23:00:00.000Z", + "end": "2016-03-25T23:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2016-03-27 00:00:00", + "start": "2016-03-26T23:00:00.000Z", + "end": "2016-03-27T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2016-05-01 00:00:00", + "start": "2016-04-30T22:00:00.000Z", + "end": "2016-05-01T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2016-05-01 00:00:00", + "start": "2016-04-30T22:00:00.000Z", + "end": "2016-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Sun" + }, + { + "date": "2016-05-15 00:00:00", + "start": "2016-05-14T22:00:00.000Z", + "end": "2016-05-15T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2016-07-06 00:00:00 -0600", + "start": "2016-07-05T16:00:00.000Z", + "end": "2016-07-06T16:00:00.000Z", + "name": "Fiesta del Eid Fitr", + "type": "public", + "rule": "1 Shawwal", + "_weekday": "Wed" + }, + { + "date": "2016-07-25 00:00:00", + "start": "2016-07-24T22:00:00.000Z", + "end": "2016-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Mon" + }, + { + "date": "2016-08-15 00:00:00", + "start": "2016-08-14T22:00:00.000Z", + "end": "2016-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Mon" + }, + { + "date": "2016-09-11 00:00:00 -0600", + "start": "2016-09-10T16:00:00.000Z", + "end": "2016-09-11T16:00:00.000Z", + "name": "Fiesta del Sacrificio-Aid Al Adha", + "type": "public", + "rule": "10 Dhu al-Hijjah", + "_weekday": "Sun" + }, + { + "date": "2016-10-12 00:00:00", + "start": "2016-10-11T22:00:00.000Z", + "end": "2016-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Wed" + }, + { + "date": "2016-11-01 00:00:00", + "start": "2016-10-31T23:00:00.000Z", + "end": "2016-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Tue" + }, + { + "date": "2016-12-06 00:00:00", + "start": "2016-12-05T23:00:00.000Z", + "end": "2016-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Tue" + }, + { + "date": "2016-12-08 00:00:00", + "start": "2016-12-07T23:00:00.000Z", + "end": "2016-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Thu" + }, + { + "date": "2016-12-25 00:00:00", + "start": "2016-12-24T23:00:00.000Z", + "end": "2016-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Sun" + }, + { + "date": "2016-12-26 00:00:00", + "start": "2016-12-25T23:00:00.000Z", + "end": "2016-12-26T23:00:00.000Z", + "name": "Navidad (día sustituto)", + "type": "public", + "substitute": true, + "rule": "substitutes 12-25 if sunday then next monday", + "_weekday": "Mon" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-ML-2017.json b/test/fixtures/ES-ML-2017.json new file mode 100644 index 000000000..eca8159b6 --- /dev/null +++ b/test/fixtures/ES-ML-2017.json @@ -0,0 +1,175 @@ +[ + { + "date": "2017-01-01 00:00:00", + "start": "2016-12-31T23:00:00.000Z", + "end": "2017-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Sun" + }, + { + "date": "2017-01-02 00:00:00", + "start": "2017-01-01T23:00:00.000Z", + "end": "2017-01-02T23:00:00.000Z", + "name": "Año Nuevo (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 01-01 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2017-01-06 00:00:00", + "start": "2017-01-05T23:00:00.000Z", + "end": "2017-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Fri" + }, + { + "date": "2017-03-19 00:00:00", + "start": "2017-03-18T23:00:00.000Z", + "end": "2017-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Sun" + }, + { + "date": "2017-04-13 00:00:00", + "start": "2017-04-12T22:00:00.000Z", + "end": "2017-04-13T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2017-04-14 00:00:00", + "start": "2017-04-13T22:00:00.000Z", + "end": "2017-04-14T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2017-04-16 00:00:00", + "start": "2017-04-15T22:00:00.000Z", + "end": "2017-04-16T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2017-05-01 00:00:00", + "start": "2017-04-30T22:00:00.000Z", + "end": "2017-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Mon" + }, + { + "date": "2017-05-07 00:00:00", + "start": "2017-05-06T22:00:00.000Z", + "end": "2017-05-07T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2017-06-04 00:00:00", + "start": "2017-06-03T22:00:00.000Z", + "end": "2017-06-04T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2017-06-25 00:00:00 -0600", + "start": "2017-06-24T16:00:00.000Z", + "end": "2017-06-25T16:00:00.000Z", + "name": "Fiesta del Eid Fitr", + "type": "public", + "rule": "1 Shawwal", + "_weekday": "Sun" + }, + { + "date": "2017-07-25 00:00:00", + "start": "2017-07-24T22:00:00.000Z", + "end": "2017-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Tue" + }, + { + "date": "2017-08-15 00:00:00", + "start": "2017-08-14T22:00:00.000Z", + "end": "2017-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Tue" + }, + { + "date": "2017-09-01 00:00:00 -0600", + "start": "2017-08-31T16:00:00.000Z", + "end": "2017-09-01T16:00:00.000Z", + "name": "Fiesta del Sacrificio-Aid Al Adha", + "type": "public", + "rule": "10 Dhu al-Hijjah", + "_weekday": "Fri" + }, + { + "date": "2017-10-12 00:00:00", + "start": "2017-10-11T22:00:00.000Z", + "end": "2017-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Thu" + }, + { + "date": "2017-11-01 00:00:00", + "start": "2017-10-31T23:00:00.000Z", + "end": "2017-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Wed" + }, + { + "date": "2017-12-06 00:00:00", + "start": "2017-12-05T23:00:00.000Z", + "end": "2017-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Wed" + }, + { + "date": "2017-12-08 00:00:00", + "start": "2017-12-07T23:00:00.000Z", + "end": "2017-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Fri" + }, + { + "date": "2017-12-25 00:00:00", + "start": "2017-12-24T23:00:00.000Z", + "end": "2017-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Mon" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-ML-2018.json b/test/fixtures/ES-ML-2018.json new file mode 100644 index 000000000..9f6c44ce0 --- /dev/null +++ b/test/fixtures/ES-ML-2018.json @@ -0,0 +1,165 @@ +[ + { + "date": "2018-01-01 00:00:00", + "start": "2017-12-31T23:00:00.000Z", + "end": "2018-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Mon" + }, + { + "date": "2018-01-06 00:00:00", + "start": "2018-01-05T23:00:00.000Z", + "end": "2018-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Sat" + }, + { + "date": "2018-03-19 00:00:00", + "start": "2018-03-18T23:00:00.000Z", + "end": "2018-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Mon" + }, + { + "date": "2018-03-29 00:00:00", + "start": "2018-03-28T22:00:00.000Z", + "end": "2018-03-29T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2018-03-30 00:00:00", + "start": "2018-03-29T22:00:00.000Z", + "end": "2018-03-30T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2018-04-01 00:00:00", + "start": "2018-03-31T22:00:00.000Z", + "end": "2018-04-01T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2018-05-01 00:00:00", + "start": "2018-04-30T22:00:00.000Z", + "end": "2018-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Tue" + }, + { + "date": "2018-05-06 00:00:00", + "start": "2018-05-05T22:00:00.000Z", + "end": "2018-05-06T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2018-05-20 00:00:00", + "start": "2018-05-19T22:00:00.000Z", + "end": "2018-05-20T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2018-06-15 00:00:00 -0600", + "start": "2018-06-14T16:00:00.000Z", + "end": "2018-06-15T16:00:00.000Z", + "name": "Fiesta del Eid Fitr", + "type": "public", + "rule": "1 Shawwal", + "_weekday": "Fri" + }, + { + "date": "2018-07-25 00:00:00", + "start": "2018-07-24T22:00:00.000Z", + "end": "2018-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Wed" + }, + { + "date": "2018-08-15 00:00:00", + "start": "2018-08-14T22:00:00.000Z", + "end": "2018-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Wed" + }, + { + "date": "2018-08-21 00:00:00 -0600", + "start": "2018-08-20T16:00:00.000Z", + "end": "2018-08-21T16:00:00.000Z", + "name": "Fiesta del Sacrificio-Aid Al Adha", + "type": "public", + "rule": "10 Dhu al-Hijjah", + "_weekday": "Tue" + }, + { + "date": "2018-10-12 00:00:00", + "start": "2018-10-11T22:00:00.000Z", + "end": "2018-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Fri" + }, + { + "date": "2018-11-01 00:00:00", + "start": "2018-10-31T23:00:00.000Z", + "end": "2018-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Thu" + }, + { + "date": "2018-12-06 00:00:00", + "start": "2018-12-05T23:00:00.000Z", + "end": "2018-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Thu" + }, + { + "date": "2018-12-08 00:00:00", + "start": "2018-12-07T23:00:00.000Z", + "end": "2018-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Sat" + }, + { + "date": "2018-12-25 00:00:00", + "start": "2018-12-24T23:00:00.000Z", + "end": "2018-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Tue" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-ML-2019.json b/test/fixtures/ES-ML-2019.json new file mode 100644 index 000000000..66c25960a --- /dev/null +++ b/test/fixtures/ES-ML-2019.json @@ -0,0 +1,185 @@ +[ + { + "date": "2019-01-01 00:00:00", + "start": "2018-12-31T23:00:00.000Z", + "end": "2019-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Tue" + }, + { + "date": "2019-01-06 00:00:00", + "start": "2019-01-05T23:00:00.000Z", + "end": "2019-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Sun" + }, + { + "date": "2019-01-07 00:00:00", + "start": "2019-01-06T23:00:00.000Z", + "end": "2019-01-07T23:00:00.000Z", + "name": "Día de los Reyes Magos (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 01-06 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2019-03-19 00:00:00", + "start": "2019-03-18T23:00:00.000Z", + "end": "2019-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Tue" + }, + { + "date": "2019-04-18 00:00:00", + "start": "2019-04-17T22:00:00.000Z", + "end": "2019-04-18T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2019-04-19 00:00:00", + "start": "2019-04-18T22:00:00.000Z", + "end": "2019-04-19T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2019-04-21 00:00:00", + "start": "2019-04-20T22:00:00.000Z", + "end": "2019-04-21T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2019-05-01 00:00:00", + "start": "2019-04-30T22:00:00.000Z", + "end": "2019-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Wed" + }, + { + "date": "2019-05-05 00:00:00", + "start": "2019-05-04T22:00:00.000Z", + "end": "2019-05-05T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2019-06-04 00:00:00 -0600", + "start": "2019-06-03T16:00:00.000Z", + "end": "2019-06-04T16:00:00.000Z", + "name": "Fiesta del Eid Fitr", + "type": "public", + "rule": "1 Shawwal", + "_weekday": "Tue" + }, + { + "date": "2019-06-09 00:00:00", + "start": "2019-06-08T22:00:00.000Z", + "end": "2019-06-09T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2019-07-25 00:00:00", + "start": "2019-07-24T22:00:00.000Z", + "end": "2019-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Thu" + }, + { + "date": "2019-08-11 00:00:00 -0600", + "start": "2019-08-10T16:00:00.000Z", + "end": "2019-08-11T16:00:00.000Z", + "name": "Fiesta del Sacrificio-Aid Al Adha", + "type": "public", + "rule": "10 Dhu al-Hijjah", + "_weekday": "Sun" + }, + { + "date": "2019-08-15 00:00:00", + "start": "2019-08-14T22:00:00.000Z", + "end": "2019-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Thu" + }, + { + "date": "2019-10-12 00:00:00", + "start": "2019-10-11T22:00:00.000Z", + "end": "2019-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Sat" + }, + { + "date": "2019-11-01 00:00:00", + "start": "2019-10-31T23:00:00.000Z", + "end": "2019-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Fri" + }, + { + "date": "2019-12-06 00:00:00", + "start": "2019-12-05T23:00:00.000Z", + "end": "2019-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Fri" + }, + { + "date": "2019-12-08 00:00:00", + "start": "2019-12-07T23:00:00.000Z", + "end": "2019-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Sun" + }, + { + "date": "2019-12-09 00:00:00", + "start": "2019-12-08T23:00:00.000Z", + "end": "2019-12-09T23:00:00.000Z", + "name": "La inmaculada concepción (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 12-08 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2019-12-25 00:00:00", + "start": "2019-12-24T23:00:00.000Z", + "end": "2019-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Wed" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-ML-2020.json b/test/fixtures/ES-ML-2020.json new file mode 100644 index 000000000..d2dbe0b70 --- /dev/null +++ b/test/fixtures/ES-ML-2020.json @@ -0,0 +1,185 @@ +[ + { + "date": "2020-01-01 00:00:00", + "start": "2019-12-31T23:00:00.000Z", + "end": "2020-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Wed" + }, + { + "date": "2020-01-06 00:00:00", + "start": "2020-01-05T23:00:00.000Z", + "end": "2020-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Mon" + }, + { + "date": "2020-03-19 00:00:00", + "start": "2020-03-18T23:00:00.000Z", + "end": "2020-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Thu" + }, + { + "date": "2020-04-09 00:00:00", + "start": "2020-04-08T22:00:00.000Z", + "end": "2020-04-09T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2020-04-10 00:00:00", + "start": "2020-04-09T22:00:00.000Z", + "end": "2020-04-10T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2020-04-12 00:00:00", + "start": "2020-04-11T22:00:00.000Z", + "end": "2020-04-12T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2020-05-01 00:00:00", + "start": "2020-04-30T22:00:00.000Z", + "end": "2020-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Fri" + }, + { + "date": "2020-05-03 00:00:00", + "start": "2020-05-02T22:00:00.000Z", + "end": "2020-05-03T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2020-05-24 00:00:00 -0600", + "start": "2020-05-23T16:00:00.000Z", + "end": "2020-05-24T16:00:00.000Z", + "name": "Fiesta del Eid Fitr", + "type": "public", + "rule": "1 Shawwal", + "_weekday": "Sun" + }, + { + "date": "2020-05-31 00:00:00", + "start": "2020-05-30T22:00:00.000Z", + "end": "2020-05-31T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2020-07-25 00:00:00", + "start": "2020-07-24T22:00:00.000Z", + "end": "2020-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Sat" + }, + { + "date": "2020-07-31 00:00:00 -0600", + "start": "2020-07-30T16:00:00.000Z", + "end": "2020-07-31T16:00:00.000Z", + "name": "Fiesta del Sacrificio-Aid Al Adha", + "type": "public", + "rule": "10 Dhu al-Hijjah", + "_weekday": "Fri" + }, + { + "date": "2020-08-15 00:00:00", + "start": "2020-08-14T22:00:00.000Z", + "end": "2020-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Sat" + }, + { + "date": "2020-10-12 00:00:00", + "start": "2020-10-11T22:00:00.000Z", + "end": "2020-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Mon" + }, + { + "date": "2020-11-01 00:00:00", + "start": "2020-10-31T23:00:00.000Z", + "end": "2020-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Sun" + }, + { + "date": "2020-11-02 00:00:00", + "start": "2020-11-01T23:00:00.000Z", + "end": "2020-11-02T23:00:00.000Z", + "name": "Todos los Santos (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 11-01 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2020-12-06 00:00:00", + "start": "2020-12-05T23:00:00.000Z", + "end": "2020-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Sun" + }, + { + "date": "2020-12-07 00:00:00", + "start": "2020-12-06T23:00:00.000Z", + "end": "2020-12-07T23:00:00.000Z", + "name": "Día de la Constitución Española (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 12-06 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2020-12-08 00:00:00", + "start": "2020-12-07T23:00:00.000Z", + "end": "2020-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Tue" + }, + { + "date": "2020-12-25 00:00:00", + "start": "2020-12-24T23:00:00.000Z", + "end": "2020-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Fri" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-ML-2021.json b/test/fixtures/ES-ML-2021.json new file mode 100644 index 000000000..6c450f74e --- /dev/null +++ b/test/fixtures/ES-ML-2021.json @@ -0,0 +1,165 @@ +[ + { + "date": "2021-01-01 00:00:00", + "start": "2020-12-31T23:00:00.000Z", + "end": "2021-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Fri" + }, + { + "date": "2021-01-06 00:00:00", + "start": "2021-01-05T23:00:00.000Z", + "end": "2021-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Wed" + }, + { + "date": "2021-03-19 00:00:00", + "start": "2021-03-18T23:00:00.000Z", + "end": "2021-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Fri" + }, + { + "date": "2021-04-01 00:00:00", + "start": "2021-03-31T22:00:00.000Z", + "end": "2021-04-01T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2021-04-02 00:00:00", + "start": "2021-04-01T22:00:00.000Z", + "end": "2021-04-02T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2021-04-04 00:00:00", + "start": "2021-04-03T22:00:00.000Z", + "end": "2021-04-04T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2021-05-01 00:00:00", + "start": "2021-04-30T22:00:00.000Z", + "end": "2021-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Sat" + }, + { + "date": "2021-05-02 00:00:00", + "start": "2021-05-01T22:00:00.000Z", + "end": "2021-05-02T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2021-05-13 00:00:00 -0600", + "start": "2021-05-12T16:00:00.000Z", + "end": "2021-05-13T16:00:00.000Z", + "name": "Fiesta del Eid Fitr", + "type": "public", + "rule": "1 Shawwal", + "_weekday": "Thu" + }, + { + "date": "2021-05-23 00:00:00", + "start": "2021-05-22T22:00:00.000Z", + "end": "2021-05-23T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2021-07-20 00:00:00 -0600", + "start": "2021-07-19T16:00:00.000Z", + "end": "2021-07-20T16:00:00.000Z", + "name": "Fiesta del Sacrificio-Aid Al Adha", + "type": "public", + "rule": "10 Dhu al-Hijjah", + "_weekday": "Tue" + }, + { + "date": "2021-07-25 00:00:00", + "start": "2021-07-24T22:00:00.000Z", + "end": "2021-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Sun" + }, + { + "date": "2021-08-15 00:00:00", + "start": "2021-08-14T22:00:00.000Z", + "end": "2021-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Sun" + }, + { + "date": "2021-10-12 00:00:00", + "start": "2021-10-11T22:00:00.000Z", + "end": "2021-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Tue" + }, + { + "date": "2021-11-01 00:00:00", + "start": "2021-10-31T23:00:00.000Z", + "end": "2021-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Mon" + }, + { + "date": "2021-12-06 00:00:00", + "start": "2021-12-05T23:00:00.000Z", + "end": "2021-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Mon" + }, + { + "date": "2021-12-08 00:00:00", + "start": "2021-12-07T23:00:00.000Z", + "end": "2021-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Wed" + }, + { + "date": "2021-12-25 00:00:00", + "start": "2021-12-24T23:00:00.000Z", + "end": "2021-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Sat" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-ML-2022.json b/test/fixtures/ES-ML-2022.json new file mode 100644 index 000000000..379abd6db --- /dev/null +++ b/test/fixtures/ES-ML-2022.json @@ -0,0 +1,175 @@ +[ + { + "date": "2022-01-01 00:00:00", + "start": "2021-12-31T23:00:00.000Z", + "end": "2022-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Sat" + }, + { + "date": "2022-01-06 00:00:00", + "start": "2022-01-05T23:00:00.000Z", + "end": "2022-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Thu" + }, + { + "date": "2022-03-19 00:00:00", + "start": "2022-03-18T23:00:00.000Z", + "end": "2022-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Sat" + }, + { + "date": "2022-04-14 00:00:00", + "start": "2022-04-13T22:00:00.000Z", + "end": "2022-04-14T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2022-04-15 00:00:00", + "start": "2022-04-14T22:00:00.000Z", + "end": "2022-04-15T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2022-04-17 00:00:00", + "start": "2022-04-16T22:00:00.000Z", + "end": "2022-04-17T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2022-05-01 00:00:00", + "start": "2022-04-30T22:00:00.000Z", + "end": "2022-05-01T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2022-05-01 00:00:00", + "start": "2022-04-30T22:00:00.000Z", + "end": "2022-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Sun" + }, + { + "date": "2022-05-02 00:00:00 -0600", + "start": "2022-05-01T16:00:00.000Z", + "end": "2022-05-02T16:00:00.000Z", + "name": "Fiesta del Eid Fitr", + "type": "public", + "rule": "1 Shawwal", + "_weekday": "Mon" + }, + { + "date": "2022-06-05 00:00:00", + "start": "2022-06-04T22:00:00.000Z", + "end": "2022-06-05T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2022-07-09 00:00:00 -0600", + "start": "2022-07-08T16:00:00.000Z", + "end": "2022-07-09T16:00:00.000Z", + "name": "Fiesta del Sacrificio-Aid Al Adha", + "type": "public", + "rule": "10 Dhu al-Hijjah", + "_weekday": "Sat" + }, + { + "date": "2022-07-25 00:00:00", + "start": "2022-07-24T22:00:00.000Z", + "end": "2022-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Mon" + }, + { + "date": "2022-08-15 00:00:00", + "start": "2022-08-14T22:00:00.000Z", + "end": "2022-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Mon" + }, + { + "date": "2022-10-12 00:00:00", + "start": "2022-10-11T22:00:00.000Z", + "end": "2022-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Wed" + }, + { + "date": "2022-11-01 00:00:00", + "start": "2022-10-31T23:00:00.000Z", + "end": "2022-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Tue" + }, + { + "date": "2022-12-06 00:00:00", + "start": "2022-12-05T23:00:00.000Z", + "end": "2022-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Tue" + }, + { + "date": "2022-12-08 00:00:00", + "start": "2022-12-07T23:00:00.000Z", + "end": "2022-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Thu" + }, + { + "date": "2022-12-25 00:00:00", + "start": "2022-12-24T23:00:00.000Z", + "end": "2022-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Sun" + }, + { + "date": "2022-12-26 00:00:00", + "start": "2022-12-25T23:00:00.000Z", + "end": "2022-12-26T23:00:00.000Z", + "name": "Navidad (día sustituto)", + "type": "public", + "substitute": true, + "rule": "substitutes 12-25 if sunday then next monday", + "_weekday": "Mon" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-ML-2023.json b/test/fixtures/ES-ML-2023.json new file mode 100644 index 000000000..e50dea633 --- /dev/null +++ b/test/fixtures/ES-ML-2023.json @@ -0,0 +1,175 @@ +[ + { + "date": "2023-01-01 00:00:00", + "start": "2022-12-31T23:00:00.000Z", + "end": "2023-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Sun" + }, + { + "date": "2023-01-02 00:00:00", + "start": "2023-01-01T23:00:00.000Z", + "end": "2023-01-02T23:00:00.000Z", + "name": "Año Nuevo (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 01-01 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2023-01-06 00:00:00", + "start": "2023-01-05T23:00:00.000Z", + "end": "2023-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Fri" + }, + { + "date": "2023-03-19 00:00:00", + "start": "2023-03-18T23:00:00.000Z", + "end": "2023-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Sun" + }, + { + "date": "2023-04-06 00:00:00", + "start": "2023-04-05T22:00:00.000Z", + "end": "2023-04-06T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2023-04-07 00:00:00", + "start": "2023-04-06T22:00:00.000Z", + "end": "2023-04-07T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2023-04-09 00:00:00", + "start": "2023-04-08T22:00:00.000Z", + "end": "2023-04-09T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2023-04-21 00:00:00 -0600", + "start": "2023-04-20T16:00:00.000Z", + "end": "2023-04-21T16:00:00.000Z", + "name": "Fiesta del Eid Fitr", + "type": "public", + "rule": "1 Shawwal", + "_weekday": "Fri" + }, + { + "date": "2023-05-01 00:00:00", + "start": "2023-04-30T22:00:00.000Z", + "end": "2023-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Mon" + }, + { + "date": "2023-05-07 00:00:00", + "start": "2023-05-06T22:00:00.000Z", + "end": "2023-05-07T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2023-05-28 00:00:00", + "start": "2023-05-27T22:00:00.000Z", + "end": "2023-05-28T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2023-06-28 00:00:00 -0600", + "start": "2023-06-27T16:00:00.000Z", + "end": "2023-06-28T16:00:00.000Z", + "name": "Fiesta del Sacrificio-Aid Al Adha", + "type": "public", + "rule": "10 Dhu al-Hijjah", + "_weekday": "Wed" + }, + { + "date": "2023-07-25 00:00:00", + "start": "2023-07-24T22:00:00.000Z", + "end": "2023-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Tue" + }, + { + "date": "2023-08-15 00:00:00", + "start": "2023-08-14T22:00:00.000Z", + "end": "2023-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Tue" + }, + { + "date": "2023-10-12 00:00:00", + "start": "2023-10-11T22:00:00.000Z", + "end": "2023-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Thu" + }, + { + "date": "2023-11-01 00:00:00", + "start": "2023-10-31T23:00:00.000Z", + "end": "2023-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Wed" + }, + { + "date": "2023-12-06 00:00:00", + "start": "2023-12-05T23:00:00.000Z", + "end": "2023-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Wed" + }, + { + "date": "2023-12-08 00:00:00", + "start": "2023-12-07T23:00:00.000Z", + "end": "2023-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Fri" + }, + { + "date": "2023-12-25 00:00:00", + "start": "2023-12-24T23:00:00.000Z", + "end": "2023-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Mon" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-ML-2024.json b/test/fixtures/ES-ML-2024.json new file mode 100644 index 000000000..34ac2a986 --- /dev/null +++ b/test/fixtures/ES-ML-2024.json @@ -0,0 +1,175 @@ +[ + { + "date": "2024-01-01 00:00:00", + "start": "2023-12-31T23:00:00.000Z", + "end": "2024-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Mon" + }, + { + "date": "2024-01-06 00:00:00", + "start": "2024-01-05T23:00:00.000Z", + "end": "2024-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Sat" + }, + { + "date": "2024-03-19 00:00:00", + "start": "2024-03-18T23:00:00.000Z", + "end": "2024-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Tue" + }, + { + "date": "2024-03-28 00:00:00", + "start": "2024-03-27T23:00:00.000Z", + "end": "2024-03-28T23:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2024-03-29 00:00:00", + "start": "2024-03-28T23:00:00.000Z", + "end": "2024-03-29T23:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2024-03-31 00:00:00", + "start": "2024-03-30T23:00:00.000Z", + "end": "2024-03-31T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2024-04-10 00:00:00 -0600", + "start": "2024-04-09T16:00:00.000Z", + "end": "2024-04-10T16:00:00.000Z", + "name": "Fiesta del Eid Fitr", + "type": "public", + "rule": "1 Shawwal", + "_weekday": "Wed" + }, + { + "date": "2024-05-01 00:00:00", + "start": "2024-04-30T22:00:00.000Z", + "end": "2024-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Wed" + }, + { + "date": "2024-05-05 00:00:00", + "start": "2024-05-04T22:00:00.000Z", + "end": "2024-05-05T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2024-05-19 00:00:00", + "start": "2024-05-18T22:00:00.000Z", + "end": "2024-05-19T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2024-06-16 00:00:00 -0600", + "start": "2024-06-15T16:00:00.000Z", + "end": "2024-06-16T16:00:00.000Z", + "name": "Fiesta del Sacrificio-Aid Al Adha", + "type": "public", + "rule": "10 Dhu al-Hijjah", + "_weekday": "Sun" + }, + { + "date": "2024-07-25 00:00:00", + "start": "2024-07-24T22:00:00.000Z", + "end": "2024-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Thu" + }, + { + "date": "2024-08-15 00:00:00", + "start": "2024-08-14T22:00:00.000Z", + "end": "2024-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Thu" + }, + { + "date": "2024-10-12 00:00:00", + "start": "2024-10-11T22:00:00.000Z", + "end": "2024-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Sat" + }, + { + "date": "2024-11-01 00:00:00", + "start": "2024-10-31T23:00:00.000Z", + "end": "2024-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Fri" + }, + { + "date": "2024-12-06 00:00:00", + "start": "2024-12-05T23:00:00.000Z", + "end": "2024-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Fri" + }, + { + "date": "2024-12-08 00:00:00", + "start": "2024-12-07T23:00:00.000Z", + "end": "2024-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Sun" + }, + { + "date": "2024-12-09 00:00:00", + "start": "2024-12-08T23:00:00.000Z", + "end": "2024-12-09T23:00:00.000Z", + "name": "La inmaculada concepción (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 12-08 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2024-12-25 00:00:00", + "start": "2024-12-24T23:00:00.000Z", + "end": "2024-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Wed" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-ML-2025.json b/test/fixtures/ES-ML-2025.json new file mode 100644 index 000000000..f0de334be --- /dev/null +++ b/test/fixtures/ES-ML-2025.json @@ -0,0 +1,175 @@ +[ + { + "date": "2025-01-01 00:00:00", + "start": "2024-12-31T23:00:00.000Z", + "end": "2025-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Wed" + }, + { + "date": "2025-01-06 00:00:00", + "start": "2025-01-05T23:00:00.000Z", + "end": "2025-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Mon" + }, + { + "date": "2025-03-19 00:00:00", + "start": "2025-03-18T23:00:00.000Z", + "end": "2025-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Wed" + }, + { + "date": "2025-03-30 00:00:00 -0600", + "start": "2025-03-29T17:00:00.000Z", + "end": "2025-03-30T16:00:00.000Z", + "name": "Fiesta del Eid Fitr", + "type": "public", + "rule": "1 Shawwal", + "_weekday": "Sun" + }, + { + "date": "2025-04-17 00:00:00", + "start": "2025-04-16T22:00:00.000Z", + "end": "2025-04-17T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2025-04-18 00:00:00", + "start": "2025-04-17T22:00:00.000Z", + "end": "2025-04-18T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2025-04-20 00:00:00", + "start": "2025-04-19T22:00:00.000Z", + "end": "2025-04-20T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2025-05-01 00:00:00", + "start": "2025-04-30T22:00:00.000Z", + "end": "2025-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Thu" + }, + { + "date": "2025-05-04 00:00:00", + "start": "2025-05-03T22:00:00.000Z", + "end": "2025-05-04T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2025-06-06 00:00:00 -0600", + "start": "2025-06-05T16:00:00.000Z", + "end": "2025-06-06T16:00:00.000Z", + "name": "Fiesta del Sacrificio-Aid Al Adha", + "type": "public", + "rule": "10 Dhu al-Hijjah", + "_weekday": "Fri" + }, + { + "date": "2025-06-08 00:00:00", + "start": "2025-06-07T22:00:00.000Z", + "end": "2025-06-08T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2025-07-25 00:00:00", + "start": "2025-07-24T22:00:00.000Z", + "end": "2025-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Fri" + }, + { + "date": "2025-08-15 00:00:00", + "start": "2025-08-14T22:00:00.000Z", + "end": "2025-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Fri" + }, + { + "date": "2025-10-12 00:00:00", + "start": "2025-10-11T22:00:00.000Z", + "end": "2025-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Sun" + }, + { + "date": "2025-10-13 00:00:00", + "start": "2025-10-12T22:00:00.000Z", + "end": "2025-10-13T22:00:00.000Z", + "name": "Fiesta Nacional de España (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 10-12 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2025-11-01 00:00:00", + "start": "2025-10-31T23:00:00.000Z", + "end": "2025-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Sat" + }, + { + "date": "2025-12-06 00:00:00", + "start": "2025-12-05T23:00:00.000Z", + "end": "2025-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Sat" + }, + { + "date": "2025-12-08 00:00:00", + "start": "2025-12-07T23:00:00.000Z", + "end": "2025-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Mon" + }, + { + "date": "2025-12-25 00:00:00", + "start": "2025-12-24T23:00:00.000Z", + "end": "2025-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Thu" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-NC-2015.json b/test/fixtures/ES-NC-2015.json new file mode 100644 index 000000000..29f72452d --- /dev/null +++ b/test/fixtures/ES-NC-2015.json @@ -0,0 +1,176 @@ +[ + { + "date": "2015-01-01 00:00:00", + "start": "2014-12-31T23:00:00.000Z", + "end": "2015-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Thu" + }, + { + "date": "2015-01-06 00:00:00", + "start": "2015-01-05T23:00:00.000Z", + "end": "2015-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Tue" + }, + { + "date": "2015-03-19 00:00:00", + "start": "2015-03-18T23:00:00.000Z", + "end": "2015-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Thu" + }, + { + "date": "2015-04-02 00:00:00", + "start": "2015-04-01T22:00:00.000Z", + "end": "2015-04-02T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2015-04-03 00:00:00", + "start": "2015-04-02T22:00:00.000Z", + "end": "2015-04-03T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2015-04-05 00:00:00", + "start": "2015-04-04T22:00:00.000Z", + "end": "2015-04-05T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2015-04-06 00:00:00", + "start": "2015-04-05T22:00:00.000Z", + "end": "2015-04-06T22:00:00.000Z", + "name": "Lunes de Pascua", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2015-05-01 00:00:00", + "start": "2015-04-30T22:00:00.000Z", + "end": "2015-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Fri" + }, + { + "date": "2015-05-03 00:00:00", + "start": "2015-05-02T22:00:00.000Z", + "end": "2015-05-03T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2015-05-24 00:00:00", + "start": "2015-05-23T22:00:00.000Z", + "end": "2015-05-24T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2015-07-25 00:00:00", + "start": "2015-07-24T22:00:00.000Z", + "end": "2015-07-25T22:00:00.000Z", + "name": "Santiago Apóstol", + "type": "public", + "note": "regional", + "rule": "07-25", + "_weekday": "Sat" + }, + { + "date": "2015-08-15 00:00:00", + "start": "2015-08-14T22:00:00.000Z", + "end": "2015-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Sat" + }, + { + "date": "2015-10-12 00:00:00", + "start": "2015-10-11T22:00:00.000Z", + "end": "2015-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Mon" + }, + { + "date": "2015-11-01 00:00:00", + "start": "2015-10-31T23:00:00.000Z", + "end": "2015-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Sun" + }, + { + "date": "2015-11-02 00:00:00", + "start": "2015-11-01T23:00:00.000Z", + "end": "2015-11-02T23:00:00.000Z", + "name": "Todos los Santos (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 11-01 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2015-12-06 00:00:00", + "start": "2015-12-05T23:00:00.000Z", + "end": "2015-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Sun" + }, + { + "date": "2015-12-07 00:00:00", + "start": "2015-12-06T23:00:00.000Z", + "end": "2015-12-07T23:00:00.000Z", + "name": "Día de la Constitución Española (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 12-06 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2015-12-08 00:00:00", + "start": "2015-12-07T23:00:00.000Z", + "end": "2015-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Tue" + }, + { + "date": "2015-12-25 00:00:00", + "start": "2015-12-24T23:00:00.000Z", + "end": "2015-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Fri" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-NC-2016.json b/test/fixtures/ES-NC-2016.json new file mode 100644 index 000000000..1240fcb8e --- /dev/null +++ b/test/fixtures/ES-NC-2016.json @@ -0,0 +1,166 @@ +[ + { + "date": "2016-01-01 00:00:00", + "start": "2015-12-31T23:00:00.000Z", + "end": "2016-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Fri" + }, + { + "date": "2016-01-06 00:00:00", + "start": "2016-01-05T23:00:00.000Z", + "end": "2016-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Wed" + }, + { + "date": "2016-03-19 00:00:00", + "start": "2016-03-18T23:00:00.000Z", + "end": "2016-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Sat" + }, + { + "date": "2016-03-24 00:00:00", + "start": "2016-03-23T23:00:00.000Z", + "end": "2016-03-24T23:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2016-03-25 00:00:00", + "start": "2016-03-24T23:00:00.000Z", + "end": "2016-03-25T23:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2016-03-27 00:00:00", + "start": "2016-03-26T23:00:00.000Z", + "end": "2016-03-27T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2016-03-28 00:00:00", + "start": "2016-03-27T22:00:00.000Z", + "end": "2016-03-28T22:00:00.000Z", + "name": "Lunes de Pascua", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2016-05-01 00:00:00", + "start": "2016-04-30T22:00:00.000Z", + "end": "2016-05-01T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2016-05-01 00:00:00", + "start": "2016-04-30T22:00:00.000Z", + "end": "2016-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Sun" + }, + { + "date": "2016-05-15 00:00:00", + "start": "2016-05-14T22:00:00.000Z", + "end": "2016-05-15T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2016-07-25 00:00:00", + "start": "2016-07-24T22:00:00.000Z", + "end": "2016-07-25T22:00:00.000Z", + "name": "Santiago Apóstol", + "type": "public", + "note": "regional", + "rule": "07-25", + "_weekday": "Mon" + }, + { + "date": "2016-08-15 00:00:00", + "start": "2016-08-14T22:00:00.000Z", + "end": "2016-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Mon" + }, + { + "date": "2016-10-12 00:00:00", + "start": "2016-10-11T22:00:00.000Z", + "end": "2016-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Wed" + }, + { + "date": "2016-11-01 00:00:00", + "start": "2016-10-31T23:00:00.000Z", + "end": "2016-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Tue" + }, + { + "date": "2016-12-06 00:00:00", + "start": "2016-12-05T23:00:00.000Z", + "end": "2016-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Tue" + }, + { + "date": "2016-12-08 00:00:00", + "start": "2016-12-07T23:00:00.000Z", + "end": "2016-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Thu" + }, + { + "date": "2016-12-25 00:00:00", + "start": "2016-12-24T23:00:00.000Z", + "end": "2016-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Sun" + }, + { + "date": "2016-12-26 00:00:00", + "start": "2016-12-25T23:00:00.000Z", + "end": "2016-12-26T23:00:00.000Z", + "name": "Navidad (día sustituto)", + "type": "public", + "substitute": true, + "rule": "substitutes 12-25 if sunday then next monday", + "_weekday": "Mon" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-NC-2017.json b/test/fixtures/ES-NC-2017.json new file mode 100644 index 000000000..cd85fd06e --- /dev/null +++ b/test/fixtures/ES-NC-2017.json @@ -0,0 +1,166 @@ +[ + { + "date": "2017-01-01 00:00:00", + "start": "2016-12-31T23:00:00.000Z", + "end": "2017-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Sun" + }, + { + "date": "2017-01-02 00:00:00", + "start": "2017-01-01T23:00:00.000Z", + "end": "2017-01-02T23:00:00.000Z", + "name": "Año Nuevo (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 01-01 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2017-01-06 00:00:00", + "start": "2017-01-05T23:00:00.000Z", + "end": "2017-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Fri" + }, + { + "date": "2017-03-19 00:00:00", + "start": "2017-03-18T23:00:00.000Z", + "end": "2017-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Sun" + }, + { + "date": "2017-04-13 00:00:00", + "start": "2017-04-12T22:00:00.000Z", + "end": "2017-04-13T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2017-04-14 00:00:00", + "start": "2017-04-13T22:00:00.000Z", + "end": "2017-04-14T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2017-04-16 00:00:00", + "start": "2017-04-15T22:00:00.000Z", + "end": "2017-04-16T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2017-04-17 00:00:00", + "start": "2017-04-16T22:00:00.000Z", + "end": "2017-04-17T22:00:00.000Z", + "name": "Lunes de Pascua", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2017-05-01 00:00:00", + "start": "2017-04-30T22:00:00.000Z", + "end": "2017-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Mon" + }, + { + "date": "2017-05-07 00:00:00", + "start": "2017-05-06T22:00:00.000Z", + "end": "2017-05-07T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2017-06-04 00:00:00", + "start": "2017-06-03T22:00:00.000Z", + "end": "2017-06-04T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2017-07-25 00:00:00", + "start": "2017-07-24T22:00:00.000Z", + "end": "2017-07-25T22:00:00.000Z", + "name": "Santiago Apóstol", + "type": "public", + "note": "regional", + "rule": "07-25", + "_weekday": "Tue" + }, + { + "date": "2017-08-15 00:00:00", + "start": "2017-08-14T22:00:00.000Z", + "end": "2017-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Tue" + }, + { + "date": "2017-10-12 00:00:00", + "start": "2017-10-11T22:00:00.000Z", + "end": "2017-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Thu" + }, + { + "date": "2017-11-01 00:00:00", + "start": "2017-10-31T23:00:00.000Z", + "end": "2017-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Wed" + }, + { + "date": "2017-12-06 00:00:00", + "start": "2017-12-05T23:00:00.000Z", + "end": "2017-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Wed" + }, + { + "date": "2017-12-08 00:00:00", + "start": "2017-12-07T23:00:00.000Z", + "end": "2017-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Fri" + }, + { + "date": "2017-12-25 00:00:00", + "start": "2017-12-24T23:00:00.000Z", + "end": "2017-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Mon" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-NC-2018.json b/test/fixtures/ES-NC-2018.json new file mode 100644 index 000000000..cc7b99c1a --- /dev/null +++ b/test/fixtures/ES-NC-2018.json @@ -0,0 +1,156 @@ +[ + { + "date": "2018-01-01 00:00:00", + "start": "2017-12-31T23:00:00.000Z", + "end": "2018-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Mon" + }, + { + "date": "2018-01-06 00:00:00", + "start": "2018-01-05T23:00:00.000Z", + "end": "2018-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Sat" + }, + { + "date": "2018-03-19 00:00:00", + "start": "2018-03-18T23:00:00.000Z", + "end": "2018-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Mon" + }, + { + "date": "2018-03-29 00:00:00", + "start": "2018-03-28T22:00:00.000Z", + "end": "2018-03-29T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2018-03-30 00:00:00", + "start": "2018-03-29T22:00:00.000Z", + "end": "2018-03-30T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2018-04-01 00:00:00", + "start": "2018-03-31T22:00:00.000Z", + "end": "2018-04-01T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2018-04-02 00:00:00", + "start": "2018-04-01T22:00:00.000Z", + "end": "2018-04-02T22:00:00.000Z", + "name": "Lunes de Pascua", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2018-05-01 00:00:00", + "start": "2018-04-30T22:00:00.000Z", + "end": "2018-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Tue" + }, + { + "date": "2018-05-06 00:00:00", + "start": "2018-05-05T22:00:00.000Z", + "end": "2018-05-06T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2018-05-20 00:00:00", + "start": "2018-05-19T22:00:00.000Z", + "end": "2018-05-20T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2018-07-25 00:00:00", + "start": "2018-07-24T22:00:00.000Z", + "end": "2018-07-25T22:00:00.000Z", + "name": "Santiago Apóstol", + "type": "public", + "note": "regional", + "rule": "07-25", + "_weekday": "Wed" + }, + { + "date": "2018-08-15 00:00:00", + "start": "2018-08-14T22:00:00.000Z", + "end": "2018-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Wed" + }, + { + "date": "2018-10-12 00:00:00", + "start": "2018-10-11T22:00:00.000Z", + "end": "2018-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Fri" + }, + { + "date": "2018-11-01 00:00:00", + "start": "2018-10-31T23:00:00.000Z", + "end": "2018-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Thu" + }, + { + "date": "2018-12-06 00:00:00", + "start": "2018-12-05T23:00:00.000Z", + "end": "2018-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Thu" + }, + { + "date": "2018-12-08 00:00:00", + "start": "2018-12-07T23:00:00.000Z", + "end": "2018-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Sat" + }, + { + "date": "2018-12-25 00:00:00", + "start": "2018-12-24T23:00:00.000Z", + "end": "2018-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Tue" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-NC-2019.json b/test/fixtures/ES-NC-2019.json new file mode 100644 index 000000000..e63f167cb --- /dev/null +++ b/test/fixtures/ES-NC-2019.json @@ -0,0 +1,176 @@ +[ + { + "date": "2019-01-01 00:00:00", + "start": "2018-12-31T23:00:00.000Z", + "end": "2019-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Tue" + }, + { + "date": "2019-01-06 00:00:00", + "start": "2019-01-05T23:00:00.000Z", + "end": "2019-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Sun" + }, + { + "date": "2019-01-07 00:00:00", + "start": "2019-01-06T23:00:00.000Z", + "end": "2019-01-07T23:00:00.000Z", + "name": "Día de los Reyes Magos (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 01-06 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2019-03-19 00:00:00", + "start": "2019-03-18T23:00:00.000Z", + "end": "2019-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Tue" + }, + { + "date": "2019-04-18 00:00:00", + "start": "2019-04-17T22:00:00.000Z", + "end": "2019-04-18T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2019-04-19 00:00:00", + "start": "2019-04-18T22:00:00.000Z", + "end": "2019-04-19T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2019-04-21 00:00:00", + "start": "2019-04-20T22:00:00.000Z", + "end": "2019-04-21T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2019-04-22 00:00:00", + "start": "2019-04-21T22:00:00.000Z", + "end": "2019-04-22T22:00:00.000Z", + "name": "Lunes de Pascua", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2019-05-01 00:00:00", + "start": "2019-04-30T22:00:00.000Z", + "end": "2019-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Wed" + }, + { + "date": "2019-05-05 00:00:00", + "start": "2019-05-04T22:00:00.000Z", + "end": "2019-05-05T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2019-06-09 00:00:00", + "start": "2019-06-08T22:00:00.000Z", + "end": "2019-06-09T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2019-07-25 00:00:00", + "start": "2019-07-24T22:00:00.000Z", + "end": "2019-07-25T22:00:00.000Z", + "name": "Santiago Apóstol", + "type": "public", + "note": "regional", + "rule": "07-25", + "_weekday": "Thu" + }, + { + "date": "2019-08-15 00:00:00", + "start": "2019-08-14T22:00:00.000Z", + "end": "2019-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Thu" + }, + { + "date": "2019-10-12 00:00:00", + "start": "2019-10-11T22:00:00.000Z", + "end": "2019-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Sat" + }, + { + "date": "2019-11-01 00:00:00", + "start": "2019-10-31T23:00:00.000Z", + "end": "2019-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Fri" + }, + { + "date": "2019-12-06 00:00:00", + "start": "2019-12-05T23:00:00.000Z", + "end": "2019-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Fri" + }, + { + "date": "2019-12-08 00:00:00", + "start": "2019-12-07T23:00:00.000Z", + "end": "2019-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Sun" + }, + { + "date": "2019-12-09 00:00:00", + "start": "2019-12-08T23:00:00.000Z", + "end": "2019-12-09T23:00:00.000Z", + "name": "La inmaculada concepción (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 12-08 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2019-12-25 00:00:00", + "start": "2019-12-24T23:00:00.000Z", + "end": "2019-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Wed" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-NC-2020.json b/test/fixtures/ES-NC-2020.json new file mode 100644 index 000000000..aa23d991b --- /dev/null +++ b/test/fixtures/ES-NC-2020.json @@ -0,0 +1,176 @@ +[ + { + "date": "2020-01-01 00:00:00", + "start": "2019-12-31T23:00:00.000Z", + "end": "2020-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Wed" + }, + { + "date": "2020-01-06 00:00:00", + "start": "2020-01-05T23:00:00.000Z", + "end": "2020-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Mon" + }, + { + "date": "2020-03-19 00:00:00", + "start": "2020-03-18T23:00:00.000Z", + "end": "2020-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Thu" + }, + { + "date": "2020-04-09 00:00:00", + "start": "2020-04-08T22:00:00.000Z", + "end": "2020-04-09T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2020-04-10 00:00:00", + "start": "2020-04-09T22:00:00.000Z", + "end": "2020-04-10T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2020-04-12 00:00:00", + "start": "2020-04-11T22:00:00.000Z", + "end": "2020-04-12T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2020-04-13 00:00:00", + "start": "2020-04-12T22:00:00.000Z", + "end": "2020-04-13T22:00:00.000Z", + "name": "Lunes de Pascua", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2020-05-01 00:00:00", + "start": "2020-04-30T22:00:00.000Z", + "end": "2020-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Fri" + }, + { + "date": "2020-05-03 00:00:00", + "start": "2020-05-02T22:00:00.000Z", + "end": "2020-05-03T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2020-05-31 00:00:00", + "start": "2020-05-30T22:00:00.000Z", + "end": "2020-05-31T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2020-07-25 00:00:00", + "start": "2020-07-24T22:00:00.000Z", + "end": "2020-07-25T22:00:00.000Z", + "name": "Santiago Apóstol", + "type": "public", + "note": "regional", + "rule": "07-25", + "_weekday": "Sat" + }, + { + "date": "2020-08-15 00:00:00", + "start": "2020-08-14T22:00:00.000Z", + "end": "2020-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Sat" + }, + { + "date": "2020-10-12 00:00:00", + "start": "2020-10-11T22:00:00.000Z", + "end": "2020-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Mon" + }, + { + "date": "2020-11-01 00:00:00", + "start": "2020-10-31T23:00:00.000Z", + "end": "2020-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Sun" + }, + { + "date": "2020-11-02 00:00:00", + "start": "2020-11-01T23:00:00.000Z", + "end": "2020-11-02T23:00:00.000Z", + "name": "Todos los Santos (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 11-01 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2020-12-06 00:00:00", + "start": "2020-12-05T23:00:00.000Z", + "end": "2020-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Sun" + }, + { + "date": "2020-12-07 00:00:00", + "start": "2020-12-06T23:00:00.000Z", + "end": "2020-12-07T23:00:00.000Z", + "name": "Día de la Constitución Española (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 12-06 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2020-12-08 00:00:00", + "start": "2020-12-07T23:00:00.000Z", + "end": "2020-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Tue" + }, + { + "date": "2020-12-25 00:00:00", + "start": "2020-12-24T23:00:00.000Z", + "end": "2020-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Fri" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-NC-2021.json b/test/fixtures/ES-NC-2021.json new file mode 100644 index 000000000..d558bbe1f --- /dev/null +++ b/test/fixtures/ES-NC-2021.json @@ -0,0 +1,166 @@ +[ + { + "date": "2021-01-01 00:00:00", + "start": "2020-12-31T23:00:00.000Z", + "end": "2021-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Fri" + }, + { + "date": "2021-01-06 00:00:00", + "start": "2021-01-05T23:00:00.000Z", + "end": "2021-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Wed" + }, + { + "date": "2021-03-19 00:00:00", + "start": "2021-03-18T23:00:00.000Z", + "end": "2021-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Fri" + }, + { + "date": "2021-04-01 00:00:00", + "start": "2021-03-31T22:00:00.000Z", + "end": "2021-04-01T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2021-04-02 00:00:00", + "start": "2021-04-01T22:00:00.000Z", + "end": "2021-04-02T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2021-04-04 00:00:00", + "start": "2021-04-03T22:00:00.000Z", + "end": "2021-04-04T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2021-04-05 00:00:00", + "start": "2021-04-04T22:00:00.000Z", + "end": "2021-04-05T22:00:00.000Z", + "name": "Lunes de Pascua", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2021-05-01 00:00:00", + "start": "2021-04-30T22:00:00.000Z", + "end": "2021-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Sat" + }, + { + "date": "2021-05-02 00:00:00", + "start": "2021-05-01T22:00:00.000Z", + "end": "2021-05-02T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2021-05-23 00:00:00", + "start": "2021-05-22T22:00:00.000Z", + "end": "2021-05-23T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2021-07-25 00:00:00", + "start": "2021-07-24T22:00:00.000Z", + "end": "2021-07-25T22:00:00.000Z", + "name": "Santiago Apóstol", + "type": "public", + "note": "regional", + "rule": "07-25", + "_weekday": "Sun" + }, + { + "date": "2021-07-26 00:00:00", + "start": "2021-07-25T22:00:00.000Z", + "end": "2021-07-26T22:00:00.000Z", + "name": "Santiago Apóstol", + "type": "public", + "substitute": true, + "rule": "substitutes 07-25 if Sunday then next Monday", + "_weekday": "Mon" + }, + { + "date": "2021-08-15 00:00:00", + "start": "2021-08-14T22:00:00.000Z", + "end": "2021-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Sun" + }, + { + "date": "2021-10-12 00:00:00", + "start": "2021-10-11T22:00:00.000Z", + "end": "2021-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Tue" + }, + { + "date": "2021-11-01 00:00:00", + "start": "2021-10-31T23:00:00.000Z", + "end": "2021-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Mon" + }, + { + "date": "2021-12-06 00:00:00", + "start": "2021-12-05T23:00:00.000Z", + "end": "2021-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Mon" + }, + { + "date": "2021-12-08 00:00:00", + "start": "2021-12-07T23:00:00.000Z", + "end": "2021-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Wed" + }, + { + "date": "2021-12-25 00:00:00", + "start": "2021-12-24T23:00:00.000Z", + "end": "2021-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Sat" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-NC-2022.json b/test/fixtures/ES-NC-2022.json new file mode 100644 index 000000000..d2583b716 --- /dev/null +++ b/test/fixtures/ES-NC-2022.json @@ -0,0 +1,166 @@ +[ + { + "date": "2022-01-01 00:00:00", + "start": "2021-12-31T23:00:00.000Z", + "end": "2022-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Sat" + }, + { + "date": "2022-01-06 00:00:00", + "start": "2022-01-05T23:00:00.000Z", + "end": "2022-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Thu" + }, + { + "date": "2022-03-19 00:00:00", + "start": "2022-03-18T23:00:00.000Z", + "end": "2022-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Sat" + }, + { + "date": "2022-04-14 00:00:00", + "start": "2022-04-13T22:00:00.000Z", + "end": "2022-04-14T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2022-04-15 00:00:00", + "start": "2022-04-14T22:00:00.000Z", + "end": "2022-04-15T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2022-04-17 00:00:00", + "start": "2022-04-16T22:00:00.000Z", + "end": "2022-04-17T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2022-04-18 00:00:00", + "start": "2022-04-17T22:00:00.000Z", + "end": "2022-04-18T22:00:00.000Z", + "name": "Lunes de Pascua", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2022-05-01 00:00:00", + "start": "2022-04-30T22:00:00.000Z", + "end": "2022-05-01T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2022-05-01 00:00:00", + "start": "2022-04-30T22:00:00.000Z", + "end": "2022-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Sun" + }, + { + "date": "2022-06-05 00:00:00", + "start": "2022-06-04T22:00:00.000Z", + "end": "2022-06-05T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2022-07-25 00:00:00", + "start": "2022-07-24T22:00:00.000Z", + "end": "2022-07-25T22:00:00.000Z", + "name": "Santiago Apóstol", + "type": "public", + "note": "regional", + "rule": "07-25", + "_weekday": "Mon" + }, + { + "date": "2022-08-15 00:00:00", + "start": "2022-08-14T22:00:00.000Z", + "end": "2022-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Mon" + }, + { + "date": "2022-10-12 00:00:00", + "start": "2022-10-11T22:00:00.000Z", + "end": "2022-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Wed" + }, + { + "date": "2022-11-01 00:00:00", + "start": "2022-10-31T23:00:00.000Z", + "end": "2022-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Tue" + }, + { + "date": "2022-12-06 00:00:00", + "start": "2022-12-05T23:00:00.000Z", + "end": "2022-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Tue" + }, + { + "date": "2022-12-08 00:00:00", + "start": "2022-12-07T23:00:00.000Z", + "end": "2022-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Thu" + }, + { + "date": "2022-12-25 00:00:00", + "start": "2022-12-24T23:00:00.000Z", + "end": "2022-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Sun" + }, + { + "date": "2022-12-26 00:00:00", + "start": "2022-12-25T23:00:00.000Z", + "end": "2022-12-26T23:00:00.000Z", + "name": "Navidad (día sustituto)", + "type": "public", + "substitute": true, + "rule": "substitutes 12-25 if sunday then next monday", + "_weekday": "Mon" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-NC-2023.json b/test/fixtures/ES-NC-2023.json new file mode 100644 index 000000000..2f2f1b5c1 --- /dev/null +++ b/test/fixtures/ES-NC-2023.json @@ -0,0 +1,166 @@ +[ + { + "date": "2023-01-01 00:00:00", + "start": "2022-12-31T23:00:00.000Z", + "end": "2023-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Sun" + }, + { + "date": "2023-01-02 00:00:00", + "start": "2023-01-01T23:00:00.000Z", + "end": "2023-01-02T23:00:00.000Z", + "name": "Año Nuevo (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 01-01 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2023-01-06 00:00:00", + "start": "2023-01-05T23:00:00.000Z", + "end": "2023-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Fri" + }, + { + "date": "2023-03-19 00:00:00", + "start": "2023-03-18T23:00:00.000Z", + "end": "2023-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Sun" + }, + { + "date": "2023-04-06 00:00:00", + "start": "2023-04-05T22:00:00.000Z", + "end": "2023-04-06T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2023-04-07 00:00:00", + "start": "2023-04-06T22:00:00.000Z", + "end": "2023-04-07T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2023-04-09 00:00:00", + "start": "2023-04-08T22:00:00.000Z", + "end": "2023-04-09T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2023-04-10 00:00:00", + "start": "2023-04-09T22:00:00.000Z", + "end": "2023-04-10T22:00:00.000Z", + "name": "Lunes de Pascua", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2023-05-01 00:00:00", + "start": "2023-04-30T22:00:00.000Z", + "end": "2023-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Mon" + }, + { + "date": "2023-05-07 00:00:00", + "start": "2023-05-06T22:00:00.000Z", + "end": "2023-05-07T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2023-05-28 00:00:00", + "start": "2023-05-27T22:00:00.000Z", + "end": "2023-05-28T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2023-07-25 00:00:00", + "start": "2023-07-24T22:00:00.000Z", + "end": "2023-07-25T22:00:00.000Z", + "name": "Santiago Apóstol", + "type": "public", + "note": "regional", + "rule": "07-25", + "_weekday": "Tue" + }, + { + "date": "2023-08-15 00:00:00", + "start": "2023-08-14T22:00:00.000Z", + "end": "2023-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Tue" + }, + { + "date": "2023-10-12 00:00:00", + "start": "2023-10-11T22:00:00.000Z", + "end": "2023-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Thu" + }, + { + "date": "2023-11-01 00:00:00", + "start": "2023-10-31T23:00:00.000Z", + "end": "2023-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Wed" + }, + { + "date": "2023-12-06 00:00:00", + "start": "2023-12-05T23:00:00.000Z", + "end": "2023-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Wed" + }, + { + "date": "2023-12-08 00:00:00", + "start": "2023-12-07T23:00:00.000Z", + "end": "2023-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Fri" + }, + { + "date": "2023-12-25 00:00:00", + "start": "2023-12-24T23:00:00.000Z", + "end": "2023-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Mon" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-NC-2024.json b/test/fixtures/ES-NC-2024.json new file mode 100644 index 000000000..af04bf4ba --- /dev/null +++ b/test/fixtures/ES-NC-2024.json @@ -0,0 +1,166 @@ +[ + { + "date": "2024-01-01 00:00:00", + "start": "2023-12-31T23:00:00.000Z", + "end": "2024-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Mon" + }, + { + "date": "2024-01-06 00:00:00", + "start": "2024-01-05T23:00:00.000Z", + "end": "2024-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Sat" + }, + { + "date": "2024-03-19 00:00:00", + "start": "2024-03-18T23:00:00.000Z", + "end": "2024-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Tue" + }, + { + "date": "2024-03-28 00:00:00", + "start": "2024-03-27T23:00:00.000Z", + "end": "2024-03-28T23:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2024-03-29 00:00:00", + "start": "2024-03-28T23:00:00.000Z", + "end": "2024-03-29T23:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2024-03-31 00:00:00", + "start": "2024-03-30T23:00:00.000Z", + "end": "2024-03-31T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2024-04-01 00:00:00", + "start": "2024-03-31T22:00:00.000Z", + "end": "2024-04-01T22:00:00.000Z", + "name": "Lunes de Pascua", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2024-05-01 00:00:00", + "start": "2024-04-30T22:00:00.000Z", + "end": "2024-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Wed" + }, + { + "date": "2024-05-05 00:00:00", + "start": "2024-05-04T22:00:00.000Z", + "end": "2024-05-05T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2024-05-19 00:00:00", + "start": "2024-05-18T22:00:00.000Z", + "end": "2024-05-19T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2024-07-25 00:00:00", + "start": "2024-07-24T22:00:00.000Z", + "end": "2024-07-25T22:00:00.000Z", + "name": "Santiago Apóstol", + "type": "public", + "note": "regional", + "rule": "07-25", + "_weekday": "Thu" + }, + { + "date": "2024-08-15 00:00:00", + "start": "2024-08-14T22:00:00.000Z", + "end": "2024-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Thu" + }, + { + "date": "2024-10-12 00:00:00", + "start": "2024-10-11T22:00:00.000Z", + "end": "2024-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Sat" + }, + { + "date": "2024-11-01 00:00:00", + "start": "2024-10-31T23:00:00.000Z", + "end": "2024-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Fri" + }, + { + "date": "2024-12-06 00:00:00", + "start": "2024-12-05T23:00:00.000Z", + "end": "2024-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Fri" + }, + { + "date": "2024-12-08 00:00:00", + "start": "2024-12-07T23:00:00.000Z", + "end": "2024-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Sun" + }, + { + "date": "2024-12-09 00:00:00", + "start": "2024-12-08T23:00:00.000Z", + "end": "2024-12-09T23:00:00.000Z", + "name": "La inmaculada concepción (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 12-08 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2024-12-25 00:00:00", + "start": "2024-12-24T23:00:00.000Z", + "end": "2024-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Wed" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-NC-2025.json b/test/fixtures/ES-NC-2025.json new file mode 100644 index 000000000..79f15d552 --- /dev/null +++ b/test/fixtures/ES-NC-2025.json @@ -0,0 +1,166 @@ +[ + { + "date": "2025-01-01 00:00:00", + "start": "2024-12-31T23:00:00.000Z", + "end": "2025-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Wed" + }, + { + "date": "2025-01-06 00:00:00", + "start": "2025-01-05T23:00:00.000Z", + "end": "2025-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Mon" + }, + { + "date": "2025-03-19 00:00:00", + "start": "2025-03-18T23:00:00.000Z", + "end": "2025-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Wed" + }, + { + "date": "2025-04-17 00:00:00", + "start": "2025-04-16T22:00:00.000Z", + "end": "2025-04-17T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2025-04-18 00:00:00", + "start": "2025-04-17T22:00:00.000Z", + "end": "2025-04-18T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2025-04-20 00:00:00", + "start": "2025-04-19T22:00:00.000Z", + "end": "2025-04-20T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2025-04-21 00:00:00", + "start": "2025-04-20T22:00:00.000Z", + "end": "2025-04-21T22:00:00.000Z", + "name": "Lunes de Pascua", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2025-05-01 00:00:00", + "start": "2025-04-30T22:00:00.000Z", + "end": "2025-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Thu" + }, + { + "date": "2025-05-04 00:00:00", + "start": "2025-05-03T22:00:00.000Z", + "end": "2025-05-04T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2025-06-08 00:00:00", + "start": "2025-06-07T22:00:00.000Z", + "end": "2025-06-08T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2025-07-25 00:00:00", + "start": "2025-07-24T22:00:00.000Z", + "end": "2025-07-25T22:00:00.000Z", + "name": "Santiago Apóstol", + "type": "public", + "note": "regional", + "rule": "07-25", + "_weekday": "Fri" + }, + { + "date": "2025-08-15 00:00:00", + "start": "2025-08-14T22:00:00.000Z", + "end": "2025-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Fri" + }, + { + "date": "2025-10-12 00:00:00", + "start": "2025-10-11T22:00:00.000Z", + "end": "2025-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Sun" + }, + { + "date": "2025-10-13 00:00:00", + "start": "2025-10-12T22:00:00.000Z", + "end": "2025-10-13T22:00:00.000Z", + "name": "Fiesta Nacional de España (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 10-12 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2025-11-01 00:00:00", + "start": "2025-10-31T23:00:00.000Z", + "end": "2025-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Sat" + }, + { + "date": "2025-12-06 00:00:00", + "start": "2025-12-05T23:00:00.000Z", + "end": "2025-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Sat" + }, + { + "date": "2025-12-08 00:00:00", + "start": "2025-12-07T23:00:00.000Z", + "end": "2025-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Mon" + }, + { + "date": "2025-12-25 00:00:00", + "start": "2025-12-24T23:00:00.000Z", + "end": "2025-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Thu" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-PV-2015.json b/test/fixtures/ES-PV-2015.json new file mode 100644 index 000000000..29f72452d --- /dev/null +++ b/test/fixtures/ES-PV-2015.json @@ -0,0 +1,176 @@ +[ + { + "date": "2015-01-01 00:00:00", + "start": "2014-12-31T23:00:00.000Z", + "end": "2015-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Thu" + }, + { + "date": "2015-01-06 00:00:00", + "start": "2015-01-05T23:00:00.000Z", + "end": "2015-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Tue" + }, + { + "date": "2015-03-19 00:00:00", + "start": "2015-03-18T23:00:00.000Z", + "end": "2015-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Thu" + }, + { + "date": "2015-04-02 00:00:00", + "start": "2015-04-01T22:00:00.000Z", + "end": "2015-04-02T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2015-04-03 00:00:00", + "start": "2015-04-02T22:00:00.000Z", + "end": "2015-04-03T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2015-04-05 00:00:00", + "start": "2015-04-04T22:00:00.000Z", + "end": "2015-04-05T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2015-04-06 00:00:00", + "start": "2015-04-05T22:00:00.000Z", + "end": "2015-04-06T22:00:00.000Z", + "name": "Lunes de Pascua", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2015-05-01 00:00:00", + "start": "2015-04-30T22:00:00.000Z", + "end": "2015-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Fri" + }, + { + "date": "2015-05-03 00:00:00", + "start": "2015-05-02T22:00:00.000Z", + "end": "2015-05-03T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2015-05-24 00:00:00", + "start": "2015-05-23T22:00:00.000Z", + "end": "2015-05-24T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2015-07-25 00:00:00", + "start": "2015-07-24T22:00:00.000Z", + "end": "2015-07-25T22:00:00.000Z", + "name": "Santiago Apóstol", + "type": "public", + "note": "regional", + "rule": "07-25", + "_weekday": "Sat" + }, + { + "date": "2015-08-15 00:00:00", + "start": "2015-08-14T22:00:00.000Z", + "end": "2015-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Sat" + }, + { + "date": "2015-10-12 00:00:00", + "start": "2015-10-11T22:00:00.000Z", + "end": "2015-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Mon" + }, + { + "date": "2015-11-01 00:00:00", + "start": "2015-10-31T23:00:00.000Z", + "end": "2015-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Sun" + }, + { + "date": "2015-11-02 00:00:00", + "start": "2015-11-01T23:00:00.000Z", + "end": "2015-11-02T23:00:00.000Z", + "name": "Todos los Santos (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 11-01 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2015-12-06 00:00:00", + "start": "2015-12-05T23:00:00.000Z", + "end": "2015-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Sun" + }, + { + "date": "2015-12-07 00:00:00", + "start": "2015-12-06T23:00:00.000Z", + "end": "2015-12-07T23:00:00.000Z", + "name": "Día de la Constitución Española (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 12-06 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2015-12-08 00:00:00", + "start": "2015-12-07T23:00:00.000Z", + "end": "2015-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Tue" + }, + { + "date": "2015-12-25 00:00:00", + "start": "2015-12-24T23:00:00.000Z", + "end": "2015-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Fri" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-PV-2016.json b/test/fixtures/ES-PV-2016.json new file mode 100644 index 000000000..1240fcb8e --- /dev/null +++ b/test/fixtures/ES-PV-2016.json @@ -0,0 +1,166 @@ +[ + { + "date": "2016-01-01 00:00:00", + "start": "2015-12-31T23:00:00.000Z", + "end": "2016-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Fri" + }, + { + "date": "2016-01-06 00:00:00", + "start": "2016-01-05T23:00:00.000Z", + "end": "2016-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Wed" + }, + { + "date": "2016-03-19 00:00:00", + "start": "2016-03-18T23:00:00.000Z", + "end": "2016-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Sat" + }, + { + "date": "2016-03-24 00:00:00", + "start": "2016-03-23T23:00:00.000Z", + "end": "2016-03-24T23:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2016-03-25 00:00:00", + "start": "2016-03-24T23:00:00.000Z", + "end": "2016-03-25T23:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2016-03-27 00:00:00", + "start": "2016-03-26T23:00:00.000Z", + "end": "2016-03-27T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2016-03-28 00:00:00", + "start": "2016-03-27T22:00:00.000Z", + "end": "2016-03-28T22:00:00.000Z", + "name": "Lunes de Pascua", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2016-05-01 00:00:00", + "start": "2016-04-30T22:00:00.000Z", + "end": "2016-05-01T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2016-05-01 00:00:00", + "start": "2016-04-30T22:00:00.000Z", + "end": "2016-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Sun" + }, + { + "date": "2016-05-15 00:00:00", + "start": "2016-05-14T22:00:00.000Z", + "end": "2016-05-15T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2016-07-25 00:00:00", + "start": "2016-07-24T22:00:00.000Z", + "end": "2016-07-25T22:00:00.000Z", + "name": "Santiago Apóstol", + "type": "public", + "note": "regional", + "rule": "07-25", + "_weekday": "Mon" + }, + { + "date": "2016-08-15 00:00:00", + "start": "2016-08-14T22:00:00.000Z", + "end": "2016-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Mon" + }, + { + "date": "2016-10-12 00:00:00", + "start": "2016-10-11T22:00:00.000Z", + "end": "2016-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Wed" + }, + { + "date": "2016-11-01 00:00:00", + "start": "2016-10-31T23:00:00.000Z", + "end": "2016-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Tue" + }, + { + "date": "2016-12-06 00:00:00", + "start": "2016-12-05T23:00:00.000Z", + "end": "2016-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Tue" + }, + { + "date": "2016-12-08 00:00:00", + "start": "2016-12-07T23:00:00.000Z", + "end": "2016-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Thu" + }, + { + "date": "2016-12-25 00:00:00", + "start": "2016-12-24T23:00:00.000Z", + "end": "2016-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Sun" + }, + { + "date": "2016-12-26 00:00:00", + "start": "2016-12-25T23:00:00.000Z", + "end": "2016-12-26T23:00:00.000Z", + "name": "Navidad (día sustituto)", + "type": "public", + "substitute": true, + "rule": "substitutes 12-25 if sunday then next monday", + "_weekday": "Mon" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-PV-2017.json b/test/fixtures/ES-PV-2017.json new file mode 100644 index 000000000..cd85fd06e --- /dev/null +++ b/test/fixtures/ES-PV-2017.json @@ -0,0 +1,166 @@ +[ + { + "date": "2017-01-01 00:00:00", + "start": "2016-12-31T23:00:00.000Z", + "end": "2017-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Sun" + }, + { + "date": "2017-01-02 00:00:00", + "start": "2017-01-01T23:00:00.000Z", + "end": "2017-01-02T23:00:00.000Z", + "name": "Año Nuevo (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 01-01 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2017-01-06 00:00:00", + "start": "2017-01-05T23:00:00.000Z", + "end": "2017-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Fri" + }, + { + "date": "2017-03-19 00:00:00", + "start": "2017-03-18T23:00:00.000Z", + "end": "2017-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Sun" + }, + { + "date": "2017-04-13 00:00:00", + "start": "2017-04-12T22:00:00.000Z", + "end": "2017-04-13T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2017-04-14 00:00:00", + "start": "2017-04-13T22:00:00.000Z", + "end": "2017-04-14T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2017-04-16 00:00:00", + "start": "2017-04-15T22:00:00.000Z", + "end": "2017-04-16T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2017-04-17 00:00:00", + "start": "2017-04-16T22:00:00.000Z", + "end": "2017-04-17T22:00:00.000Z", + "name": "Lunes de Pascua", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2017-05-01 00:00:00", + "start": "2017-04-30T22:00:00.000Z", + "end": "2017-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Mon" + }, + { + "date": "2017-05-07 00:00:00", + "start": "2017-05-06T22:00:00.000Z", + "end": "2017-05-07T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2017-06-04 00:00:00", + "start": "2017-06-03T22:00:00.000Z", + "end": "2017-06-04T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2017-07-25 00:00:00", + "start": "2017-07-24T22:00:00.000Z", + "end": "2017-07-25T22:00:00.000Z", + "name": "Santiago Apóstol", + "type": "public", + "note": "regional", + "rule": "07-25", + "_weekday": "Tue" + }, + { + "date": "2017-08-15 00:00:00", + "start": "2017-08-14T22:00:00.000Z", + "end": "2017-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Tue" + }, + { + "date": "2017-10-12 00:00:00", + "start": "2017-10-11T22:00:00.000Z", + "end": "2017-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Thu" + }, + { + "date": "2017-11-01 00:00:00", + "start": "2017-10-31T23:00:00.000Z", + "end": "2017-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Wed" + }, + { + "date": "2017-12-06 00:00:00", + "start": "2017-12-05T23:00:00.000Z", + "end": "2017-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Wed" + }, + { + "date": "2017-12-08 00:00:00", + "start": "2017-12-07T23:00:00.000Z", + "end": "2017-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Fri" + }, + { + "date": "2017-12-25 00:00:00", + "start": "2017-12-24T23:00:00.000Z", + "end": "2017-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Mon" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-PV-2018.json b/test/fixtures/ES-PV-2018.json new file mode 100644 index 000000000..cc7b99c1a --- /dev/null +++ b/test/fixtures/ES-PV-2018.json @@ -0,0 +1,156 @@ +[ + { + "date": "2018-01-01 00:00:00", + "start": "2017-12-31T23:00:00.000Z", + "end": "2018-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Mon" + }, + { + "date": "2018-01-06 00:00:00", + "start": "2018-01-05T23:00:00.000Z", + "end": "2018-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Sat" + }, + { + "date": "2018-03-19 00:00:00", + "start": "2018-03-18T23:00:00.000Z", + "end": "2018-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Mon" + }, + { + "date": "2018-03-29 00:00:00", + "start": "2018-03-28T22:00:00.000Z", + "end": "2018-03-29T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2018-03-30 00:00:00", + "start": "2018-03-29T22:00:00.000Z", + "end": "2018-03-30T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2018-04-01 00:00:00", + "start": "2018-03-31T22:00:00.000Z", + "end": "2018-04-01T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2018-04-02 00:00:00", + "start": "2018-04-01T22:00:00.000Z", + "end": "2018-04-02T22:00:00.000Z", + "name": "Lunes de Pascua", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2018-05-01 00:00:00", + "start": "2018-04-30T22:00:00.000Z", + "end": "2018-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Tue" + }, + { + "date": "2018-05-06 00:00:00", + "start": "2018-05-05T22:00:00.000Z", + "end": "2018-05-06T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2018-05-20 00:00:00", + "start": "2018-05-19T22:00:00.000Z", + "end": "2018-05-20T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2018-07-25 00:00:00", + "start": "2018-07-24T22:00:00.000Z", + "end": "2018-07-25T22:00:00.000Z", + "name": "Santiago Apóstol", + "type": "public", + "note": "regional", + "rule": "07-25", + "_weekday": "Wed" + }, + { + "date": "2018-08-15 00:00:00", + "start": "2018-08-14T22:00:00.000Z", + "end": "2018-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Wed" + }, + { + "date": "2018-10-12 00:00:00", + "start": "2018-10-11T22:00:00.000Z", + "end": "2018-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Fri" + }, + { + "date": "2018-11-01 00:00:00", + "start": "2018-10-31T23:00:00.000Z", + "end": "2018-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Thu" + }, + { + "date": "2018-12-06 00:00:00", + "start": "2018-12-05T23:00:00.000Z", + "end": "2018-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Thu" + }, + { + "date": "2018-12-08 00:00:00", + "start": "2018-12-07T23:00:00.000Z", + "end": "2018-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Sat" + }, + { + "date": "2018-12-25 00:00:00", + "start": "2018-12-24T23:00:00.000Z", + "end": "2018-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Tue" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-PV-2019.json b/test/fixtures/ES-PV-2019.json new file mode 100644 index 000000000..e63f167cb --- /dev/null +++ b/test/fixtures/ES-PV-2019.json @@ -0,0 +1,176 @@ +[ + { + "date": "2019-01-01 00:00:00", + "start": "2018-12-31T23:00:00.000Z", + "end": "2019-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Tue" + }, + { + "date": "2019-01-06 00:00:00", + "start": "2019-01-05T23:00:00.000Z", + "end": "2019-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Sun" + }, + { + "date": "2019-01-07 00:00:00", + "start": "2019-01-06T23:00:00.000Z", + "end": "2019-01-07T23:00:00.000Z", + "name": "Día de los Reyes Magos (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 01-06 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2019-03-19 00:00:00", + "start": "2019-03-18T23:00:00.000Z", + "end": "2019-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Tue" + }, + { + "date": "2019-04-18 00:00:00", + "start": "2019-04-17T22:00:00.000Z", + "end": "2019-04-18T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2019-04-19 00:00:00", + "start": "2019-04-18T22:00:00.000Z", + "end": "2019-04-19T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2019-04-21 00:00:00", + "start": "2019-04-20T22:00:00.000Z", + "end": "2019-04-21T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2019-04-22 00:00:00", + "start": "2019-04-21T22:00:00.000Z", + "end": "2019-04-22T22:00:00.000Z", + "name": "Lunes de Pascua", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2019-05-01 00:00:00", + "start": "2019-04-30T22:00:00.000Z", + "end": "2019-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Wed" + }, + { + "date": "2019-05-05 00:00:00", + "start": "2019-05-04T22:00:00.000Z", + "end": "2019-05-05T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2019-06-09 00:00:00", + "start": "2019-06-08T22:00:00.000Z", + "end": "2019-06-09T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2019-07-25 00:00:00", + "start": "2019-07-24T22:00:00.000Z", + "end": "2019-07-25T22:00:00.000Z", + "name": "Santiago Apóstol", + "type": "public", + "note": "regional", + "rule": "07-25", + "_weekday": "Thu" + }, + { + "date": "2019-08-15 00:00:00", + "start": "2019-08-14T22:00:00.000Z", + "end": "2019-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Thu" + }, + { + "date": "2019-10-12 00:00:00", + "start": "2019-10-11T22:00:00.000Z", + "end": "2019-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Sat" + }, + { + "date": "2019-11-01 00:00:00", + "start": "2019-10-31T23:00:00.000Z", + "end": "2019-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Fri" + }, + { + "date": "2019-12-06 00:00:00", + "start": "2019-12-05T23:00:00.000Z", + "end": "2019-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Fri" + }, + { + "date": "2019-12-08 00:00:00", + "start": "2019-12-07T23:00:00.000Z", + "end": "2019-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Sun" + }, + { + "date": "2019-12-09 00:00:00", + "start": "2019-12-08T23:00:00.000Z", + "end": "2019-12-09T23:00:00.000Z", + "name": "La inmaculada concepción (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 12-08 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2019-12-25 00:00:00", + "start": "2019-12-24T23:00:00.000Z", + "end": "2019-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Wed" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-PV-2020.json b/test/fixtures/ES-PV-2020.json new file mode 100644 index 000000000..aa23d991b --- /dev/null +++ b/test/fixtures/ES-PV-2020.json @@ -0,0 +1,176 @@ +[ + { + "date": "2020-01-01 00:00:00", + "start": "2019-12-31T23:00:00.000Z", + "end": "2020-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Wed" + }, + { + "date": "2020-01-06 00:00:00", + "start": "2020-01-05T23:00:00.000Z", + "end": "2020-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Mon" + }, + { + "date": "2020-03-19 00:00:00", + "start": "2020-03-18T23:00:00.000Z", + "end": "2020-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Thu" + }, + { + "date": "2020-04-09 00:00:00", + "start": "2020-04-08T22:00:00.000Z", + "end": "2020-04-09T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2020-04-10 00:00:00", + "start": "2020-04-09T22:00:00.000Z", + "end": "2020-04-10T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2020-04-12 00:00:00", + "start": "2020-04-11T22:00:00.000Z", + "end": "2020-04-12T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2020-04-13 00:00:00", + "start": "2020-04-12T22:00:00.000Z", + "end": "2020-04-13T22:00:00.000Z", + "name": "Lunes de Pascua", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2020-05-01 00:00:00", + "start": "2020-04-30T22:00:00.000Z", + "end": "2020-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Fri" + }, + { + "date": "2020-05-03 00:00:00", + "start": "2020-05-02T22:00:00.000Z", + "end": "2020-05-03T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2020-05-31 00:00:00", + "start": "2020-05-30T22:00:00.000Z", + "end": "2020-05-31T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2020-07-25 00:00:00", + "start": "2020-07-24T22:00:00.000Z", + "end": "2020-07-25T22:00:00.000Z", + "name": "Santiago Apóstol", + "type": "public", + "note": "regional", + "rule": "07-25", + "_weekday": "Sat" + }, + { + "date": "2020-08-15 00:00:00", + "start": "2020-08-14T22:00:00.000Z", + "end": "2020-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Sat" + }, + { + "date": "2020-10-12 00:00:00", + "start": "2020-10-11T22:00:00.000Z", + "end": "2020-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Mon" + }, + { + "date": "2020-11-01 00:00:00", + "start": "2020-10-31T23:00:00.000Z", + "end": "2020-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Sun" + }, + { + "date": "2020-11-02 00:00:00", + "start": "2020-11-01T23:00:00.000Z", + "end": "2020-11-02T23:00:00.000Z", + "name": "Todos los Santos (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 11-01 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2020-12-06 00:00:00", + "start": "2020-12-05T23:00:00.000Z", + "end": "2020-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Sun" + }, + { + "date": "2020-12-07 00:00:00", + "start": "2020-12-06T23:00:00.000Z", + "end": "2020-12-07T23:00:00.000Z", + "name": "Día de la Constitución Española (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 12-06 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2020-12-08 00:00:00", + "start": "2020-12-07T23:00:00.000Z", + "end": "2020-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Tue" + }, + { + "date": "2020-12-25 00:00:00", + "start": "2020-12-24T23:00:00.000Z", + "end": "2020-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Fri" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-PV-2021.json b/test/fixtures/ES-PV-2021.json new file mode 100644 index 000000000..d558bbe1f --- /dev/null +++ b/test/fixtures/ES-PV-2021.json @@ -0,0 +1,166 @@ +[ + { + "date": "2021-01-01 00:00:00", + "start": "2020-12-31T23:00:00.000Z", + "end": "2021-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Fri" + }, + { + "date": "2021-01-06 00:00:00", + "start": "2021-01-05T23:00:00.000Z", + "end": "2021-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Wed" + }, + { + "date": "2021-03-19 00:00:00", + "start": "2021-03-18T23:00:00.000Z", + "end": "2021-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Fri" + }, + { + "date": "2021-04-01 00:00:00", + "start": "2021-03-31T22:00:00.000Z", + "end": "2021-04-01T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2021-04-02 00:00:00", + "start": "2021-04-01T22:00:00.000Z", + "end": "2021-04-02T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2021-04-04 00:00:00", + "start": "2021-04-03T22:00:00.000Z", + "end": "2021-04-04T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2021-04-05 00:00:00", + "start": "2021-04-04T22:00:00.000Z", + "end": "2021-04-05T22:00:00.000Z", + "name": "Lunes de Pascua", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2021-05-01 00:00:00", + "start": "2021-04-30T22:00:00.000Z", + "end": "2021-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Sat" + }, + { + "date": "2021-05-02 00:00:00", + "start": "2021-05-01T22:00:00.000Z", + "end": "2021-05-02T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2021-05-23 00:00:00", + "start": "2021-05-22T22:00:00.000Z", + "end": "2021-05-23T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2021-07-25 00:00:00", + "start": "2021-07-24T22:00:00.000Z", + "end": "2021-07-25T22:00:00.000Z", + "name": "Santiago Apóstol", + "type": "public", + "note": "regional", + "rule": "07-25", + "_weekday": "Sun" + }, + { + "date": "2021-07-26 00:00:00", + "start": "2021-07-25T22:00:00.000Z", + "end": "2021-07-26T22:00:00.000Z", + "name": "Santiago Apóstol", + "type": "public", + "substitute": true, + "rule": "substitutes 07-25 if Sunday then next Monday", + "_weekday": "Mon" + }, + { + "date": "2021-08-15 00:00:00", + "start": "2021-08-14T22:00:00.000Z", + "end": "2021-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Sun" + }, + { + "date": "2021-10-12 00:00:00", + "start": "2021-10-11T22:00:00.000Z", + "end": "2021-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Tue" + }, + { + "date": "2021-11-01 00:00:00", + "start": "2021-10-31T23:00:00.000Z", + "end": "2021-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Mon" + }, + { + "date": "2021-12-06 00:00:00", + "start": "2021-12-05T23:00:00.000Z", + "end": "2021-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Mon" + }, + { + "date": "2021-12-08 00:00:00", + "start": "2021-12-07T23:00:00.000Z", + "end": "2021-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Wed" + }, + { + "date": "2021-12-25 00:00:00", + "start": "2021-12-24T23:00:00.000Z", + "end": "2021-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Sat" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-PV-2022.json b/test/fixtures/ES-PV-2022.json new file mode 100644 index 000000000..bb8b3eb59 --- /dev/null +++ b/test/fixtures/ES-PV-2022.json @@ -0,0 +1,175 @@ +[ + { + "date": "2022-01-01 00:00:00", + "start": "2021-12-31T23:00:00.000Z", + "end": "2022-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Sat" + }, + { + "date": "2022-01-06 00:00:00", + "start": "2022-01-05T23:00:00.000Z", + "end": "2022-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Thu" + }, + { + "date": "2022-03-19 00:00:00", + "start": "2022-03-18T23:00:00.000Z", + "end": "2022-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Sat" + }, + { + "date": "2022-04-14 00:00:00", + "start": "2022-04-13T22:00:00.000Z", + "end": "2022-04-14T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2022-04-15 00:00:00", + "start": "2022-04-14T22:00:00.000Z", + "end": "2022-04-15T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2022-04-17 00:00:00", + "start": "2022-04-16T22:00:00.000Z", + "end": "2022-04-17T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2022-04-18 00:00:00", + "start": "2022-04-17T22:00:00.000Z", + "end": "2022-04-18T22:00:00.000Z", + "name": "Lunes de Pascua", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2022-05-01 00:00:00", + "start": "2022-04-30T22:00:00.000Z", + "end": "2022-05-01T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2022-05-01 00:00:00", + "start": "2022-04-30T22:00:00.000Z", + "end": "2022-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Sun" + }, + { + "date": "2022-06-05 00:00:00", + "start": "2022-06-04T22:00:00.000Z", + "end": "2022-06-05T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2022-07-25 00:00:00", + "start": "2022-07-24T22:00:00.000Z", + "end": "2022-07-25T22:00:00.000Z", + "name": "Santiago Apóstol", + "type": "public", + "note": "regional", + "rule": "07-25", + "_weekday": "Mon" + }, + { + "date": "2022-08-15 00:00:00", + "start": "2022-08-14T22:00:00.000Z", + "end": "2022-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Mon" + }, + { + "date": "2022-09-06 00:00:00", + "start": "2022-09-05T22:00:00.000Z", + "end": "2022-09-06T22:00:00.000Z", + "name": "V Centenario Vuelta al Mundo", + "type": "public", + "rule": "2022-09-06", + "_weekday": "Tue" + }, + { + "date": "2022-10-12 00:00:00", + "start": "2022-10-11T22:00:00.000Z", + "end": "2022-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Wed" + }, + { + "date": "2022-11-01 00:00:00", + "start": "2022-10-31T23:00:00.000Z", + "end": "2022-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Tue" + }, + { + "date": "2022-12-06 00:00:00", + "start": "2022-12-05T23:00:00.000Z", + "end": "2022-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Tue" + }, + { + "date": "2022-12-08 00:00:00", + "start": "2022-12-07T23:00:00.000Z", + "end": "2022-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Thu" + }, + { + "date": "2022-12-25 00:00:00", + "start": "2022-12-24T23:00:00.000Z", + "end": "2022-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Sun" + }, + { + "date": "2022-12-26 00:00:00", + "start": "2022-12-25T23:00:00.000Z", + "end": "2022-12-26T23:00:00.000Z", + "name": "Navidad (día sustituto)", + "type": "public", + "substitute": true, + "rule": "substitutes 12-25 if sunday then next monday", + "_weekday": "Mon" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-PV-2023.json b/test/fixtures/ES-PV-2023.json new file mode 100644 index 000000000..2f2f1b5c1 --- /dev/null +++ b/test/fixtures/ES-PV-2023.json @@ -0,0 +1,166 @@ +[ + { + "date": "2023-01-01 00:00:00", + "start": "2022-12-31T23:00:00.000Z", + "end": "2023-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Sun" + }, + { + "date": "2023-01-02 00:00:00", + "start": "2023-01-01T23:00:00.000Z", + "end": "2023-01-02T23:00:00.000Z", + "name": "Año Nuevo (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 01-01 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2023-01-06 00:00:00", + "start": "2023-01-05T23:00:00.000Z", + "end": "2023-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Fri" + }, + { + "date": "2023-03-19 00:00:00", + "start": "2023-03-18T23:00:00.000Z", + "end": "2023-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Sun" + }, + { + "date": "2023-04-06 00:00:00", + "start": "2023-04-05T22:00:00.000Z", + "end": "2023-04-06T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2023-04-07 00:00:00", + "start": "2023-04-06T22:00:00.000Z", + "end": "2023-04-07T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2023-04-09 00:00:00", + "start": "2023-04-08T22:00:00.000Z", + "end": "2023-04-09T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2023-04-10 00:00:00", + "start": "2023-04-09T22:00:00.000Z", + "end": "2023-04-10T22:00:00.000Z", + "name": "Lunes de Pascua", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2023-05-01 00:00:00", + "start": "2023-04-30T22:00:00.000Z", + "end": "2023-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Mon" + }, + { + "date": "2023-05-07 00:00:00", + "start": "2023-05-06T22:00:00.000Z", + "end": "2023-05-07T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2023-05-28 00:00:00", + "start": "2023-05-27T22:00:00.000Z", + "end": "2023-05-28T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2023-07-25 00:00:00", + "start": "2023-07-24T22:00:00.000Z", + "end": "2023-07-25T22:00:00.000Z", + "name": "Santiago Apóstol", + "type": "public", + "note": "regional", + "rule": "07-25", + "_weekday": "Tue" + }, + { + "date": "2023-08-15 00:00:00", + "start": "2023-08-14T22:00:00.000Z", + "end": "2023-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Tue" + }, + { + "date": "2023-10-12 00:00:00", + "start": "2023-10-11T22:00:00.000Z", + "end": "2023-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Thu" + }, + { + "date": "2023-11-01 00:00:00", + "start": "2023-10-31T23:00:00.000Z", + "end": "2023-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Wed" + }, + { + "date": "2023-12-06 00:00:00", + "start": "2023-12-05T23:00:00.000Z", + "end": "2023-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Wed" + }, + { + "date": "2023-12-08 00:00:00", + "start": "2023-12-07T23:00:00.000Z", + "end": "2023-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Fri" + }, + { + "date": "2023-12-25 00:00:00", + "start": "2023-12-24T23:00:00.000Z", + "end": "2023-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Mon" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-PV-2024.json b/test/fixtures/ES-PV-2024.json new file mode 100644 index 000000000..af04bf4ba --- /dev/null +++ b/test/fixtures/ES-PV-2024.json @@ -0,0 +1,166 @@ +[ + { + "date": "2024-01-01 00:00:00", + "start": "2023-12-31T23:00:00.000Z", + "end": "2024-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Mon" + }, + { + "date": "2024-01-06 00:00:00", + "start": "2024-01-05T23:00:00.000Z", + "end": "2024-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Sat" + }, + { + "date": "2024-03-19 00:00:00", + "start": "2024-03-18T23:00:00.000Z", + "end": "2024-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Tue" + }, + { + "date": "2024-03-28 00:00:00", + "start": "2024-03-27T23:00:00.000Z", + "end": "2024-03-28T23:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2024-03-29 00:00:00", + "start": "2024-03-28T23:00:00.000Z", + "end": "2024-03-29T23:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2024-03-31 00:00:00", + "start": "2024-03-30T23:00:00.000Z", + "end": "2024-03-31T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2024-04-01 00:00:00", + "start": "2024-03-31T22:00:00.000Z", + "end": "2024-04-01T22:00:00.000Z", + "name": "Lunes de Pascua", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2024-05-01 00:00:00", + "start": "2024-04-30T22:00:00.000Z", + "end": "2024-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Wed" + }, + { + "date": "2024-05-05 00:00:00", + "start": "2024-05-04T22:00:00.000Z", + "end": "2024-05-05T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2024-05-19 00:00:00", + "start": "2024-05-18T22:00:00.000Z", + "end": "2024-05-19T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2024-07-25 00:00:00", + "start": "2024-07-24T22:00:00.000Z", + "end": "2024-07-25T22:00:00.000Z", + "name": "Santiago Apóstol", + "type": "public", + "note": "regional", + "rule": "07-25", + "_weekday": "Thu" + }, + { + "date": "2024-08-15 00:00:00", + "start": "2024-08-14T22:00:00.000Z", + "end": "2024-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Thu" + }, + { + "date": "2024-10-12 00:00:00", + "start": "2024-10-11T22:00:00.000Z", + "end": "2024-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Sat" + }, + { + "date": "2024-11-01 00:00:00", + "start": "2024-10-31T23:00:00.000Z", + "end": "2024-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Fri" + }, + { + "date": "2024-12-06 00:00:00", + "start": "2024-12-05T23:00:00.000Z", + "end": "2024-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Fri" + }, + { + "date": "2024-12-08 00:00:00", + "start": "2024-12-07T23:00:00.000Z", + "end": "2024-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Sun" + }, + { + "date": "2024-12-09 00:00:00", + "start": "2024-12-08T23:00:00.000Z", + "end": "2024-12-09T23:00:00.000Z", + "name": "La inmaculada concepción (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 12-08 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2024-12-25 00:00:00", + "start": "2024-12-24T23:00:00.000Z", + "end": "2024-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Wed" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-PV-2025.json b/test/fixtures/ES-PV-2025.json new file mode 100644 index 000000000..79f15d552 --- /dev/null +++ b/test/fixtures/ES-PV-2025.json @@ -0,0 +1,166 @@ +[ + { + "date": "2025-01-01 00:00:00", + "start": "2024-12-31T23:00:00.000Z", + "end": "2025-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Wed" + }, + { + "date": "2025-01-06 00:00:00", + "start": "2025-01-05T23:00:00.000Z", + "end": "2025-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Mon" + }, + { + "date": "2025-03-19 00:00:00", + "start": "2025-03-18T23:00:00.000Z", + "end": "2025-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Wed" + }, + { + "date": "2025-04-17 00:00:00", + "start": "2025-04-16T22:00:00.000Z", + "end": "2025-04-17T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2025-04-18 00:00:00", + "start": "2025-04-17T22:00:00.000Z", + "end": "2025-04-18T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2025-04-20 00:00:00", + "start": "2025-04-19T22:00:00.000Z", + "end": "2025-04-20T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2025-04-21 00:00:00", + "start": "2025-04-20T22:00:00.000Z", + "end": "2025-04-21T22:00:00.000Z", + "name": "Lunes de Pascua", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2025-05-01 00:00:00", + "start": "2025-04-30T22:00:00.000Z", + "end": "2025-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Thu" + }, + { + "date": "2025-05-04 00:00:00", + "start": "2025-05-03T22:00:00.000Z", + "end": "2025-05-04T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2025-06-08 00:00:00", + "start": "2025-06-07T22:00:00.000Z", + "end": "2025-06-08T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2025-07-25 00:00:00", + "start": "2025-07-24T22:00:00.000Z", + "end": "2025-07-25T22:00:00.000Z", + "name": "Santiago Apóstol", + "type": "public", + "note": "regional", + "rule": "07-25", + "_weekday": "Fri" + }, + { + "date": "2025-08-15 00:00:00", + "start": "2025-08-14T22:00:00.000Z", + "end": "2025-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Fri" + }, + { + "date": "2025-10-12 00:00:00", + "start": "2025-10-11T22:00:00.000Z", + "end": "2025-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Sun" + }, + { + "date": "2025-10-13 00:00:00", + "start": "2025-10-12T22:00:00.000Z", + "end": "2025-10-13T22:00:00.000Z", + "name": "Fiesta Nacional de España (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 10-12 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2025-11-01 00:00:00", + "start": "2025-10-31T23:00:00.000Z", + "end": "2025-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Sat" + }, + { + "date": "2025-12-06 00:00:00", + "start": "2025-12-05T23:00:00.000Z", + "end": "2025-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Sat" + }, + { + "date": "2025-12-08 00:00:00", + "start": "2025-12-07T23:00:00.000Z", + "end": "2025-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Mon" + }, + { + "date": "2025-12-25 00:00:00", + "start": "2025-12-24T23:00:00.000Z", + "end": "2025-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Thu" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-RI-2015.json b/test/fixtures/ES-RI-2015.json new file mode 100644 index 000000000..afb531c4b --- /dev/null +++ b/test/fixtures/ES-RI-2015.json @@ -0,0 +1,176 @@ +[ + { + "date": "2015-01-01 00:00:00", + "start": "2014-12-31T23:00:00.000Z", + "end": "2015-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Thu" + }, + { + "date": "2015-01-06 00:00:00", + "start": "2015-01-05T23:00:00.000Z", + "end": "2015-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Tue" + }, + { + "date": "2015-03-19 00:00:00", + "start": "2015-03-18T23:00:00.000Z", + "end": "2015-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Thu" + }, + { + "date": "2015-04-02 00:00:00", + "start": "2015-04-01T22:00:00.000Z", + "end": "2015-04-02T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2015-04-03 00:00:00", + "start": "2015-04-02T22:00:00.000Z", + "end": "2015-04-03T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2015-04-05 00:00:00", + "start": "2015-04-04T22:00:00.000Z", + "end": "2015-04-05T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2015-04-06 00:00:00", + "start": "2015-04-05T22:00:00.000Z", + "end": "2015-04-06T22:00:00.000Z", + "name": "Lunes de Pascua", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2015-05-01 00:00:00", + "start": "2015-04-30T22:00:00.000Z", + "end": "2015-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Fri" + }, + { + "date": "2015-05-03 00:00:00", + "start": "2015-05-02T22:00:00.000Z", + "end": "2015-05-03T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2015-05-24 00:00:00", + "start": "2015-05-23T22:00:00.000Z", + "end": "2015-05-24T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2015-07-25 00:00:00", + "start": "2015-07-24T22:00:00.000Z", + "end": "2015-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Sat" + }, + { + "date": "2015-08-15 00:00:00", + "start": "2015-08-14T22:00:00.000Z", + "end": "2015-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Sat" + }, + { + "date": "2015-10-12 00:00:00", + "start": "2015-10-11T22:00:00.000Z", + "end": "2015-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Mon" + }, + { + "date": "2015-11-01 00:00:00", + "start": "2015-10-31T23:00:00.000Z", + "end": "2015-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Sun" + }, + { + "date": "2015-11-02 00:00:00", + "start": "2015-11-01T23:00:00.000Z", + "end": "2015-11-02T23:00:00.000Z", + "name": "Todos los Santos (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 11-01 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2015-12-06 00:00:00", + "start": "2015-12-05T23:00:00.000Z", + "end": "2015-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Sun" + }, + { + "date": "2015-12-07 00:00:00", + "start": "2015-12-06T23:00:00.000Z", + "end": "2015-12-07T23:00:00.000Z", + "name": "Día de la Constitución Española (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 12-06 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2015-12-08 00:00:00", + "start": "2015-12-07T23:00:00.000Z", + "end": "2015-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Tue" + }, + { + "date": "2015-12-25 00:00:00", + "start": "2015-12-24T23:00:00.000Z", + "end": "2015-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Fri" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-RI-2016.json b/test/fixtures/ES-RI-2016.json new file mode 100644 index 000000000..b69f66438 --- /dev/null +++ b/test/fixtures/ES-RI-2016.json @@ -0,0 +1,166 @@ +[ + { + "date": "2016-01-01 00:00:00", + "start": "2015-12-31T23:00:00.000Z", + "end": "2016-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Fri" + }, + { + "date": "2016-01-06 00:00:00", + "start": "2016-01-05T23:00:00.000Z", + "end": "2016-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Wed" + }, + { + "date": "2016-03-19 00:00:00", + "start": "2016-03-18T23:00:00.000Z", + "end": "2016-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Sat" + }, + { + "date": "2016-03-24 00:00:00", + "start": "2016-03-23T23:00:00.000Z", + "end": "2016-03-24T23:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2016-03-25 00:00:00", + "start": "2016-03-24T23:00:00.000Z", + "end": "2016-03-25T23:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2016-03-27 00:00:00", + "start": "2016-03-26T23:00:00.000Z", + "end": "2016-03-27T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2016-03-28 00:00:00", + "start": "2016-03-27T22:00:00.000Z", + "end": "2016-03-28T22:00:00.000Z", + "name": "Lunes de Pascua", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2016-05-01 00:00:00", + "start": "2016-04-30T22:00:00.000Z", + "end": "2016-05-01T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2016-05-01 00:00:00", + "start": "2016-04-30T22:00:00.000Z", + "end": "2016-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Sun" + }, + { + "date": "2016-05-15 00:00:00", + "start": "2016-05-14T22:00:00.000Z", + "end": "2016-05-15T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2016-07-25 00:00:00", + "start": "2016-07-24T22:00:00.000Z", + "end": "2016-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Mon" + }, + { + "date": "2016-08-15 00:00:00", + "start": "2016-08-14T22:00:00.000Z", + "end": "2016-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Mon" + }, + { + "date": "2016-10-12 00:00:00", + "start": "2016-10-11T22:00:00.000Z", + "end": "2016-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Wed" + }, + { + "date": "2016-11-01 00:00:00", + "start": "2016-10-31T23:00:00.000Z", + "end": "2016-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Tue" + }, + { + "date": "2016-12-06 00:00:00", + "start": "2016-12-05T23:00:00.000Z", + "end": "2016-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Tue" + }, + { + "date": "2016-12-08 00:00:00", + "start": "2016-12-07T23:00:00.000Z", + "end": "2016-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Thu" + }, + { + "date": "2016-12-25 00:00:00", + "start": "2016-12-24T23:00:00.000Z", + "end": "2016-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Sun" + }, + { + "date": "2016-12-26 00:00:00", + "start": "2016-12-25T23:00:00.000Z", + "end": "2016-12-26T23:00:00.000Z", + "name": "Navidad (día sustituto)", + "type": "public", + "substitute": true, + "rule": "substitutes 12-25 if sunday then next monday", + "_weekday": "Mon" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-RI-2017.json b/test/fixtures/ES-RI-2017.json new file mode 100644 index 000000000..bfe8e507c --- /dev/null +++ b/test/fixtures/ES-RI-2017.json @@ -0,0 +1,166 @@ +[ + { + "date": "2017-01-01 00:00:00", + "start": "2016-12-31T23:00:00.000Z", + "end": "2017-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Sun" + }, + { + "date": "2017-01-02 00:00:00", + "start": "2017-01-01T23:00:00.000Z", + "end": "2017-01-02T23:00:00.000Z", + "name": "Año Nuevo (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 01-01 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2017-01-06 00:00:00", + "start": "2017-01-05T23:00:00.000Z", + "end": "2017-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Fri" + }, + { + "date": "2017-03-19 00:00:00", + "start": "2017-03-18T23:00:00.000Z", + "end": "2017-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Sun" + }, + { + "date": "2017-04-13 00:00:00", + "start": "2017-04-12T22:00:00.000Z", + "end": "2017-04-13T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2017-04-14 00:00:00", + "start": "2017-04-13T22:00:00.000Z", + "end": "2017-04-14T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2017-04-16 00:00:00", + "start": "2017-04-15T22:00:00.000Z", + "end": "2017-04-16T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2017-04-17 00:00:00", + "start": "2017-04-16T22:00:00.000Z", + "end": "2017-04-17T22:00:00.000Z", + "name": "Lunes de Pascua", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2017-05-01 00:00:00", + "start": "2017-04-30T22:00:00.000Z", + "end": "2017-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Mon" + }, + { + "date": "2017-05-07 00:00:00", + "start": "2017-05-06T22:00:00.000Z", + "end": "2017-05-07T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2017-06-04 00:00:00", + "start": "2017-06-03T22:00:00.000Z", + "end": "2017-06-04T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2017-07-25 00:00:00", + "start": "2017-07-24T22:00:00.000Z", + "end": "2017-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Tue" + }, + { + "date": "2017-08-15 00:00:00", + "start": "2017-08-14T22:00:00.000Z", + "end": "2017-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Tue" + }, + { + "date": "2017-10-12 00:00:00", + "start": "2017-10-11T22:00:00.000Z", + "end": "2017-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Thu" + }, + { + "date": "2017-11-01 00:00:00", + "start": "2017-10-31T23:00:00.000Z", + "end": "2017-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Wed" + }, + { + "date": "2017-12-06 00:00:00", + "start": "2017-12-05T23:00:00.000Z", + "end": "2017-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Wed" + }, + { + "date": "2017-12-08 00:00:00", + "start": "2017-12-07T23:00:00.000Z", + "end": "2017-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Fri" + }, + { + "date": "2017-12-25 00:00:00", + "start": "2017-12-24T23:00:00.000Z", + "end": "2017-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Mon" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-RI-2018.json b/test/fixtures/ES-RI-2018.json new file mode 100644 index 000000000..ee5d1bad5 --- /dev/null +++ b/test/fixtures/ES-RI-2018.json @@ -0,0 +1,156 @@ +[ + { + "date": "2018-01-01 00:00:00", + "start": "2017-12-31T23:00:00.000Z", + "end": "2018-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Mon" + }, + { + "date": "2018-01-06 00:00:00", + "start": "2018-01-05T23:00:00.000Z", + "end": "2018-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Sat" + }, + { + "date": "2018-03-19 00:00:00", + "start": "2018-03-18T23:00:00.000Z", + "end": "2018-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Mon" + }, + { + "date": "2018-03-29 00:00:00", + "start": "2018-03-28T22:00:00.000Z", + "end": "2018-03-29T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2018-03-30 00:00:00", + "start": "2018-03-29T22:00:00.000Z", + "end": "2018-03-30T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2018-04-01 00:00:00", + "start": "2018-03-31T22:00:00.000Z", + "end": "2018-04-01T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2018-04-02 00:00:00", + "start": "2018-04-01T22:00:00.000Z", + "end": "2018-04-02T22:00:00.000Z", + "name": "Lunes de Pascua", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2018-05-01 00:00:00", + "start": "2018-04-30T22:00:00.000Z", + "end": "2018-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Tue" + }, + { + "date": "2018-05-06 00:00:00", + "start": "2018-05-05T22:00:00.000Z", + "end": "2018-05-06T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2018-05-20 00:00:00", + "start": "2018-05-19T22:00:00.000Z", + "end": "2018-05-20T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2018-07-25 00:00:00", + "start": "2018-07-24T22:00:00.000Z", + "end": "2018-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Wed" + }, + { + "date": "2018-08-15 00:00:00", + "start": "2018-08-14T22:00:00.000Z", + "end": "2018-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Wed" + }, + { + "date": "2018-10-12 00:00:00", + "start": "2018-10-11T22:00:00.000Z", + "end": "2018-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Fri" + }, + { + "date": "2018-11-01 00:00:00", + "start": "2018-10-31T23:00:00.000Z", + "end": "2018-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Thu" + }, + { + "date": "2018-12-06 00:00:00", + "start": "2018-12-05T23:00:00.000Z", + "end": "2018-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Thu" + }, + { + "date": "2018-12-08 00:00:00", + "start": "2018-12-07T23:00:00.000Z", + "end": "2018-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Sat" + }, + { + "date": "2018-12-25 00:00:00", + "start": "2018-12-24T23:00:00.000Z", + "end": "2018-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Tue" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-RI-2019.json b/test/fixtures/ES-RI-2019.json new file mode 100644 index 000000000..d630d4a93 --- /dev/null +++ b/test/fixtures/ES-RI-2019.json @@ -0,0 +1,176 @@ +[ + { + "date": "2019-01-01 00:00:00", + "start": "2018-12-31T23:00:00.000Z", + "end": "2019-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Tue" + }, + { + "date": "2019-01-06 00:00:00", + "start": "2019-01-05T23:00:00.000Z", + "end": "2019-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Sun" + }, + { + "date": "2019-01-07 00:00:00", + "start": "2019-01-06T23:00:00.000Z", + "end": "2019-01-07T23:00:00.000Z", + "name": "Día de los Reyes Magos (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 01-06 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2019-03-19 00:00:00", + "start": "2019-03-18T23:00:00.000Z", + "end": "2019-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Tue" + }, + { + "date": "2019-04-18 00:00:00", + "start": "2019-04-17T22:00:00.000Z", + "end": "2019-04-18T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2019-04-19 00:00:00", + "start": "2019-04-18T22:00:00.000Z", + "end": "2019-04-19T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2019-04-21 00:00:00", + "start": "2019-04-20T22:00:00.000Z", + "end": "2019-04-21T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2019-04-22 00:00:00", + "start": "2019-04-21T22:00:00.000Z", + "end": "2019-04-22T22:00:00.000Z", + "name": "Lunes de Pascua", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2019-05-01 00:00:00", + "start": "2019-04-30T22:00:00.000Z", + "end": "2019-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Wed" + }, + { + "date": "2019-05-05 00:00:00", + "start": "2019-05-04T22:00:00.000Z", + "end": "2019-05-05T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2019-06-09 00:00:00", + "start": "2019-06-08T22:00:00.000Z", + "end": "2019-06-09T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2019-07-25 00:00:00", + "start": "2019-07-24T22:00:00.000Z", + "end": "2019-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Thu" + }, + { + "date": "2019-08-15 00:00:00", + "start": "2019-08-14T22:00:00.000Z", + "end": "2019-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Thu" + }, + { + "date": "2019-10-12 00:00:00", + "start": "2019-10-11T22:00:00.000Z", + "end": "2019-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Sat" + }, + { + "date": "2019-11-01 00:00:00", + "start": "2019-10-31T23:00:00.000Z", + "end": "2019-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Fri" + }, + { + "date": "2019-12-06 00:00:00", + "start": "2019-12-05T23:00:00.000Z", + "end": "2019-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Fri" + }, + { + "date": "2019-12-08 00:00:00", + "start": "2019-12-07T23:00:00.000Z", + "end": "2019-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Sun" + }, + { + "date": "2019-12-09 00:00:00", + "start": "2019-12-08T23:00:00.000Z", + "end": "2019-12-09T23:00:00.000Z", + "name": "La inmaculada concepción (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 12-08 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2019-12-25 00:00:00", + "start": "2019-12-24T23:00:00.000Z", + "end": "2019-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Wed" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-RI-2020.json b/test/fixtures/ES-RI-2020.json new file mode 100644 index 000000000..3d51e2349 --- /dev/null +++ b/test/fixtures/ES-RI-2020.json @@ -0,0 +1,176 @@ +[ + { + "date": "2020-01-01 00:00:00", + "start": "2019-12-31T23:00:00.000Z", + "end": "2020-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Wed" + }, + { + "date": "2020-01-06 00:00:00", + "start": "2020-01-05T23:00:00.000Z", + "end": "2020-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Mon" + }, + { + "date": "2020-03-19 00:00:00", + "start": "2020-03-18T23:00:00.000Z", + "end": "2020-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Thu" + }, + { + "date": "2020-04-09 00:00:00", + "start": "2020-04-08T22:00:00.000Z", + "end": "2020-04-09T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2020-04-10 00:00:00", + "start": "2020-04-09T22:00:00.000Z", + "end": "2020-04-10T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2020-04-12 00:00:00", + "start": "2020-04-11T22:00:00.000Z", + "end": "2020-04-12T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2020-04-13 00:00:00", + "start": "2020-04-12T22:00:00.000Z", + "end": "2020-04-13T22:00:00.000Z", + "name": "Lunes de Pascua", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2020-05-01 00:00:00", + "start": "2020-04-30T22:00:00.000Z", + "end": "2020-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Fri" + }, + { + "date": "2020-05-03 00:00:00", + "start": "2020-05-02T22:00:00.000Z", + "end": "2020-05-03T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2020-05-31 00:00:00", + "start": "2020-05-30T22:00:00.000Z", + "end": "2020-05-31T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2020-07-25 00:00:00", + "start": "2020-07-24T22:00:00.000Z", + "end": "2020-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Sat" + }, + { + "date": "2020-08-15 00:00:00", + "start": "2020-08-14T22:00:00.000Z", + "end": "2020-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Sat" + }, + { + "date": "2020-10-12 00:00:00", + "start": "2020-10-11T22:00:00.000Z", + "end": "2020-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Mon" + }, + { + "date": "2020-11-01 00:00:00", + "start": "2020-10-31T23:00:00.000Z", + "end": "2020-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Sun" + }, + { + "date": "2020-11-02 00:00:00", + "start": "2020-11-01T23:00:00.000Z", + "end": "2020-11-02T23:00:00.000Z", + "name": "Todos los Santos (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 11-01 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2020-12-06 00:00:00", + "start": "2020-12-05T23:00:00.000Z", + "end": "2020-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Sun" + }, + { + "date": "2020-12-07 00:00:00", + "start": "2020-12-06T23:00:00.000Z", + "end": "2020-12-07T23:00:00.000Z", + "name": "Día de la Constitución Española (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 12-06 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2020-12-08 00:00:00", + "start": "2020-12-07T23:00:00.000Z", + "end": "2020-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Tue" + }, + { + "date": "2020-12-25 00:00:00", + "start": "2020-12-24T23:00:00.000Z", + "end": "2020-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Fri" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-RI-2021.json b/test/fixtures/ES-RI-2021.json new file mode 100644 index 000000000..5a955b3e7 --- /dev/null +++ b/test/fixtures/ES-RI-2021.json @@ -0,0 +1,156 @@ +[ + { + "date": "2021-01-01 00:00:00", + "start": "2020-12-31T23:00:00.000Z", + "end": "2021-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Fri" + }, + { + "date": "2021-01-06 00:00:00", + "start": "2021-01-05T23:00:00.000Z", + "end": "2021-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Wed" + }, + { + "date": "2021-03-19 00:00:00", + "start": "2021-03-18T23:00:00.000Z", + "end": "2021-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Fri" + }, + { + "date": "2021-04-01 00:00:00", + "start": "2021-03-31T22:00:00.000Z", + "end": "2021-04-01T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2021-04-02 00:00:00", + "start": "2021-04-01T22:00:00.000Z", + "end": "2021-04-02T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2021-04-04 00:00:00", + "start": "2021-04-03T22:00:00.000Z", + "end": "2021-04-04T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2021-04-05 00:00:00", + "start": "2021-04-04T22:00:00.000Z", + "end": "2021-04-05T22:00:00.000Z", + "name": "Lunes de Pascua", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2021-05-01 00:00:00", + "start": "2021-04-30T22:00:00.000Z", + "end": "2021-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Sat" + }, + { + "date": "2021-05-02 00:00:00", + "start": "2021-05-01T22:00:00.000Z", + "end": "2021-05-02T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2021-05-23 00:00:00", + "start": "2021-05-22T22:00:00.000Z", + "end": "2021-05-23T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2021-07-25 00:00:00", + "start": "2021-07-24T22:00:00.000Z", + "end": "2021-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Sun" + }, + { + "date": "2021-08-15 00:00:00", + "start": "2021-08-14T22:00:00.000Z", + "end": "2021-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Sun" + }, + { + "date": "2021-10-12 00:00:00", + "start": "2021-10-11T22:00:00.000Z", + "end": "2021-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Tue" + }, + { + "date": "2021-11-01 00:00:00", + "start": "2021-10-31T23:00:00.000Z", + "end": "2021-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Mon" + }, + { + "date": "2021-12-06 00:00:00", + "start": "2021-12-05T23:00:00.000Z", + "end": "2021-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Mon" + }, + { + "date": "2021-12-08 00:00:00", + "start": "2021-12-07T23:00:00.000Z", + "end": "2021-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Wed" + }, + { + "date": "2021-12-25 00:00:00", + "start": "2021-12-24T23:00:00.000Z", + "end": "2021-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Sat" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-RI-2022.json b/test/fixtures/ES-RI-2022.json new file mode 100644 index 000000000..a8b8e979a --- /dev/null +++ b/test/fixtures/ES-RI-2022.json @@ -0,0 +1,166 @@ +[ + { + "date": "2022-01-01 00:00:00", + "start": "2021-12-31T23:00:00.000Z", + "end": "2022-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Sat" + }, + { + "date": "2022-01-06 00:00:00", + "start": "2022-01-05T23:00:00.000Z", + "end": "2022-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Thu" + }, + { + "date": "2022-03-19 00:00:00", + "start": "2022-03-18T23:00:00.000Z", + "end": "2022-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Sat" + }, + { + "date": "2022-04-14 00:00:00", + "start": "2022-04-13T22:00:00.000Z", + "end": "2022-04-14T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2022-04-15 00:00:00", + "start": "2022-04-14T22:00:00.000Z", + "end": "2022-04-15T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2022-04-17 00:00:00", + "start": "2022-04-16T22:00:00.000Z", + "end": "2022-04-17T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2022-04-18 00:00:00", + "start": "2022-04-17T22:00:00.000Z", + "end": "2022-04-18T22:00:00.000Z", + "name": "Lunes de Pascua", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2022-05-01 00:00:00", + "start": "2022-04-30T22:00:00.000Z", + "end": "2022-05-01T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2022-05-01 00:00:00", + "start": "2022-04-30T22:00:00.000Z", + "end": "2022-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Sun" + }, + { + "date": "2022-06-05 00:00:00", + "start": "2022-06-04T22:00:00.000Z", + "end": "2022-06-05T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2022-07-25 00:00:00", + "start": "2022-07-24T22:00:00.000Z", + "end": "2022-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Mon" + }, + { + "date": "2022-08-15 00:00:00", + "start": "2022-08-14T22:00:00.000Z", + "end": "2022-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Mon" + }, + { + "date": "2022-10-12 00:00:00", + "start": "2022-10-11T22:00:00.000Z", + "end": "2022-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Wed" + }, + { + "date": "2022-11-01 00:00:00", + "start": "2022-10-31T23:00:00.000Z", + "end": "2022-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Tue" + }, + { + "date": "2022-12-06 00:00:00", + "start": "2022-12-05T23:00:00.000Z", + "end": "2022-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Tue" + }, + { + "date": "2022-12-08 00:00:00", + "start": "2022-12-07T23:00:00.000Z", + "end": "2022-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Thu" + }, + { + "date": "2022-12-25 00:00:00", + "start": "2022-12-24T23:00:00.000Z", + "end": "2022-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Sun" + }, + { + "date": "2022-12-26 00:00:00", + "start": "2022-12-25T23:00:00.000Z", + "end": "2022-12-26T23:00:00.000Z", + "name": "Navidad (día sustituto)", + "type": "public", + "substitute": true, + "rule": "substitutes 12-25 if sunday then next monday", + "_weekday": "Mon" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-RI-2023.json b/test/fixtures/ES-RI-2023.json new file mode 100644 index 000000000..77508cf1e --- /dev/null +++ b/test/fixtures/ES-RI-2023.json @@ -0,0 +1,166 @@ +[ + { + "date": "2023-01-01 00:00:00", + "start": "2022-12-31T23:00:00.000Z", + "end": "2023-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Sun" + }, + { + "date": "2023-01-02 00:00:00", + "start": "2023-01-01T23:00:00.000Z", + "end": "2023-01-02T23:00:00.000Z", + "name": "Año Nuevo (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 01-01 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2023-01-06 00:00:00", + "start": "2023-01-05T23:00:00.000Z", + "end": "2023-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Fri" + }, + { + "date": "2023-03-19 00:00:00", + "start": "2023-03-18T23:00:00.000Z", + "end": "2023-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Sun" + }, + { + "date": "2023-04-06 00:00:00", + "start": "2023-04-05T22:00:00.000Z", + "end": "2023-04-06T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2023-04-07 00:00:00", + "start": "2023-04-06T22:00:00.000Z", + "end": "2023-04-07T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2023-04-09 00:00:00", + "start": "2023-04-08T22:00:00.000Z", + "end": "2023-04-09T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2023-04-10 00:00:00", + "start": "2023-04-09T22:00:00.000Z", + "end": "2023-04-10T22:00:00.000Z", + "name": "Lunes de Pascua", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2023-05-01 00:00:00", + "start": "2023-04-30T22:00:00.000Z", + "end": "2023-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Mon" + }, + { + "date": "2023-05-07 00:00:00", + "start": "2023-05-06T22:00:00.000Z", + "end": "2023-05-07T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2023-05-28 00:00:00", + "start": "2023-05-27T22:00:00.000Z", + "end": "2023-05-28T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2023-07-25 00:00:00", + "start": "2023-07-24T22:00:00.000Z", + "end": "2023-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Tue" + }, + { + "date": "2023-08-15 00:00:00", + "start": "2023-08-14T22:00:00.000Z", + "end": "2023-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Tue" + }, + { + "date": "2023-10-12 00:00:00", + "start": "2023-10-11T22:00:00.000Z", + "end": "2023-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Thu" + }, + { + "date": "2023-11-01 00:00:00", + "start": "2023-10-31T23:00:00.000Z", + "end": "2023-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Wed" + }, + { + "date": "2023-12-06 00:00:00", + "start": "2023-12-05T23:00:00.000Z", + "end": "2023-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Wed" + }, + { + "date": "2023-12-08 00:00:00", + "start": "2023-12-07T23:00:00.000Z", + "end": "2023-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Fri" + }, + { + "date": "2023-12-25 00:00:00", + "start": "2023-12-24T23:00:00.000Z", + "end": "2023-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Mon" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-RI-2024.json b/test/fixtures/ES-RI-2024.json new file mode 100644 index 000000000..3aee6ac32 --- /dev/null +++ b/test/fixtures/ES-RI-2024.json @@ -0,0 +1,166 @@ +[ + { + "date": "2024-01-01 00:00:00", + "start": "2023-12-31T23:00:00.000Z", + "end": "2024-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Mon" + }, + { + "date": "2024-01-06 00:00:00", + "start": "2024-01-05T23:00:00.000Z", + "end": "2024-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Sat" + }, + { + "date": "2024-03-19 00:00:00", + "start": "2024-03-18T23:00:00.000Z", + "end": "2024-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Tue" + }, + { + "date": "2024-03-28 00:00:00", + "start": "2024-03-27T23:00:00.000Z", + "end": "2024-03-28T23:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2024-03-29 00:00:00", + "start": "2024-03-28T23:00:00.000Z", + "end": "2024-03-29T23:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2024-03-31 00:00:00", + "start": "2024-03-30T23:00:00.000Z", + "end": "2024-03-31T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2024-04-01 00:00:00", + "start": "2024-03-31T22:00:00.000Z", + "end": "2024-04-01T22:00:00.000Z", + "name": "Lunes de Pascua", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2024-05-01 00:00:00", + "start": "2024-04-30T22:00:00.000Z", + "end": "2024-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Wed" + }, + { + "date": "2024-05-05 00:00:00", + "start": "2024-05-04T22:00:00.000Z", + "end": "2024-05-05T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2024-05-19 00:00:00", + "start": "2024-05-18T22:00:00.000Z", + "end": "2024-05-19T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2024-07-25 00:00:00", + "start": "2024-07-24T22:00:00.000Z", + "end": "2024-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Thu" + }, + { + "date": "2024-08-15 00:00:00", + "start": "2024-08-14T22:00:00.000Z", + "end": "2024-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Thu" + }, + { + "date": "2024-10-12 00:00:00", + "start": "2024-10-11T22:00:00.000Z", + "end": "2024-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Sat" + }, + { + "date": "2024-11-01 00:00:00", + "start": "2024-10-31T23:00:00.000Z", + "end": "2024-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Fri" + }, + { + "date": "2024-12-06 00:00:00", + "start": "2024-12-05T23:00:00.000Z", + "end": "2024-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Fri" + }, + { + "date": "2024-12-08 00:00:00", + "start": "2024-12-07T23:00:00.000Z", + "end": "2024-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Sun" + }, + { + "date": "2024-12-09 00:00:00", + "start": "2024-12-08T23:00:00.000Z", + "end": "2024-12-09T23:00:00.000Z", + "name": "La inmaculada concepción (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 12-08 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2024-12-25 00:00:00", + "start": "2024-12-24T23:00:00.000Z", + "end": "2024-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Wed" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-RI-2025.json b/test/fixtures/ES-RI-2025.json new file mode 100644 index 000000000..1b423f730 --- /dev/null +++ b/test/fixtures/ES-RI-2025.json @@ -0,0 +1,166 @@ +[ + { + "date": "2025-01-01 00:00:00", + "start": "2024-12-31T23:00:00.000Z", + "end": "2025-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Wed" + }, + { + "date": "2025-01-06 00:00:00", + "start": "2025-01-05T23:00:00.000Z", + "end": "2025-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Mon" + }, + { + "date": "2025-03-19 00:00:00", + "start": "2025-03-18T23:00:00.000Z", + "end": "2025-03-19T23:00:00.000Z", + "name": "San José", + "type": "observance", + "rule": "03-19", + "_weekday": "Wed" + }, + { + "date": "2025-04-17 00:00:00", + "start": "2025-04-16T22:00:00.000Z", + "end": "2025-04-17T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2025-04-18 00:00:00", + "start": "2025-04-17T22:00:00.000Z", + "end": "2025-04-18T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2025-04-20 00:00:00", + "start": "2025-04-19T22:00:00.000Z", + "end": "2025-04-20T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2025-04-21 00:00:00", + "start": "2025-04-20T22:00:00.000Z", + "end": "2025-04-21T22:00:00.000Z", + "name": "Lunes de Pascua", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2025-05-01 00:00:00", + "start": "2025-04-30T22:00:00.000Z", + "end": "2025-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Thu" + }, + { + "date": "2025-05-04 00:00:00", + "start": "2025-05-03T22:00:00.000Z", + "end": "2025-05-04T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2025-06-08 00:00:00", + "start": "2025-06-07T22:00:00.000Z", + "end": "2025-06-08T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2025-07-25 00:00:00", + "start": "2025-07-24T22:00:00.000Z", + "end": "2025-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Fri" + }, + { + "date": "2025-08-15 00:00:00", + "start": "2025-08-14T22:00:00.000Z", + "end": "2025-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Fri" + }, + { + "date": "2025-10-12 00:00:00", + "start": "2025-10-11T22:00:00.000Z", + "end": "2025-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Sun" + }, + { + "date": "2025-10-13 00:00:00", + "start": "2025-10-12T22:00:00.000Z", + "end": "2025-10-13T22:00:00.000Z", + "name": "Fiesta Nacional de España (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 10-12 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2025-11-01 00:00:00", + "start": "2025-10-31T23:00:00.000Z", + "end": "2025-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Sat" + }, + { + "date": "2025-12-06 00:00:00", + "start": "2025-12-05T23:00:00.000Z", + "end": "2025-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Sat" + }, + { + "date": "2025-12-08 00:00:00", + "start": "2025-12-07T23:00:00.000Z", + "end": "2025-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Mon" + }, + { + "date": "2025-12-25 00:00:00", + "start": "2025-12-24T23:00:00.000Z", + "end": "2025-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Thu" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-VC-2015.json b/test/fixtures/ES-VC-2015.json new file mode 100644 index 000000000..e08674fd8 --- /dev/null +++ b/test/fixtures/ES-VC-2015.json @@ -0,0 +1,176 @@ +[ + { + "date": "2015-01-01 00:00:00", + "start": "2014-12-31T23:00:00.000Z", + "end": "2015-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Thu" + }, + { + "date": "2015-01-06 00:00:00", + "start": "2015-01-05T23:00:00.000Z", + "end": "2015-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Tue" + }, + { + "date": "2015-03-19 00:00:00", + "start": "2015-03-18T23:00:00.000Z", + "end": "2015-03-19T23:00:00.000Z", + "name": "San José", + "type": "public", + "rule": "03-19", + "_weekday": "Thu" + }, + { + "date": "2015-04-02 00:00:00", + "start": "2015-04-01T22:00:00.000Z", + "end": "2015-04-02T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2015-04-03 00:00:00", + "start": "2015-04-02T22:00:00.000Z", + "end": "2015-04-03T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2015-04-05 00:00:00", + "start": "2015-04-04T22:00:00.000Z", + "end": "2015-04-05T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2015-04-06 00:00:00", + "start": "2015-04-05T22:00:00.000Z", + "end": "2015-04-06T22:00:00.000Z", + "name": "Lunes de Pascua", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2015-05-01 00:00:00", + "start": "2015-04-30T22:00:00.000Z", + "end": "2015-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Fri" + }, + { + "date": "2015-05-03 00:00:00", + "start": "2015-05-02T22:00:00.000Z", + "end": "2015-05-03T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2015-05-24 00:00:00", + "start": "2015-05-23T22:00:00.000Z", + "end": "2015-05-24T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2015-07-25 00:00:00", + "start": "2015-07-24T22:00:00.000Z", + "end": "2015-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Sat" + }, + { + "date": "2015-08-15 00:00:00", + "start": "2015-08-14T22:00:00.000Z", + "end": "2015-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Sat" + }, + { + "date": "2015-10-12 00:00:00", + "start": "2015-10-11T22:00:00.000Z", + "end": "2015-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Mon" + }, + { + "date": "2015-11-01 00:00:00", + "start": "2015-10-31T23:00:00.000Z", + "end": "2015-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Sun" + }, + { + "date": "2015-11-02 00:00:00", + "start": "2015-11-01T23:00:00.000Z", + "end": "2015-11-02T23:00:00.000Z", + "name": "Todos los Santos (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 11-01 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2015-12-06 00:00:00", + "start": "2015-12-05T23:00:00.000Z", + "end": "2015-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Sun" + }, + { + "date": "2015-12-07 00:00:00", + "start": "2015-12-06T23:00:00.000Z", + "end": "2015-12-07T23:00:00.000Z", + "name": "Día de la Constitución Española (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 12-06 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2015-12-08 00:00:00", + "start": "2015-12-07T23:00:00.000Z", + "end": "2015-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Tue" + }, + { + "date": "2015-12-25 00:00:00", + "start": "2015-12-24T23:00:00.000Z", + "end": "2015-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Fri" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-VC-2016.json b/test/fixtures/ES-VC-2016.json new file mode 100644 index 000000000..4a4122d86 --- /dev/null +++ b/test/fixtures/ES-VC-2016.json @@ -0,0 +1,166 @@ +[ + { + "date": "2016-01-01 00:00:00", + "start": "2015-12-31T23:00:00.000Z", + "end": "2016-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Fri" + }, + { + "date": "2016-01-06 00:00:00", + "start": "2016-01-05T23:00:00.000Z", + "end": "2016-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Wed" + }, + { + "date": "2016-03-19 00:00:00", + "start": "2016-03-18T23:00:00.000Z", + "end": "2016-03-19T23:00:00.000Z", + "name": "San José", + "type": "public", + "rule": "03-19", + "_weekday": "Sat" + }, + { + "date": "2016-03-24 00:00:00", + "start": "2016-03-23T23:00:00.000Z", + "end": "2016-03-24T23:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2016-03-25 00:00:00", + "start": "2016-03-24T23:00:00.000Z", + "end": "2016-03-25T23:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2016-03-27 00:00:00", + "start": "2016-03-26T23:00:00.000Z", + "end": "2016-03-27T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2016-03-28 00:00:00", + "start": "2016-03-27T22:00:00.000Z", + "end": "2016-03-28T22:00:00.000Z", + "name": "Lunes de Pascua", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2016-05-01 00:00:00", + "start": "2016-04-30T22:00:00.000Z", + "end": "2016-05-01T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2016-05-01 00:00:00", + "start": "2016-04-30T22:00:00.000Z", + "end": "2016-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Sun" + }, + { + "date": "2016-05-15 00:00:00", + "start": "2016-05-14T22:00:00.000Z", + "end": "2016-05-15T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2016-07-25 00:00:00", + "start": "2016-07-24T22:00:00.000Z", + "end": "2016-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Mon" + }, + { + "date": "2016-08-15 00:00:00", + "start": "2016-08-14T22:00:00.000Z", + "end": "2016-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Mon" + }, + { + "date": "2016-10-12 00:00:00", + "start": "2016-10-11T22:00:00.000Z", + "end": "2016-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Wed" + }, + { + "date": "2016-11-01 00:00:00", + "start": "2016-10-31T23:00:00.000Z", + "end": "2016-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Tue" + }, + { + "date": "2016-12-06 00:00:00", + "start": "2016-12-05T23:00:00.000Z", + "end": "2016-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Tue" + }, + { + "date": "2016-12-08 00:00:00", + "start": "2016-12-07T23:00:00.000Z", + "end": "2016-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Thu" + }, + { + "date": "2016-12-25 00:00:00", + "start": "2016-12-24T23:00:00.000Z", + "end": "2016-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Sun" + }, + { + "date": "2016-12-26 00:00:00", + "start": "2016-12-25T23:00:00.000Z", + "end": "2016-12-26T23:00:00.000Z", + "name": "Navidad (día sustituto)", + "type": "public", + "substitute": true, + "rule": "substitutes 12-25 if sunday then next monday", + "_weekday": "Mon" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-VC-2017.json b/test/fixtures/ES-VC-2017.json new file mode 100644 index 000000000..7f249afe6 --- /dev/null +++ b/test/fixtures/ES-VC-2017.json @@ -0,0 +1,166 @@ +[ + { + "date": "2017-01-01 00:00:00", + "start": "2016-12-31T23:00:00.000Z", + "end": "2017-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Sun" + }, + { + "date": "2017-01-02 00:00:00", + "start": "2017-01-01T23:00:00.000Z", + "end": "2017-01-02T23:00:00.000Z", + "name": "Año Nuevo (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 01-01 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2017-01-06 00:00:00", + "start": "2017-01-05T23:00:00.000Z", + "end": "2017-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Fri" + }, + { + "date": "2017-03-19 00:00:00", + "start": "2017-03-18T23:00:00.000Z", + "end": "2017-03-19T23:00:00.000Z", + "name": "San José", + "type": "public", + "rule": "03-19", + "_weekday": "Sun" + }, + { + "date": "2017-04-13 00:00:00", + "start": "2017-04-12T22:00:00.000Z", + "end": "2017-04-13T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2017-04-14 00:00:00", + "start": "2017-04-13T22:00:00.000Z", + "end": "2017-04-14T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2017-04-16 00:00:00", + "start": "2017-04-15T22:00:00.000Z", + "end": "2017-04-16T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2017-04-17 00:00:00", + "start": "2017-04-16T22:00:00.000Z", + "end": "2017-04-17T22:00:00.000Z", + "name": "Lunes de Pascua", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2017-05-01 00:00:00", + "start": "2017-04-30T22:00:00.000Z", + "end": "2017-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Mon" + }, + { + "date": "2017-05-07 00:00:00", + "start": "2017-05-06T22:00:00.000Z", + "end": "2017-05-07T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2017-06-04 00:00:00", + "start": "2017-06-03T22:00:00.000Z", + "end": "2017-06-04T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2017-07-25 00:00:00", + "start": "2017-07-24T22:00:00.000Z", + "end": "2017-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Tue" + }, + { + "date": "2017-08-15 00:00:00", + "start": "2017-08-14T22:00:00.000Z", + "end": "2017-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Tue" + }, + { + "date": "2017-10-12 00:00:00", + "start": "2017-10-11T22:00:00.000Z", + "end": "2017-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Thu" + }, + { + "date": "2017-11-01 00:00:00", + "start": "2017-10-31T23:00:00.000Z", + "end": "2017-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Wed" + }, + { + "date": "2017-12-06 00:00:00", + "start": "2017-12-05T23:00:00.000Z", + "end": "2017-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Wed" + }, + { + "date": "2017-12-08 00:00:00", + "start": "2017-12-07T23:00:00.000Z", + "end": "2017-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Fri" + }, + { + "date": "2017-12-25 00:00:00", + "start": "2017-12-24T23:00:00.000Z", + "end": "2017-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Mon" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-VC-2018.json b/test/fixtures/ES-VC-2018.json new file mode 100644 index 000000000..e28d13e4d --- /dev/null +++ b/test/fixtures/ES-VC-2018.json @@ -0,0 +1,156 @@ +[ + { + "date": "2018-01-01 00:00:00", + "start": "2017-12-31T23:00:00.000Z", + "end": "2018-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Mon" + }, + { + "date": "2018-01-06 00:00:00", + "start": "2018-01-05T23:00:00.000Z", + "end": "2018-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Sat" + }, + { + "date": "2018-03-19 00:00:00", + "start": "2018-03-18T23:00:00.000Z", + "end": "2018-03-19T23:00:00.000Z", + "name": "San José", + "type": "public", + "rule": "03-19", + "_weekday": "Mon" + }, + { + "date": "2018-03-29 00:00:00", + "start": "2018-03-28T22:00:00.000Z", + "end": "2018-03-29T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2018-03-30 00:00:00", + "start": "2018-03-29T22:00:00.000Z", + "end": "2018-03-30T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2018-04-01 00:00:00", + "start": "2018-03-31T22:00:00.000Z", + "end": "2018-04-01T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2018-04-02 00:00:00", + "start": "2018-04-01T22:00:00.000Z", + "end": "2018-04-02T22:00:00.000Z", + "name": "Lunes de Pascua", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2018-05-01 00:00:00", + "start": "2018-04-30T22:00:00.000Z", + "end": "2018-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Tue" + }, + { + "date": "2018-05-06 00:00:00", + "start": "2018-05-05T22:00:00.000Z", + "end": "2018-05-06T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2018-05-20 00:00:00", + "start": "2018-05-19T22:00:00.000Z", + "end": "2018-05-20T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2018-07-25 00:00:00", + "start": "2018-07-24T22:00:00.000Z", + "end": "2018-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Wed" + }, + { + "date": "2018-08-15 00:00:00", + "start": "2018-08-14T22:00:00.000Z", + "end": "2018-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Wed" + }, + { + "date": "2018-10-12 00:00:00", + "start": "2018-10-11T22:00:00.000Z", + "end": "2018-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Fri" + }, + { + "date": "2018-11-01 00:00:00", + "start": "2018-10-31T23:00:00.000Z", + "end": "2018-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Thu" + }, + { + "date": "2018-12-06 00:00:00", + "start": "2018-12-05T23:00:00.000Z", + "end": "2018-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Thu" + }, + { + "date": "2018-12-08 00:00:00", + "start": "2018-12-07T23:00:00.000Z", + "end": "2018-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Sat" + }, + { + "date": "2018-12-25 00:00:00", + "start": "2018-12-24T23:00:00.000Z", + "end": "2018-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Tue" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-VC-2019.json b/test/fixtures/ES-VC-2019.json new file mode 100644 index 000000000..e54da733c --- /dev/null +++ b/test/fixtures/ES-VC-2019.json @@ -0,0 +1,176 @@ +[ + { + "date": "2019-01-01 00:00:00", + "start": "2018-12-31T23:00:00.000Z", + "end": "2019-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Tue" + }, + { + "date": "2019-01-06 00:00:00", + "start": "2019-01-05T23:00:00.000Z", + "end": "2019-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Sun" + }, + { + "date": "2019-01-07 00:00:00", + "start": "2019-01-06T23:00:00.000Z", + "end": "2019-01-07T23:00:00.000Z", + "name": "Día de los Reyes Magos (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 01-06 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2019-03-19 00:00:00", + "start": "2019-03-18T23:00:00.000Z", + "end": "2019-03-19T23:00:00.000Z", + "name": "San José", + "type": "public", + "rule": "03-19", + "_weekday": "Tue" + }, + { + "date": "2019-04-18 00:00:00", + "start": "2019-04-17T22:00:00.000Z", + "end": "2019-04-18T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2019-04-19 00:00:00", + "start": "2019-04-18T22:00:00.000Z", + "end": "2019-04-19T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2019-04-21 00:00:00", + "start": "2019-04-20T22:00:00.000Z", + "end": "2019-04-21T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2019-04-22 00:00:00", + "start": "2019-04-21T22:00:00.000Z", + "end": "2019-04-22T22:00:00.000Z", + "name": "Lunes de Pascua", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2019-05-01 00:00:00", + "start": "2019-04-30T22:00:00.000Z", + "end": "2019-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Wed" + }, + { + "date": "2019-05-05 00:00:00", + "start": "2019-05-04T22:00:00.000Z", + "end": "2019-05-05T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2019-06-09 00:00:00", + "start": "2019-06-08T22:00:00.000Z", + "end": "2019-06-09T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2019-07-25 00:00:00", + "start": "2019-07-24T22:00:00.000Z", + "end": "2019-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Thu" + }, + { + "date": "2019-08-15 00:00:00", + "start": "2019-08-14T22:00:00.000Z", + "end": "2019-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Thu" + }, + { + "date": "2019-10-12 00:00:00", + "start": "2019-10-11T22:00:00.000Z", + "end": "2019-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Sat" + }, + { + "date": "2019-11-01 00:00:00", + "start": "2019-10-31T23:00:00.000Z", + "end": "2019-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Fri" + }, + { + "date": "2019-12-06 00:00:00", + "start": "2019-12-05T23:00:00.000Z", + "end": "2019-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Fri" + }, + { + "date": "2019-12-08 00:00:00", + "start": "2019-12-07T23:00:00.000Z", + "end": "2019-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Sun" + }, + { + "date": "2019-12-09 00:00:00", + "start": "2019-12-08T23:00:00.000Z", + "end": "2019-12-09T23:00:00.000Z", + "name": "La inmaculada concepción (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 12-08 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2019-12-25 00:00:00", + "start": "2019-12-24T23:00:00.000Z", + "end": "2019-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Wed" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-VC-2020.json b/test/fixtures/ES-VC-2020.json new file mode 100644 index 000000000..5cb240249 --- /dev/null +++ b/test/fixtures/ES-VC-2020.json @@ -0,0 +1,176 @@ +[ + { + "date": "2020-01-01 00:00:00", + "start": "2019-12-31T23:00:00.000Z", + "end": "2020-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Wed" + }, + { + "date": "2020-01-06 00:00:00", + "start": "2020-01-05T23:00:00.000Z", + "end": "2020-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Mon" + }, + { + "date": "2020-03-19 00:00:00", + "start": "2020-03-18T23:00:00.000Z", + "end": "2020-03-19T23:00:00.000Z", + "name": "San José", + "type": "public", + "rule": "03-19", + "_weekday": "Thu" + }, + { + "date": "2020-04-09 00:00:00", + "start": "2020-04-08T22:00:00.000Z", + "end": "2020-04-09T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2020-04-10 00:00:00", + "start": "2020-04-09T22:00:00.000Z", + "end": "2020-04-10T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2020-04-12 00:00:00", + "start": "2020-04-11T22:00:00.000Z", + "end": "2020-04-12T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2020-04-13 00:00:00", + "start": "2020-04-12T22:00:00.000Z", + "end": "2020-04-13T22:00:00.000Z", + "name": "Lunes de Pascua", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2020-05-01 00:00:00", + "start": "2020-04-30T22:00:00.000Z", + "end": "2020-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Fri" + }, + { + "date": "2020-05-03 00:00:00", + "start": "2020-05-02T22:00:00.000Z", + "end": "2020-05-03T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2020-05-31 00:00:00", + "start": "2020-05-30T22:00:00.000Z", + "end": "2020-05-31T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2020-07-25 00:00:00", + "start": "2020-07-24T22:00:00.000Z", + "end": "2020-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Sat" + }, + { + "date": "2020-08-15 00:00:00", + "start": "2020-08-14T22:00:00.000Z", + "end": "2020-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Sat" + }, + { + "date": "2020-10-12 00:00:00", + "start": "2020-10-11T22:00:00.000Z", + "end": "2020-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Mon" + }, + { + "date": "2020-11-01 00:00:00", + "start": "2020-10-31T23:00:00.000Z", + "end": "2020-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Sun" + }, + { + "date": "2020-11-02 00:00:00", + "start": "2020-11-01T23:00:00.000Z", + "end": "2020-11-02T23:00:00.000Z", + "name": "Todos los Santos (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 11-01 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2020-12-06 00:00:00", + "start": "2020-12-05T23:00:00.000Z", + "end": "2020-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Sun" + }, + { + "date": "2020-12-07 00:00:00", + "start": "2020-12-06T23:00:00.000Z", + "end": "2020-12-07T23:00:00.000Z", + "name": "Día de la Constitución Española (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 12-06 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2020-12-08 00:00:00", + "start": "2020-12-07T23:00:00.000Z", + "end": "2020-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Tue" + }, + { + "date": "2020-12-25 00:00:00", + "start": "2020-12-24T23:00:00.000Z", + "end": "2020-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Fri" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-VC-2021.json b/test/fixtures/ES-VC-2021.json new file mode 100644 index 000000000..7476f617d --- /dev/null +++ b/test/fixtures/ES-VC-2021.json @@ -0,0 +1,156 @@ +[ + { + "date": "2021-01-01 00:00:00", + "start": "2020-12-31T23:00:00.000Z", + "end": "2021-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Fri" + }, + { + "date": "2021-01-06 00:00:00", + "start": "2021-01-05T23:00:00.000Z", + "end": "2021-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Wed" + }, + { + "date": "2021-03-19 00:00:00", + "start": "2021-03-18T23:00:00.000Z", + "end": "2021-03-19T23:00:00.000Z", + "name": "San José", + "type": "public", + "rule": "03-19", + "_weekday": "Fri" + }, + { + "date": "2021-04-01 00:00:00", + "start": "2021-03-31T22:00:00.000Z", + "end": "2021-04-01T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2021-04-02 00:00:00", + "start": "2021-04-01T22:00:00.000Z", + "end": "2021-04-02T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2021-04-04 00:00:00", + "start": "2021-04-03T22:00:00.000Z", + "end": "2021-04-04T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2021-04-05 00:00:00", + "start": "2021-04-04T22:00:00.000Z", + "end": "2021-04-05T22:00:00.000Z", + "name": "Lunes de Pascua", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2021-05-01 00:00:00", + "start": "2021-04-30T22:00:00.000Z", + "end": "2021-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Sat" + }, + { + "date": "2021-05-02 00:00:00", + "start": "2021-05-01T22:00:00.000Z", + "end": "2021-05-02T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2021-05-23 00:00:00", + "start": "2021-05-22T22:00:00.000Z", + "end": "2021-05-23T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2021-07-25 00:00:00", + "start": "2021-07-24T22:00:00.000Z", + "end": "2021-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Sun" + }, + { + "date": "2021-08-15 00:00:00", + "start": "2021-08-14T22:00:00.000Z", + "end": "2021-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Sun" + }, + { + "date": "2021-10-12 00:00:00", + "start": "2021-10-11T22:00:00.000Z", + "end": "2021-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Tue" + }, + { + "date": "2021-11-01 00:00:00", + "start": "2021-10-31T23:00:00.000Z", + "end": "2021-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Mon" + }, + { + "date": "2021-12-06 00:00:00", + "start": "2021-12-05T23:00:00.000Z", + "end": "2021-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Mon" + }, + { + "date": "2021-12-08 00:00:00", + "start": "2021-12-07T23:00:00.000Z", + "end": "2021-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Wed" + }, + { + "date": "2021-12-25 00:00:00", + "start": "2021-12-24T23:00:00.000Z", + "end": "2021-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Sat" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-VC-2022.json b/test/fixtures/ES-VC-2022.json new file mode 100644 index 000000000..516bc6945 --- /dev/null +++ b/test/fixtures/ES-VC-2022.json @@ -0,0 +1,166 @@ +[ + { + "date": "2022-01-01 00:00:00", + "start": "2021-12-31T23:00:00.000Z", + "end": "2022-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Sat" + }, + { + "date": "2022-01-06 00:00:00", + "start": "2022-01-05T23:00:00.000Z", + "end": "2022-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Thu" + }, + { + "date": "2022-03-19 00:00:00", + "start": "2022-03-18T23:00:00.000Z", + "end": "2022-03-19T23:00:00.000Z", + "name": "San José", + "type": "public", + "rule": "03-19", + "_weekday": "Sat" + }, + { + "date": "2022-04-14 00:00:00", + "start": "2022-04-13T22:00:00.000Z", + "end": "2022-04-14T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2022-04-15 00:00:00", + "start": "2022-04-14T22:00:00.000Z", + "end": "2022-04-15T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2022-04-17 00:00:00", + "start": "2022-04-16T22:00:00.000Z", + "end": "2022-04-17T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2022-04-18 00:00:00", + "start": "2022-04-17T22:00:00.000Z", + "end": "2022-04-18T22:00:00.000Z", + "name": "Lunes de Pascua", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2022-05-01 00:00:00", + "start": "2022-04-30T22:00:00.000Z", + "end": "2022-05-01T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2022-05-01 00:00:00", + "start": "2022-04-30T22:00:00.000Z", + "end": "2022-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Sun" + }, + { + "date": "2022-06-05 00:00:00", + "start": "2022-06-04T22:00:00.000Z", + "end": "2022-06-05T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2022-07-25 00:00:00", + "start": "2022-07-24T22:00:00.000Z", + "end": "2022-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Mon" + }, + { + "date": "2022-08-15 00:00:00", + "start": "2022-08-14T22:00:00.000Z", + "end": "2022-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Mon" + }, + { + "date": "2022-10-12 00:00:00", + "start": "2022-10-11T22:00:00.000Z", + "end": "2022-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Wed" + }, + { + "date": "2022-11-01 00:00:00", + "start": "2022-10-31T23:00:00.000Z", + "end": "2022-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Tue" + }, + { + "date": "2022-12-06 00:00:00", + "start": "2022-12-05T23:00:00.000Z", + "end": "2022-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Tue" + }, + { + "date": "2022-12-08 00:00:00", + "start": "2022-12-07T23:00:00.000Z", + "end": "2022-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Thu" + }, + { + "date": "2022-12-25 00:00:00", + "start": "2022-12-24T23:00:00.000Z", + "end": "2022-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Sun" + }, + { + "date": "2022-12-26 00:00:00", + "start": "2022-12-25T23:00:00.000Z", + "end": "2022-12-26T23:00:00.000Z", + "name": "Navidad (día sustituto)", + "type": "public", + "substitute": true, + "rule": "substitutes 12-25 if sunday then next monday", + "_weekday": "Mon" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-VC-2023.json b/test/fixtures/ES-VC-2023.json new file mode 100644 index 000000000..f31de4f14 --- /dev/null +++ b/test/fixtures/ES-VC-2023.json @@ -0,0 +1,166 @@ +[ + { + "date": "2023-01-01 00:00:00", + "start": "2022-12-31T23:00:00.000Z", + "end": "2023-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Sun" + }, + { + "date": "2023-01-02 00:00:00", + "start": "2023-01-01T23:00:00.000Z", + "end": "2023-01-02T23:00:00.000Z", + "name": "Año Nuevo (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 01-01 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2023-01-06 00:00:00", + "start": "2023-01-05T23:00:00.000Z", + "end": "2023-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Fri" + }, + { + "date": "2023-03-19 00:00:00", + "start": "2023-03-18T23:00:00.000Z", + "end": "2023-03-19T23:00:00.000Z", + "name": "San José", + "type": "public", + "rule": "03-19", + "_weekday": "Sun" + }, + { + "date": "2023-04-06 00:00:00", + "start": "2023-04-05T22:00:00.000Z", + "end": "2023-04-06T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2023-04-07 00:00:00", + "start": "2023-04-06T22:00:00.000Z", + "end": "2023-04-07T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2023-04-09 00:00:00", + "start": "2023-04-08T22:00:00.000Z", + "end": "2023-04-09T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2023-04-10 00:00:00", + "start": "2023-04-09T22:00:00.000Z", + "end": "2023-04-10T22:00:00.000Z", + "name": "Lunes de Pascua", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2023-05-01 00:00:00", + "start": "2023-04-30T22:00:00.000Z", + "end": "2023-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Mon" + }, + { + "date": "2023-05-07 00:00:00", + "start": "2023-05-06T22:00:00.000Z", + "end": "2023-05-07T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2023-05-28 00:00:00", + "start": "2023-05-27T22:00:00.000Z", + "end": "2023-05-28T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2023-07-25 00:00:00", + "start": "2023-07-24T22:00:00.000Z", + "end": "2023-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Tue" + }, + { + "date": "2023-08-15 00:00:00", + "start": "2023-08-14T22:00:00.000Z", + "end": "2023-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Tue" + }, + { + "date": "2023-10-12 00:00:00", + "start": "2023-10-11T22:00:00.000Z", + "end": "2023-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Thu" + }, + { + "date": "2023-11-01 00:00:00", + "start": "2023-10-31T23:00:00.000Z", + "end": "2023-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Wed" + }, + { + "date": "2023-12-06 00:00:00", + "start": "2023-12-05T23:00:00.000Z", + "end": "2023-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Wed" + }, + { + "date": "2023-12-08 00:00:00", + "start": "2023-12-07T23:00:00.000Z", + "end": "2023-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Fri" + }, + { + "date": "2023-12-25 00:00:00", + "start": "2023-12-24T23:00:00.000Z", + "end": "2023-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Mon" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-VC-2024.json b/test/fixtures/ES-VC-2024.json new file mode 100644 index 000000000..6af49978d --- /dev/null +++ b/test/fixtures/ES-VC-2024.json @@ -0,0 +1,166 @@ +[ + { + "date": "2024-01-01 00:00:00", + "start": "2023-12-31T23:00:00.000Z", + "end": "2024-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Mon" + }, + { + "date": "2024-01-06 00:00:00", + "start": "2024-01-05T23:00:00.000Z", + "end": "2024-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Sat" + }, + { + "date": "2024-03-19 00:00:00", + "start": "2024-03-18T23:00:00.000Z", + "end": "2024-03-19T23:00:00.000Z", + "name": "San José", + "type": "public", + "rule": "03-19", + "_weekday": "Tue" + }, + { + "date": "2024-03-28 00:00:00", + "start": "2024-03-27T23:00:00.000Z", + "end": "2024-03-28T23:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2024-03-29 00:00:00", + "start": "2024-03-28T23:00:00.000Z", + "end": "2024-03-29T23:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2024-03-31 00:00:00", + "start": "2024-03-30T23:00:00.000Z", + "end": "2024-03-31T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2024-04-01 00:00:00", + "start": "2024-03-31T22:00:00.000Z", + "end": "2024-04-01T22:00:00.000Z", + "name": "Lunes de Pascua", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2024-05-01 00:00:00", + "start": "2024-04-30T22:00:00.000Z", + "end": "2024-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Wed" + }, + { + "date": "2024-05-05 00:00:00", + "start": "2024-05-04T22:00:00.000Z", + "end": "2024-05-05T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2024-05-19 00:00:00", + "start": "2024-05-18T22:00:00.000Z", + "end": "2024-05-19T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2024-07-25 00:00:00", + "start": "2024-07-24T22:00:00.000Z", + "end": "2024-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Thu" + }, + { + "date": "2024-08-15 00:00:00", + "start": "2024-08-14T22:00:00.000Z", + "end": "2024-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Thu" + }, + { + "date": "2024-10-12 00:00:00", + "start": "2024-10-11T22:00:00.000Z", + "end": "2024-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Sat" + }, + { + "date": "2024-11-01 00:00:00", + "start": "2024-10-31T23:00:00.000Z", + "end": "2024-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Fri" + }, + { + "date": "2024-12-06 00:00:00", + "start": "2024-12-05T23:00:00.000Z", + "end": "2024-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Fri" + }, + { + "date": "2024-12-08 00:00:00", + "start": "2024-12-07T23:00:00.000Z", + "end": "2024-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Sun" + }, + { + "date": "2024-12-09 00:00:00", + "start": "2024-12-08T23:00:00.000Z", + "end": "2024-12-09T23:00:00.000Z", + "name": "La inmaculada concepción (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 12-08 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2024-12-25 00:00:00", + "start": "2024-12-24T23:00:00.000Z", + "end": "2024-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Wed" + } +] \ No newline at end of file diff --git a/test/fixtures/ES-VC-2025.json b/test/fixtures/ES-VC-2025.json new file mode 100644 index 000000000..29019e5d3 --- /dev/null +++ b/test/fixtures/ES-VC-2025.json @@ -0,0 +1,166 @@ +[ + { + "date": "2025-01-01 00:00:00", + "start": "2024-12-31T23:00:00.000Z", + "end": "2025-01-01T23:00:00.000Z", + "name": "Año Nuevo", + "type": "public", + "rule": "01-01", + "_weekday": "Wed" + }, + { + "date": "2025-01-06 00:00:00", + "start": "2025-01-05T23:00:00.000Z", + "end": "2025-01-06T23:00:00.000Z", + "name": "Día de los Reyes Magos", + "type": "public", + "rule": "01-06", + "_weekday": "Mon" + }, + { + "date": "2025-03-19 00:00:00", + "start": "2025-03-18T23:00:00.000Z", + "end": "2025-03-19T23:00:00.000Z", + "name": "San José", + "type": "public", + "rule": "03-19", + "_weekday": "Wed" + }, + { + "date": "2025-04-17 00:00:00", + "start": "2025-04-16T22:00:00.000Z", + "end": "2025-04-17T22:00:00.000Z", + "name": "Jueves Santo", + "type": "public", + "rule": "easter -3", + "_weekday": "Thu" + }, + { + "date": "2025-04-18 00:00:00", + "start": "2025-04-17T22:00:00.000Z", + "end": "2025-04-18T22:00:00.000Z", + "name": "Viernes Santo", + "type": "public", + "rule": "easter -2", + "_weekday": "Fri" + }, + { + "date": "2025-04-20 00:00:00", + "start": "2025-04-19T22:00:00.000Z", + "end": "2025-04-20T22:00:00.000Z", + "name": "Pascua", + "type": "observance", + "rule": "easter", + "_weekday": "Sun" + }, + { + "date": "2025-04-21 00:00:00", + "start": "2025-04-20T22:00:00.000Z", + "end": "2025-04-21T22:00:00.000Z", + "name": "Lunes de Pascua", + "type": "public", + "rule": "easter 1", + "_weekday": "Mon" + }, + { + "date": "2025-05-01 00:00:00", + "start": "2025-04-30T22:00:00.000Z", + "end": "2025-05-01T22:00:00.000Z", + "name": "Día del trabajador", + "type": "public", + "rule": "05-01", + "_weekday": "Thu" + }, + { + "date": "2025-05-04 00:00:00", + "start": "2025-05-03T22:00:00.000Z", + "end": "2025-05-04T22:00:00.000Z", + "name": "Día de la Madre", + "type": "observance", + "rule": "1st sunday in May", + "_weekday": "Sun" + }, + { + "date": "2025-06-08 00:00:00", + "start": "2025-06-07T22:00:00.000Z", + "end": "2025-06-08T22:00:00.000Z", + "name": "Pentecostés", + "type": "observance", + "rule": "easter 49", + "_weekday": "Sun" + }, + { + "date": "2025-07-25 00:00:00", + "start": "2025-07-24T22:00:00.000Z", + "end": "2025-07-25T22:00:00.000Z", + "name": "Santiago Apostol", + "type": "observance", + "note": "regional", + "rule": "07-25", + "_weekday": "Fri" + }, + { + "date": "2025-08-15 00:00:00", + "start": "2025-08-14T22:00:00.000Z", + "end": "2025-08-15T22:00:00.000Z", + "name": "Asunción", + "type": "public", + "rule": "08-15", + "_weekday": "Fri" + }, + { + "date": "2025-10-12 00:00:00", + "start": "2025-10-11T22:00:00.000Z", + "end": "2025-10-12T22:00:00.000Z", + "name": "Fiesta Nacional de España", + "type": "public", + "rule": "10-12", + "_weekday": "Sun" + }, + { + "date": "2025-10-13 00:00:00", + "start": "2025-10-12T22:00:00.000Z", + "end": "2025-10-13T22:00:00.000Z", + "name": "Fiesta Nacional de España (día sustituto)", + "type": "observance", + "substitute": true, + "rule": "substitutes 10-12 if sunday then next monday", + "_weekday": "Mon" + }, + { + "date": "2025-11-01 00:00:00", + "start": "2025-10-31T23:00:00.000Z", + "end": "2025-11-01T23:00:00.000Z", + "name": "Todos los Santos", + "type": "public", + "rule": "11-01", + "_weekday": "Sat" + }, + { + "date": "2025-12-06 00:00:00", + "start": "2025-12-05T23:00:00.000Z", + "end": "2025-12-06T23:00:00.000Z", + "name": "Día de la Constitución Española", + "type": "public", + "rule": "12-06", + "_weekday": "Sat" + }, + { + "date": "2025-12-08 00:00:00", + "start": "2025-12-07T23:00:00.000Z", + "end": "2025-12-08T23:00:00.000Z", + "name": "La inmaculada concepción", + "type": "public", + "rule": "12-08", + "_weekday": "Mon" + }, + { + "date": "2025-12-25 00:00:00", + "start": "2025-12-24T23:00:00.000Z", + "end": "2025-12-25T23:00:00.000Z", + "name": "Navidad", + "type": "public", + "rule": "12-25", + "_weekday": "Thu" + } +] \ No newline at end of file diff --git a/test/fixtures/IC-2015.json b/test/fixtures/IC-2015.json index 161e507ec..66017dd90 100644 --- a/test/fixtures/IC-2015.json +++ b/test/fixtures/IC-2015.json @@ -31,7 +31,7 @@ "start": "2015-04-01T23:00:00.000Z", "end": "2015-04-02T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/IC-2016.json b/test/fixtures/IC-2016.json index 03c987db5..2eba2d1da 100644 --- a/test/fixtures/IC-2016.json +++ b/test/fixtures/IC-2016.json @@ -31,7 +31,7 @@ "start": "2016-03-24T00:00:00.000Z", "end": "2016-03-25T00:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, @@ -71,16 +71,6 @@ "rule": "05-01", "_weekday": "Sun" }, - { - "date": "2016-05-02 00:00:00", - "start": "2016-05-01T23:00:00.000Z", - "end": "2016-05-02T23:00:00.000Z", - "name": "Día del trabajador (día sustituto)", - "type": "observance", - "substitute": true, - "rule": "substitutes 05-01 if sunday then next monday", - "_weekday": "Mon" - }, { "date": "2016-05-15 00:00:00", "start": "2016-05-14T23:00:00.000Z", @@ -168,7 +158,7 @@ "start": "2016-12-26T00:00:00.000Z", "end": "2016-12-27T00:00:00.000Z", "name": "Navidad (día sustituto)", - "type": "observance", + "type": "public", "substitute": true, "rule": "substitutes 12-25 if sunday then next monday", "_weekday": "Mon" diff --git a/test/fixtures/IC-2017.json b/test/fixtures/IC-2017.json index 2d434cebf..5ea6980be 100644 --- a/test/fixtures/IC-2017.json +++ b/test/fixtures/IC-2017.json @@ -41,7 +41,7 @@ "start": "2017-04-12T23:00:00.000Z", "end": "2017-04-13T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/IC-2018.json b/test/fixtures/IC-2018.json index 3710e826c..640eca52f 100644 --- a/test/fixtures/IC-2018.json +++ b/test/fixtures/IC-2018.json @@ -31,7 +31,7 @@ "start": "2018-03-28T23:00:00.000Z", "end": "2018-03-29T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/IC-2019.json b/test/fixtures/IC-2019.json index dc5d5510f..46fb1ad00 100644 --- a/test/fixtures/IC-2019.json +++ b/test/fixtures/IC-2019.json @@ -41,7 +41,7 @@ "start": "2019-04-17T23:00:00.000Z", "end": "2019-04-18T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/IC-2020.json b/test/fixtures/IC-2020.json index b4d225432..b504f1b60 100644 --- a/test/fixtures/IC-2020.json +++ b/test/fixtures/IC-2020.json @@ -31,7 +31,7 @@ "start": "2020-04-08T23:00:00.000Z", "end": "2020-04-09T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/IC-2021.json b/test/fixtures/IC-2021.json index 3e9fc422c..c4d555296 100644 --- a/test/fixtures/IC-2021.json +++ b/test/fixtures/IC-2021.json @@ -31,7 +31,7 @@ "start": "2021-03-31T23:00:00.000Z", "end": "2021-04-01T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, @@ -89,6 +89,16 @@ "rule": "05-30", "_weekday": "Sun" }, + { + "date": "2021-05-31 00:00:00", + "start": "2021-05-30T23:00:00.000Z", + "end": "2021-05-31T23:00:00.000Z", + "name": "Día de Canarias (día sustituto)", + "type": "public", + "substitute": true, + "rule": "substitutes 05-30 if Sunday then next Monday", + "_weekday": "Mon" + }, { "date": "2021-07-25 00:00:00", "start": "2021-07-24T23:00:00.000Z", @@ -113,9 +123,9 @@ "start": "2021-08-15T23:00:00.000Z", "end": "2021-08-16T23:00:00.000Z", "name": "Asunción (día sustituto)", - "type": "observance", + "type": "public", "substitute": true, - "rule": "substitutes 08-15 if sunday then next monday", + "rule": "substitutes 08-15 if Sunday then next Monday", "_weekday": "Mon" }, { diff --git a/test/fixtures/IC-2022.json b/test/fixtures/IC-2022.json index 9a05fa422..4e1b40ae2 100644 --- a/test/fixtures/IC-2022.json +++ b/test/fixtures/IC-2022.json @@ -31,7 +31,7 @@ "start": "2022-04-13T23:00:00.000Z", "end": "2022-04-14T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, @@ -71,16 +71,6 @@ "rule": "05-01", "_weekday": "Sun" }, - { - "date": "2022-05-02 00:00:00", - "start": "2022-05-01T23:00:00.000Z", - "end": "2022-05-02T23:00:00.000Z", - "name": "Día del trabajador (día sustituto)", - "type": "observance", - "substitute": true, - "rule": "substitutes 05-01 if sunday then next monday", - "_weekday": "Mon" - }, { "date": "2022-05-30 00:00:00", "start": "2022-05-29T23:00:00.000Z", @@ -168,7 +158,7 @@ "start": "2022-12-26T00:00:00.000Z", "end": "2022-12-27T00:00:00.000Z", "name": "Navidad (día sustituto)", - "type": "observance", + "type": "public", "substitute": true, "rule": "substitutes 12-25 if sunday then next monday", "_weekday": "Mon" diff --git a/test/fixtures/IC-2023.json b/test/fixtures/IC-2023.json index d0a69c30c..9b0382fc1 100644 --- a/test/fixtures/IC-2023.json +++ b/test/fixtures/IC-2023.json @@ -41,7 +41,7 @@ "start": "2023-04-05T23:00:00.000Z", "end": "2023-04-06T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/IC-2024.json b/test/fixtures/IC-2024.json index 28124963d..4c369b36c 100644 --- a/test/fixtures/IC-2024.json +++ b/test/fixtures/IC-2024.json @@ -31,7 +31,7 @@ "start": "2024-03-28T00:00:00.000Z", "end": "2024-03-29T00:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/IC-2025.json b/test/fixtures/IC-2025.json index 9f4f54d68..e4aa5eb90 100644 --- a/test/fixtures/IC-2025.json +++ b/test/fixtures/IC-2025.json @@ -31,7 +31,7 @@ "start": "2025-04-16T23:00:00.000Z", "end": "2025-04-17T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/IC-EH-2015.json b/test/fixtures/IC-EH-2015.json index 1396b0a04..89a429e1a 100644 --- a/test/fixtures/IC-EH-2015.json +++ b/test/fixtures/IC-EH-2015.json @@ -31,7 +31,7 @@ "start": "2015-04-01T23:00:00.000Z", "end": "2015-04-02T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/IC-EH-2016.json b/test/fixtures/IC-EH-2016.json index dea5f7f7b..e25f80be9 100644 --- a/test/fixtures/IC-EH-2016.json +++ b/test/fixtures/IC-EH-2016.json @@ -31,7 +31,7 @@ "start": "2016-03-24T00:00:00.000Z", "end": "2016-03-25T00:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, @@ -71,16 +71,6 @@ "rule": "05-01", "_weekday": "Sun" }, - { - "date": "2016-05-02 00:00:00", - "start": "2016-05-01T23:00:00.000Z", - "end": "2016-05-02T23:00:00.000Z", - "name": "Día del trabajador (día sustituto)", - "type": "observance", - "substitute": true, - "rule": "substitutes 05-01 if sunday then next monday", - "_weekday": "Mon" - }, { "date": "2016-05-15 00:00:00", "start": "2016-05-14T23:00:00.000Z", @@ -177,7 +167,7 @@ "start": "2016-12-26T00:00:00.000Z", "end": "2016-12-27T00:00:00.000Z", "name": "Navidad (día sustituto)", - "type": "observance", + "type": "public", "substitute": true, "rule": "substitutes 12-25 if sunday then next monday", "_weekday": "Mon" diff --git a/test/fixtures/IC-EH-2017.json b/test/fixtures/IC-EH-2017.json index 99405e15a..9ca9baad9 100644 --- a/test/fixtures/IC-EH-2017.json +++ b/test/fixtures/IC-EH-2017.json @@ -41,7 +41,7 @@ "start": "2017-04-12T23:00:00.000Z", "end": "2017-04-13T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/IC-EH-2018.json b/test/fixtures/IC-EH-2018.json index 4bc4cb1db..8fdadee5d 100644 --- a/test/fixtures/IC-EH-2018.json +++ b/test/fixtures/IC-EH-2018.json @@ -31,7 +31,7 @@ "start": "2018-03-28T23:00:00.000Z", "end": "2018-03-29T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/IC-EH-2019.json b/test/fixtures/IC-EH-2019.json index 290901c73..e8b3c128c 100644 --- a/test/fixtures/IC-EH-2019.json +++ b/test/fixtures/IC-EH-2019.json @@ -41,7 +41,7 @@ "start": "2019-04-17T23:00:00.000Z", "end": "2019-04-18T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/IC-EH-2020.json b/test/fixtures/IC-EH-2020.json index 7b75f2b13..d6b894a8c 100644 --- a/test/fixtures/IC-EH-2020.json +++ b/test/fixtures/IC-EH-2020.json @@ -31,7 +31,7 @@ "start": "2020-04-08T23:00:00.000Z", "end": "2020-04-09T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/IC-EH-2021.json b/test/fixtures/IC-EH-2021.json index 0db0b9955..5559bfbaa 100644 --- a/test/fixtures/IC-EH-2021.json +++ b/test/fixtures/IC-EH-2021.json @@ -31,7 +31,7 @@ "start": "2021-03-31T23:00:00.000Z", "end": "2021-04-01T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, @@ -89,6 +89,16 @@ "rule": "05-30", "_weekday": "Sun" }, + { + "date": "2021-05-31 00:00:00", + "start": "2021-05-30T23:00:00.000Z", + "end": "2021-05-31T23:00:00.000Z", + "name": "Día de Canarias (día sustituto)", + "type": "public", + "substitute": true, + "rule": "substitutes 05-30 if Sunday then next Monday", + "_weekday": "Mon" + }, { "date": "2021-07-25 00:00:00", "start": "2021-07-24T23:00:00.000Z", @@ -113,9 +123,9 @@ "start": "2021-08-15T23:00:00.000Z", "end": "2021-08-16T23:00:00.000Z", "name": "Asunción (día sustituto)", - "type": "observance", + "type": "public", "substitute": true, - "rule": "substitutes 08-15 if sunday then next monday", + "rule": "substitutes 08-15 if Sunday then next Monday", "_weekday": "Mon" }, { diff --git a/test/fixtures/IC-EH-2022.json b/test/fixtures/IC-EH-2022.json index 278d2c0d3..119f361e4 100644 --- a/test/fixtures/IC-EH-2022.json +++ b/test/fixtures/IC-EH-2022.json @@ -31,7 +31,7 @@ "start": "2022-04-13T23:00:00.000Z", "end": "2022-04-14T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, @@ -71,16 +71,6 @@ "rule": "05-01", "_weekday": "Sun" }, - { - "date": "2022-05-02 00:00:00", - "start": "2022-05-01T23:00:00.000Z", - "end": "2022-05-02T23:00:00.000Z", - "name": "Día del trabajador (día sustituto)", - "type": "observance", - "substitute": true, - "rule": "substitutes 05-01 if sunday then next monday", - "_weekday": "Mon" - }, { "date": "2022-05-30 00:00:00", "start": "2022-05-29T23:00:00.000Z", @@ -177,7 +167,7 @@ "start": "2022-12-26T00:00:00.000Z", "end": "2022-12-27T00:00:00.000Z", "name": "Navidad (día sustituto)", - "type": "observance", + "type": "public", "substitute": true, "rule": "substitutes 12-25 if sunday then next monday", "_weekday": "Mon" diff --git a/test/fixtures/IC-EH-2023.json b/test/fixtures/IC-EH-2023.json index 8575a435b..5edba7d4b 100644 --- a/test/fixtures/IC-EH-2023.json +++ b/test/fixtures/IC-EH-2023.json @@ -41,7 +41,7 @@ "start": "2023-04-05T23:00:00.000Z", "end": "2023-04-06T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/IC-EH-2024.json b/test/fixtures/IC-EH-2024.json index 4bfbfdc20..e3ada1462 100644 --- a/test/fixtures/IC-EH-2024.json +++ b/test/fixtures/IC-EH-2024.json @@ -31,7 +31,7 @@ "start": "2024-03-28T00:00:00.000Z", "end": "2024-03-29T00:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/IC-EH-2025.json b/test/fixtures/IC-EH-2025.json index 1f399bee7..79402e73e 100644 --- a/test/fixtures/IC-EH-2025.json +++ b/test/fixtures/IC-EH-2025.json @@ -31,7 +31,7 @@ "start": "2025-04-16T23:00:00.000Z", "end": "2025-04-17T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/IC-FU-2015.json b/test/fixtures/IC-FU-2015.json index 3bad5670d..e7871c96e 100644 --- a/test/fixtures/IC-FU-2015.json +++ b/test/fixtures/IC-FU-2015.json @@ -31,7 +31,7 @@ "start": "2015-04-01T23:00:00.000Z", "end": "2015-04-02T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/IC-FU-2016.json b/test/fixtures/IC-FU-2016.json index 771cdfbc0..24c84c57d 100644 --- a/test/fixtures/IC-FU-2016.json +++ b/test/fixtures/IC-FU-2016.json @@ -31,7 +31,7 @@ "start": "2016-03-24T00:00:00.000Z", "end": "2016-03-25T00:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, @@ -71,16 +71,6 @@ "rule": "05-01", "_weekday": "Sun" }, - { - "date": "2016-05-02 00:00:00", - "start": "2016-05-01T23:00:00.000Z", - "end": "2016-05-02T23:00:00.000Z", - "name": "Día del trabajador (día sustituto)", - "type": "observance", - "substitute": true, - "rule": "substitutes 05-01 if sunday then next monday", - "_weekday": "Mon" - }, { "date": "2016-05-15 00:00:00", "start": "2016-05-14T23:00:00.000Z", @@ -177,7 +167,7 @@ "start": "2016-12-26T00:00:00.000Z", "end": "2016-12-27T00:00:00.000Z", "name": "Navidad (día sustituto)", - "type": "observance", + "type": "public", "substitute": true, "rule": "substitutes 12-25 if sunday then next monday", "_weekday": "Mon" diff --git a/test/fixtures/IC-FU-2017.json b/test/fixtures/IC-FU-2017.json index 5f24e4e5f..b2fe260a5 100644 --- a/test/fixtures/IC-FU-2017.json +++ b/test/fixtures/IC-FU-2017.json @@ -41,7 +41,7 @@ "start": "2017-04-12T23:00:00.000Z", "end": "2017-04-13T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/IC-FU-2018.json b/test/fixtures/IC-FU-2018.json index 17f387a32..dcf30b558 100644 --- a/test/fixtures/IC-FU-2018.json +++ b/test/fixtures/IC-FU-2018.json @@ -31,7 +31,7 @@ "start": "2018-03-28T23:00:00.000Z", "end": "2018-03-29T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/IC-FU-2019.json b/test/fixtures/IC-FU-2019.json index 833a430aa..d4e3f72b8 100644 --- a/test/fixtures/IC-FU-2019.json +++ b/test/fixtures/IC-FU-2019.json @@ -41,7 +41,7 @@ "start": "2019-04-17T23:00:00.000Z", "end": "2019-04-18T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/IC-FU-2020.json b/test/fixtures/IC-FU-2020.json index aa826e4a3..f462689fc 100644 --- a/test/fixtures/IC-FU-2020.json +++ b/test/fixtures/IC-FU-2020.json @@ -31,7 +31,7 @@ "start": "2020-04-08T23:00:00.000Z", "end": "2020-04-09T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/IC-FU-2021.json b/test/fixtures/IC-FU-2021.json index 9379bb1cf..1dec6fc96 100644 --- a/test/fixtures/IC-FU-2021.json +++ b/test/fixtures/IC-FU-2021.json @@ -31,7 +31,7 @@ "start": "2021-03-31T23:00:00.000Z", "end": "2021-04-01T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, @@ -89,6 +89,16 @@ "rule": "05-30", "_weekday": "Sun" }, + { + "date": "2021-05-31 00:00:00", + "start": "2021-05-30T23:00:00.000Z", + "end": "2021-05-31T23:00:00.000Z", + "name": "Día de Canarias (día sustituto)", + "type": "public", + "substitute": true, + "rule": "substitutes 05-30 if Sunday then next Monday", + "_weekday": "Mon" + }, { "date": "2021-07-25 00:00:00", "start": "2021-07-24T23:00:00.000Z", @@ -113,9 +123,9 @@ "start": "2021-08-15T23:00:00.000Z", "end": "2021-08-16T23:00:00.000Z", "name": "Asunción (día sustituto)", - "type": "observance", + "type": "public", "substitute": true, - "rule": "substitutes 08-15 if sunday then next monday", + "rule": "substitutes 08-15 if Sunday then next Monday", "_weekday": "Mon" }, { diff --git a/test/fixtures/IC-FU-2022.json b/test/fixtures/IC-FU-2022.json index 6c60ba5ea..b412b5eab 100644 --- a/test/fixtures/IC-FU-2022.json +++ b/test/fixtures/IC-FU-2022.json @@ -31,7 +31,7 @@ "start": "2022-04-13T23:00:00.000Z", "end": "2022-04-14T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, @@ -71,16 +71,6 @@ "rule": "05-01", "_weekday": "Sun" }, - { - "date": "2022-05-02 00:00:00", - "start": "2022-05-01T23:00:00.000Z", - "end": "2022-05-02T23:00:00.000Z", - "name": "Día del trabajador (día sustituto)", - "type": "observance", - "substitute": true, - "rule": "substitutes 05-01 if sunday then next monday", - "_weekday": "Mon" - }, { "date": "2022-05-30 00:00:00", "start": "2022-05-29T23:00:00.000Z", @@ -177,7 +167,7 @@ "start": "2022-12-26T00:00:00.000Z", "end": "2022-12-27T00:00:00.000Z", "name": "Navidad (día sustituto)", - "type": "observance", + "type": "public", "substitute": true, "rule": "substitutes 12-25 if sunday then next monday", "_weekday": "Mon" diff --git a/test/fixtures/IC-FU-2023.json b/test/fixtures/IC-FU-2023.json index f655c706d..d97fb0808 100644 --- a/test/fixtures/IC-FU-2023.json +++ b/test/fixtures/IC-FU-2023.json @@ -41,7 +41,7 @@ "start": "2023-04-05T23:00:00.000Z", "end": "2023-04-06T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/IC-FU-2024.json b/test/fixtures/IC-FU-2024.json index d218429cf..e728bed75 100644 --- a/test/fixtures/IC-FU-2024.json +++ b/test/fixtures/IC-FU-2024.json @@ -31,7 +31,7 @@ "start": "2024-03-28T00:00:00.000Z", "end": "2024-03-29T00:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/IC-FU-2025.json b/test/fixtures/IC-FU-2025.json index dd2213b98..ea91ab0c7 100644 --- a/test/fixtures/IC-FU-2025.json +++ b/test/fixtures/IC-FU-2025.json @@ -31,7 +31,7 @@ "start": "2025-04-16T23:00:00.000Z", "end": "2025-04-17T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/IC-GC-2015.json b/test/fixtures/IC-GC-2015.json index 69dc806f2..d0ffe3f0d 100644 --- a/test/fixtures/IC-GC-2015.json +++ b/test/fixtures/IC-GC-2015.json @@ -31,7 +31,7 @@ "start": "2015-04-01T23:00:00.000Z", "end": "2015-04-02T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/IC-GC-2016.json b/test/fixtures/IC-GC-2016.json index 915d3e3c6..289eb1edd 100644 --- a/test/fixtures/IC-GC-2016.json +++ b/test/fixtures/IC-GC-2016.json @@ -31,7 +31,7 @@ "start": "2016-03-24T00:00:00.000Z", "end": "2016-03-25T00:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, @@ -71,16 +71,6 @@ "rule": "05-01", "_weekday": "Sun" }, - { - "date": "2016-05-02 00:00:00", - "start": "2016-05-01T23:00:00.000Z", - "end": "2016-05-02T23:00:00.000Z", - "name": "Día del trabajador (día sustituto)", - "type": "observance", - "substitute": true, - "rule": "substitutes 05-01 if sunday then next monday", - "_weekday": "Mon" - }, { "date": "2016-05-15 00:00:00", "start": "2016-05-14T23:00:00.000Z", @@ -177,7 +167,7 @@ "start": "2016-12-26T00:00:00.000Z", "end": "2016-12-27T00:00:00.000Z", "name": "Navidad (día sustituto)", - "type": "observance", + "type": "public", "substitute": true, "rule": "substitutes 12-25 if sunday then next monday", "_weekday": "Mon" diff --git a/test/fixtures/IC-GC-2017.json b/test/fixtures/IC-GC-2017.json index 6bd662a95..041444dfe 100644 --- a/test/fixtures/IC-GC-2017.json +++ b/test/fixtures/IC-GC-2017.json @@ -41,7 +41,7 @@ "start": "2017-04-12T23:00:00.000Z", "end": "2017-04-13T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/IC-GC-2018.json b/test/fixtures/IC-GC-2018.json index b678cb127..10cc0637d 100644 --- a/test/fixtures/IC-GC-2018.json +++ b/test/fixtures/IC-GC-2018.json @@ -31,7 +31,7 @@ "start": "2018-03-28T23:00:00.000Z", "end": "2018-03-29T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/IC-GC-2019.json b/test/fixtures/IC-GC-2019.json index 29df2f9e3..160a27e70 100644 --- a/test/fixtures/IC-GC-2019.json +++ b/test/fixtures/IC-GC-2019.json @@ -41,7 +41,7 @@ "start": "2019-04-17T23:00:00.000Z", "end": "2019-04-18T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/IC-GC-2020.json b/test/fixtures/IC-GC-2020.json index eca809366..df882ecba 100644 --- a/test/fixtures/IC-GC-2020.json +++ b/test/fixtures/IC-GC-2020.json @@ -31,7 +31,7 @@ "start": "2020-04-08T23:00:00.000Z", "end": "2020-04-09T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/IC-GC-2021.json b/test/fixtures/IC-GC-2021.json index 30cc322bb..07004db41 100644 --- a/test/fixtures/IC-GC-2021.json +++ b/test/fixtures/IC-GC-2021.json @@ -31,7 +31,7 @@ "start": "2021-03-31T23:00:00.000Z", "end": "2021-04-01T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, @@ -89,6 +89,16 @@ "rule": "05-30", "_weekday": "Sun" }, + { + "date": "2021-05-31 00:00:00", + "start": "2021-05-30T23:00:00.000Z", + "end": "2021-05-31T23:00:00.000Z", + "name": "Día de Canarias (día sustituto)", + "type": "public", + "substitute": true, + "rule": "substitutes 05-30 if Sunday then next Monday", + "_weekday": "Mon" + }, { "date": "2021-07-25 00:00:00", "start": "2021-07-24T23:00:00.000Z", @@ -113,9 +123,9 @@ "start": "2021-08-15T23:00:00.000Z", "end": "2021-08-16T23:00:00.000Z", "name": "Asunción (día sustituto)", - "type": "observance", + "type": "public", "substitute": true, - "rule": "substitutes 08-15 if sunday then next monday", + "rule": "substitutes 08-15 if Sunday then next Monday", "_weekday": "Mon" }, { diff --git a/test/fixtures/IC-GC-2022.json b/test/fixtures/IC-GC-2022.json index 611449214..a0a384982 100644 --- a/test/fixtures/IC-GC-2022.json +++ b/test/fixtures/IC-GC-2022.json @@ -31,7 +31,7 @@ "start": "2022-04-13T23:00:00.000Z", "end": "2022-04-14T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, @@ -71,16 +71,6 @@ "rule": "05-01", "_weekday": "Sun" }, - { - "date": "2022-05-02 00:00:00", - "start": "2022-05-01T23:00:00.000Z", - "end": "2022-05-02T23:00:00.000Z", - "name": "Día del trabajador (día sustituto)", - "type": "observance", - "substitute": true, - "rule": "substitutes 05-01 if sunday then next monday", - "_weekday": "Mon" - }, { "date": "2022-05-30 00:00:00", "start": "2022-05-29T23:00:00.000Z", @@ -177,7 +167,7 @@ "start": "2022-12-26T00:00:00.000Z", "end": "2022-12-27T00:00:00.000Z", "name": "Navidad (día sustituto)", - "type": "observance", + "type": "public", "substitute": true, "rule": "substitutes 12-25 if sunday then next monday", "_weekday": "Mon" diff --git a/test/fixtures/IC-GC-2023.json b/test/fixtures/IC-GC-2023.json index 7fd0f0e13..57a52247b 100644 --- a/test/fixtures/IC-GC-2023.json +++ b/test/fixtures/IC-GC-2023.json @@ -41,7 +41,7 @@ "start": "2023-04-05T23:00:00.000Z", "end": "2023-04-06T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/IC-GC-2024.json b/test/fixtures/IC-GC-2024.json index 78a9b7729..1028b4801 100644 --- a/test/fixtures/IC-GC-2024.json +++ b/test/fixtures/IC-GC-2024.json @@ -31,7 +31,7 @@ "start": "2024-03-28T00:00:00.000Z", "end": "2024-03-29T00:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/IC-GC-2025.json b/test/fixtures/IC-GC-2025.json index 1dfdcf210..229839ea5 100644 --- a/test/fixtures/IC-GC-2025.json +++ b/test/fixtures/IC-GC-2025.json @@ -31,7 +31,7 @@ "start": "2025-04-16T23:00:00.000Z", "end": "2025-04-17T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/IC-LA-2015.json b/test/fixtures/IC-LA-2015.json index f35853b76..4be65cc22 100644 --- a/test/fixtures/IC-LA-2015.json +++ b/test/fixtures/IC-LA-2015.json @@ -31,7 +31,7 @@ "start": "2015-04-01T23:00:00.000Z", "end": "2015-04-02T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/IC-LA-2016.json b/test/fixtures/IC-LA-2016.json index 6a9941e3f..a085d8a71 100644 --- a/test/fixtures/IC-LA-2016.json +++ b/test/fixtures/IC-LA-2016.json @@ -31,7 +31,7 @@ "start": "2016-03-24T00:00:00.000Z", "end": "2016-03-25T00:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, @@ -71,16 +71,6 @@ "rule": "05-01", "_weekday": "Sun" }, - { - "date": "2016-05-02 00:00:00", - "start": "2016-05-01T23:00:00.000Z", - "end": "2016-05-02T23:00:00.000Z", - "name": "Día del trabajador (día sustituto)", - "type": "observance", - "substitute": true, - "rule": "substitutes 05-01 if sunday then next monday", - "_weekday": "Mon" - }, { "date": "2016-05-15 00:00:00", "start": "2016-05-14T23:00:00.000Z", @@ -177,7 +167,7 @@ "start": "2016-12-26T00:00:00.000Z", "end": "2016-12-27T00:00:00.000Z", "name": "Navidad (día sustituto)", - "type": "observance", + "type": "public", "substitute": true, "rule": "substitutes 12-25 if sunday then next monday", "_weekday": "Mon" diff --git a/test/fixtures/IC-LA-2017.json b/test/fixtures/IC-LA-2017.json index 4e5639c9a..e7bb9601c 100644 --- a/test/fixtures/IC-LA-2017.json +++ b/test/fixtures/IC-LA-2017.json @@ -41,7 +41,7 @@ "start": "2017-04-12T23:00:00.000Z", "end": "2017-04-13T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/IC-LA-2018.json b/test/fixtures/IC-LA-2018.json index 81ef64a03..121fe0a57 100644 --- a/test/fixtures/IC-LA-2018.json +++ b/test/fixtures/IC-LA-2018.json @@ -31,7 +31,7 @@ "start": "2018-03-28T23:00:00.000Z", "end": "2018-03-29T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/IC-LA-2019.json b/test/fixtures/IC-LA-2019.json index d73deacb5..043b4e91c 100644 --- a/test/fixtures/IC-LA-2019.json +++ b/test/fixtures/IC-LA-2019.json @@ -41,7 +41,7 @@ "start": "2019-04-17T23:00:00.000Z", "end": "2019-04-18T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/IC-LA-2020.json b/test/fixtures/IC-LA-2020.json index 1ae44ce18..0ccc60691 100644 --- a/test/fixtures/IC-LA-2020.json +++ b/test/fixtures/IC-LA-2020.json @@ -31,7 +31,7 @@ "start": "2020-04-08T23:00:00.000Z", "end": "2020-04-09T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/IC-LA-2021.json b/test/fixtures/IC-LA-2021.json index 5b45f2d5c..00a5ec1ce 100644 --- a/test/fixtures/IC-LA-2021.json +++ b/test/fixtures/IC-LA-2021.json @@ -31,7 +31,7 @@ "start": "2021-03-31T23:00:00.000Z", "end": "2021-04-01T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, @@ -89,6 +89,16 @@ "rule": "05-30", "_weekday": "Sun" }, + { + "date": "2021-05-31 00:00:00", + "start": "2021-05-30T23:00:00.000Z", + "end": "2021-05-31T23:00:00.000Z", + "name": "Día de Canarias (día sustituto)", + "type": "public", + "substitute": true, + "rule": "substitutes 05-30 if Sunday then next Monday", + "_weekday": "Mon" + }, { "date": "2021-07-25 00:00:00", "start": "2021-07-24T23:00:00.000Z", @@ -113,9 +123,9 @@ "start": "2021-08-15T23:00:00.000Z", "end": "2021-08-16T23:00:00.000Z", "name": "Asunción (día sustituto)", - "type": "observance", + "type": "public", "substitute": true, - "rule": "substitutes 08-15 if sunday then next monday", + "rule": "substitutes 08-15 if Sunday then next Monday", "_weekday": "Mon" }, { diff --git a/test/fixtures/IC-LA-2022.json b/test/fixtures/IC-LA-2022.json index ed2a65829..a692f9d0e 100644 --- a/test/fixtures/IC-LA-2022.json +++ b/test/fixtures/IC-LA-2022.json @@ -31,7 +31,7 @@ "start": "2022-04-13T23:00:00.000Z", "end": "2022-04-14T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, @@ -71,16 +71,6 @@ "rule": "05-01", "_weekday": "Sun" }, - { - "date": "2022-05-02 00:00:00", - "start": "2022-05-01T23:00:00.000Z", - "end": "2022-05-02T23:00:00.000Z", - "name": "Día del trabajador (día sustituto)", - "type": "observance", - "substitute": true, - "rule": "substitutes 05-01 if sunday then next monday", - "_weekday": "Mon" - }, { "date": "2022-05-30 00:00:00", "start": "2022-05-29T23:00:00.000Z", @@ -177,7 +167,7 @@ "start": "2022-12-26T00:00:00.000Z", "end": "2022-12-27T00:00:00.000Z", "name": "Navidad (día sustituto)", - "type": "observance", + "type": "public", "substitute": true, "rule": "substitutes 12-25 if sunday then next monday", "_weekday": "Mon" diff --git a/test/fixtures/IC-LA-2023.json b/test/fixtures/IC-LA-2023.json index 09de5d04a..99077cbe5 100644 --- a/test/fixtures/IC-LA-2023.json +++ b/test/fixtures/IC-LA-2023.json @@ -41,7 +41,7 @@ "start": "2023-04-05T23:00:00.000Z", "end": "2023-04-06T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/IC-LA-2024.json b/test/fixtures/IC-LA-2024.json index 79d858c56..cb94a4e51 100644 --- a/test/fixtures/IC-LA-2024.json +++ b/test/fixtures/IC-LA-2024.json @@ -31,7 +31,7 @@ "start": "2024-03-28T00:00:00.000Z", "end": "2024-03-29T00:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/IC-LA-2025.json b/test/fixtures/IC-LA-2025.json index 608de7fdc..bbd32017c 100644 --- a/test/fixtures/IC-LA-2025.json +++ b/test/fixtures/IC-LA-2025.json @@ -31,7 +31,7 @@ "start": "2025-04-16T23:00:00.000Z", "end": "2025-04-17T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/IC-LG-2015.json b/test/fixtures/IC-LG-2015.json index 9179a6382..21a0dcbb4 100644 --- a/test/fixtures/IC-LG-2015.json +++ b/test/fixtures/IC-LG-2015.json @@ -31,7 +31,7 @@ "start": "2015-04-01T23:00:00.000Z", "end": "2015-04-02T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/IC-LG-2016.json b/test/fixtures/IC-LG-2016.json index 5a296af97..0baa91a0f 100644 --- a/test/fixtures/IC-LG-2016.json +++ b/test/fixtures/IC-LG-2016.json @@ -31,7 +31,7 @@ "start": "2016-03-24T00:00:00.000Z", "end": "2016-03-25T00:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, @@ -71,16 +71,6 @@ "rule": "05-01", "_weekday": "Sun" }, - { - "date": "2016-05-02 00:00:00", - "start": "2016-05-01T23:00:00.000Z", - "end": "2016-05-02T23:00:00.000Z", - "name": "Día del trabajador (día sustituto)", - "type": "observance", - "substitute": true, - "rule": "substitutes 05-01 if sunday then next monday", - "_weekday": "Mon" - }, { "date": "2016-05-15 00:00:00", "start": "2016-05-14T23:00:00.000Z", @@ -177,7 +167,7 @@ "start": "2016-12-26T00:00:00.000Z", "end": "2016-12-27T00:00:00.000Z", "name": "Navidad (día sustituto)", - "type": "observance", + "type": "public", "substitute": true, "rule": "substitutes 12-25 if sunday then next monday", "_weekday": "Mon" diff --git a/test/fixtures/IC-LG-2017.json b/test/fixtures/IC-LG-2017.json index 6a6d8b827..5f8eeba20 100644 --- a/test/fixtures/IC-LG-2017.json +++ b/test/fixtures/IC-LG-2017.json @@ -41,7 +41,7 @@ "start": "2017-04-12T23:00:00.000Z", "end": "2017-04-13T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/IC-LG-2018.json b/test/fixtures/IC-LG-2018.json index 0ea2e62d1..68ba1311c 100644 --- a/test/fixtures/IC-LG-2018.json +++ b/test/fixtures/IC-LG-2018.json @@ -31,7 +31,7 @@ "start": "2018-03-28T23:00:00.000Z", "end": "2018-03-29T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/IC-LG-2019.json b/test/fixtures/IC-LG-2019.json index 1a7501c2b..8d1f42f38 100644 --- a/test/fixtures/IC-LG-2019.json +++ b/test/fixtures/IC-LG-2019.json @@ -41,7 +41,7 @@ "start": "2019-04-17T23:00:00.000Z", "end": "2019-04-18T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/IC-LG-2020.json b/test/fixtures/IC-LG-2020.json index 046072fe7..7b50699fa 100644 --- a/test/fixtures/IC-LG-2020.json +++ b/test/fixtures/IC-LG-2020.json @@ -31,7 +31,7 @@ "start": "2020-04-08T23:00:00.000Z", "end": "2020-04-09T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/IC-LG-2021.json b/test/fixtures/IC-LG-2021.json index f290c1f1b..889fe6ec9 100644 --- a/test/fixtures/IC-LG-2021.json +++ b/test/fixtures/IC-LG-2021.json @@ -31,7 +31,7 @@ "start": "2021-03-31T23:00:00.000Z", "end": "2021-04-01T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, @@ -89,6 +89,16 @@ "rule": "05-30", "_weekday": "Sun" }, + { + "date": "2021-05-31 00:00:00", + "start": "2021-05-30T23:00:00.000Z", + "end": "2021-05-31T23:00:00.000Z", + "name": "Día de Canarias (día sustituto)", + "type": "public", + "substitute": true, + "rule": "substitutes 05-30 if Sunday then next Monday", + "_weekday": "Mon" + }, { "date": "2021-07-25 00:00:00", "start": "2021-07-24T23:00:00.000Z", @@ -113,9 +123,9 @@ "start": "2021-08-15T23:00:00.000Z", "end": "2021-08-16T23:00:00.000Z", "name": "Asunción (día sustituto)", - "type": "observance", + "type": "public", "substitute": true, - "rule": "substitutes 08-15 if sunday then next monday", + "rule": "substitutes 08-15 if Sunday then next Monday", "_weekday": "Mon" }, { diff --git a/test/fixtures/IC-LG-2022.json b/test/fixtures/IC-LG-2022.json index 145589d6c..270e5e056 100644 --- a/test/fixtures/IC-LG-2022.json +++ b/test/fixtures/IC-LG-2022.json @@ -31,7 +31,7 @@ "start": "2022-04-13T23:00:00.000Z", "end": "2022-04-14T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, @@ -71,16 +71,6 @@ "rule": "05-01", "_weekday": "Sun" }, - { - "date": "2022-05-02 00:00:00", - "start": "2022-05-01T23:00:00.000Z", - "end": "2022-05-02T23:00:00.000Z", - "name": "Día del trabajador (día sustituto)", - "type": "observance", - "substitute": true, - "rule": "substitutes 05-01 if sunday then next monday", - "_weekday": "Mon" - }, { "date": "2022-05-30 00:00:00", "start": "2022-05-29T23:00:00.000Z", @@ -177,7 +167,7 @@ "start": "2022-12-26T00:00:00.000Z", "end": "2022-12-27T00:00:00.000Z", "name": "Navidad (día sustituto)", - "type": "observance", + "type": "public", "substitute": true, "rule": "substitutes 12-25 if sunday then next monday", "_weekday": "Mon" diff --git a/test/fixtures/IC-LG-2023.json b/test/fixtures/IC-LG-2023.json index 741391ea0..f94aa88fb 100644 --- a/test/fixtures/IC-LG-2023.json +++ b/test/fixtures/IC-LG-2023.json @@ -41,7 +41,7 @@ "start": "2023-04-05T23:00:00.000Z", "end": "2023-04-06T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/IC-LG-2024.json b/test/fixtures/IC-LG-2024.json index a07681b9a..90702d26e 100644 --- a/test/fixtures/IC-LG-2024.json +++ b/test/fixtures/IC-LG-2024.json @@ -31,7 +31,7 @@ "start": "2024-03-28T00:00:00.000Z", "end": "2024-03-29T00:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/IC-LG-2025.json b/test/fixtures/IC-LG-2025.json index 7fe7f1b3d..b3bfdbf26 100644 --- a/test/fixtures/IC-LG-2025.json +++ b/test/fixtures/IC-LG-2025.json @@ -31,7 +31,7 @@ "start": "2025-04-16T23:00:00.000Z", "end": "2025-04-17T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/IC-LP-2015.json b/test/fixtures/IC-LP-2015.json index 0fed076e0..219167dc5 100644 --- a/test/fixtures/IC-LP-2015.json +++ b/test/fixtures/IC-LP-2015.json @@ -31,7 +31,7 @@ "start": "2015-04-01T23:00:00.000Z", "end": "2015-04-02T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/IC-LP-2016.json b/test/fixtures/IC-LP-2016.json index 06b3363c0..d55b60e03 100644 --- a/test/fixtures/IC-LP-2016.json +++ b/test/fixtures/IC-LP-2016.json @@ -31,7 +31,7 @@ "start": "2016-03-24T00:00:00.000Z", "end": "2016-03-25T00:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, @@ -71,16 +71,6 @@ "rule": "05-01", "_weekday": "Sun" }, - { - "date": "2016-05-02 00:00:00", - "start": "2016-05-01T23:00:00.000Z", - "end": "2016-05-02T23:00:00.000Z", - "name": "Día del trabajador (día sustituto)", - "type": "observance", - "substitute": true, - "rule": "substitutes 05-01 if sunday then next monday", - "_weekday": "Mon" - }, { "date": "2016-05-15 00:00:00", "start": "2016-05-14T23:00:00.000Z", @@ -177,7 +167,7 @@ "start": "2016-12-26T00:00:00.000Z", "end": "2016-12-27T00:00:00.000Z", "name": "Navidad (día sustituto)", - "type": "observance", + "type": "public", "substitute": true, "rule": "substitutes 12-25 if sunday then next monday", "_weekday": "Mon" diff --git a/test/fixtures/IC-LP-2017.json b/test/fixtures/IC-LP-2017.json index 20e27986e..b2eb15600 100644 --- a/test/fixtures/IC-LP-2017.json +++ b/test/fixtures/IC-LP-2017.json @@ -41,7 +41,7 @@ "start": "2017-04-12T23:00:00.000Z", "end": "2017-04-13T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/IC-LP-2018.json b/test/fixtures/IC-LP-2018.json index 8b1d8e162..730f5e84d 100644 --- a/test/fixtures/IC-LP-2018.json +++ b/test/fixtures/IC-LP-2018.json @@ -31,7 +31,7 @@ "start": "2018-03-28T23:00:00.000Z", "end": "2018-03-29T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/IC-LP-2019.json b/test/fixtures/IC-LP-2019.json index 2258d583e..80118d624 100644 --- a/test/fixtures/IC-LP-2019.json +++ b/test/fixtures/IC-LP-2019.json @@ -41,7 +41,7 @@ "start": "2019-04-17T23:00:00.000Z", "end": "2019-04-18T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/IC-LP-2020.json b/test/fixtures/IC-LP-2020.json index 8ae6e881f..716b45679 100644 --- a/test/fixtures/IC-LP-2020.json +++ b/test/fixtures/IC-LP-2020.json @@ -31,7 +31,7 @@ "start": "2020-04-08T23:00:00.000Z", "end": "2020-04-09T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/IC-LP-2021.json b/test/fixtures/IC-LP-2021.json index 9f6a07146..0dd1a01a2 100644 --- a/test/fixtures/IC-LP-2021.json +++ b/test/fixtures/IC-LP-2021.json @@ -31,7 +31,7 @@ "start": "2021-03-31T23:00:00.000Z", "end": "2021-04-01T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, @@ -89,6 +89,16 @@ "rule": "05-30", "_weekday": "Sun" }, + { + "date": "2021-05-31 00:00:00", + "start": "2021-05-30T23:00:00.000Z", + "end": "2021-05-31T23:00:00.000Z", + "name": "Día de Canarias (día sustituto)", + "type": "public", + "substitute": true, + "rule": "substitutes 05-30 if Sunday then next Monday", + "_weekday": "Mon" + }, { "date": "2021-07-25 00:00:00", "start": "2021-07-24T23:00:00.000Z", @@ -122,9 +132,9 @@ "start": "2021-08-15T23:00:00.000Z", "end": "2021-08-16T23:00:00.000Z", "name": "Asunción (día sustituto)", - "type": "observance", + "type": "public", "substitute": true, - "rule": "substitutes 08-15 if sunday then next monday", + "rule": "substitutes 08-15 if Sunday then next Monday", "_weekday": "Mon" }, { diff --git a/test/fixtures/IC-LP-2022.json b/test/fixtures/IC-LP-2022.json index cd083f2e9..b4e78359e 100644 --- a/test/fixtures/IC-LP-2022.json +++ b/test/fixtures/IC-LP-2022.json @@ -31,7 +31,7 @@ "start": "2022-04-13T23:00:00.000Z", "end": "2022-04-14T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, @@ -71,16 +71,6 @@ "rule": "05-01", "_weekday": "Sun" }, - { - "date": "2022-05-02 00:00:00", - "start": "2022-05-01T23:00:00.000Z", - "end": "2022-05-02T23:00:00.000Z", - "name": "Día del trabajador (día sustituto)", - "type": "observance", - "substitute": true, - "rule": "substitutes 05-01 if sunday then next monday", - "_weekday": "Mon" - }, { "date": "2022-05-30 00:00:00", "start": "2022-05-29T23:00:00.000Z", @@ -177,7 +167,7 @@ "start": "2022-12-26T00:00:00.000Z", "end": "2022-12-27T00:00:00.000Z", "name": "Navidad (día sustituto)", - "type": "observance", + "type": "public", "substitute": true, "rule": "substitutes 12-25 if sunday then next monday", "_weekday": "Mon" diff --git a/test/fixtures/IC-LP-2023.json b/test/fixtures/IC-LP-2023.json index 6791c193b..122397fbf 100644 --- a/test/fixtures/IC-LP-2023.json +++ b/test/fixtures/IC-LP-2023.json @@ -41,7 +41,7 @@ "start": "2023-04-05T23:00:00.000Z", "end": "2023-04-06T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/IC-LP-2024.json b/test/fixtures/IC-LP-2024.json index 431c59c52..d48255d42 100644 --- a/test/fixtures/IC-LP-2024.json +++ b/test/fixtures/IC-LP-2024.json @@ -31,7 +31,7 @@ "start": "2024-03-28T00:00:00.000Z", "end": "2024-03-29T00:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/IC-LP-2025.json b/test/fixtures/IC-LP-2025.json index d91383512..e7880e0d4 100644 --- a/test/fixtures/IC-LP-2025.json +++ b/test/fixtures/IC-LP-2025.json @@ -31,7 +31,7 @@ "start": "2025-04-16T23:00:00.000Z", "end": "2025-04-17T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/IC-TE-2015.json b/test/fixtures/IC-TE-2015.json index 441cdcec9..a249bdeeb 100644 --- a/test/fixtures/IC-TE-2015.json +++ b/test/fixtures/IC-TE-2015.json @@ -31,7 +31,7 @@ "start": "2015-04-01T23:00:00.000Z", "end": "2015-04-02T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/IC-TE-2016.json b/test/fixtures/IC-TE-2016.json index 19d203bda..3a94763fe 100644 --- a/test/fixtures/IC-TE-2016.json +++ b/test/fixtures/IC-TE-2016.json @@ -31,7 +31,7 @@ "start": "2016-03-24T00:00:00.000Z", "end": "2016-03-25T00:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, @@ -71,16 +71,6 @@ "rule": "05-01", "_weekday": "Sun" }, - { - "date": "2016-05-02 00:00:00", - "start": "2016-05-01T23:00:00.000Z", - "end": "2016-05-02T23:00:00.000Z", - "name": "Día del trabajador (día sustituto)", - "type": "observance", - "substitute": true, - "rule": "substitutes 05-01 if sunday then next monday", - "_weekday": "Mon" - }, { "date": "2016-05-15 00:00:00", "start": "2016-05-14T23:00:00.000Z", @@ -177,7 +167,7 @@ "start": "2016-12-26T00:00:00.000Z", "end": "2016-12-27T00:00:00.000Z", "name": "Navidad (día sustituto)", - "type": "observance", + "type": "public", "substitute": true, "rule": "substitutes 12-25 if sunday then next monday", "_weekday": "Mon" diff --git a/test/fixtures/IC-TE-2017.json b/test/fixtures/IC-TE-2017.json index 2ca84ed56..74e20b5fb 100644 --- a/test/fixtures/IC-TE-2017.json +++ b/test/fixtures/IC-TE-2017.json @@ -41,7 +41,7 @@ "start": "2017-04-12T23:00:00.000Z", "end": "2017-04-13T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/IC-TE-2018.json b/test/fixtures/IC-TE-2018.json index 22616f2ce..1bef7a598 100644 --- a/test/fixtures/IC-TE-2018.json +++ b/test/fixtures/IC-TE-2018.json @@ -31,7 +31,7 @@ "start": "2018-03-28T23:00:00.000Z", "end": "2018-03-29T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/IC-TE-2019.json b/test/fixtures/IC-TE-2019.json index 9af10f921..8c695cf53 100644 --- a/test/fixtures/IC-TE-2019.json +++ b/test/fixtures/IC-TE-2019.json @@ -41,7 +41,7 @@ "start": "2019-04-17T23:00:00.000Z", "end": "2019-04-18T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/IC-TE-2020.json b/test/fixtures/IC-TE-2020.json index 441ce16e5..a86f4ab66 100644 --- a/test/fixtures/IC-TE-2020.json +++ b/test/fixtures/IC-TE-2020.json @@ -31,7 +31,7 @@ "start": "2020-04-08T23:00:00.000Z", "end": "2020-04-09T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/IC-TE-2021.json b/test/fixtures/IC-TE-2021.json index 7cd36e2dd..4a5c1d6d7 100644 --- a/test/fixtures/IC-TE-2021.json +++ b/test/fixtures/IC-TE-2021.json @@ -31,7 +31,7 @@ "start": "2021-03-31T23:00:00.000Z", "end": "2021-04-01T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, @@ -89,6 +89,16 @@ "rule": "05-30", "_weekday": "Sun" }, + { + "date": "2021-05-31 00:00:00", + "start": "2021-05-30T23:00:00.000Z", + "end": "2021-05-31T23:00:00.000Z", + "name": "Día de Canarias (día sustituto)", + "type": "public", + "substitute": true, + "rule": "substitutes 05-30 if Sunday then next Monday", + "_weekday": "Mon" + }, { "date": "2021-07-25 00:00:00", "start": "2021-07-24T23:00:00.000Z", @@ -113,9 +123,9 @@ "start": "2021-08-15T23:00:00.000Z", "end": "2021-08-16T23:00:00.000Z", "name": "Asunción (día sustituto)", - "type": "observance", + "type": "public", "substitute": true, - "rule": "substitutes 08-15 if sunday then next monday", + "rule": "substitutes 08-15 if Sunday then next Monday", "_weekday": "Mon" }, { diff --git a/test/fixtures/IC-TE-2022.json b/test/fixtures/IC-TE-2022.json index 76ac35552..73626c609 100644 --- a/test/fixtures/IC-TE-2022.json +++ b/test/fixtures/IC-TE-2022.json @@ -31,7 +31,7 @@ "start": "2022-04-13T23:00:00.000Z", "end": "2022-04-14T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, @@ -71,16 +71,6 @@ "rule": "05-01", "_weekday": "Sun" }, - { - "date": "2022-05-02 00:00:00", - "start": "2022-05-01T23:00:00.000Z", - "end": "2022-05-02T23:00:00.000Z", - "name": "Día del trabajador (día sustituto)", - "type": "observance", - "substitute": true, - "rule": "substitutes 05-01 if sunday then next monday", - "_weekday": "Mon" - }, { "date": "2022-05-30 00:00:00", "start": "2022-05-29T23:00:00.000Z", @@ -177,7 +167,7 @@ "start": "2022-12-26T00:00:00.000Z", "end": "2022-12-27T00:00:00.000Z", "name": "Navidad (día sustituto)", - "type": "observance", + "type": "public", "substitute": true, "rule": "substitutes 12-25 if sunday then next monday", "_weekday": "Mon" diff --git a/test/fixtures/IC-TE-2023.json b/test/fixtures/IC-TE-2023.json index 85e05cd4e..3a5c7173a 100644 --- a/test/fixtures/IC-TE-2023.json +++ b/test/fixtures/IC-TE-2023.json @@ -41,7 +41,7 @@ "start": "2023-04-05T23:00:00.000Z", "end": "2023-04-06T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/IC-TE-2024.json b/test/fixtures/IC-TE-2024.json index 36aebab31..81cf36aef 100644 --- a/test/fixtures/IC-TE-2024.json +++ b/test/fixtures/IC-TE-2024.json @@ -31,7 +31,7 @@ "start": "2024-03-28T00:00:00.000Z", "end": "2024-03-29T00:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" }, diff --git a/test/fixtures/IC-TE-2025.json b/test/fixtures/IC-TE-2025.json index c4e874f14..7df60f38b 100644 --- a/test/fixtures/IC-TE-2025.json +++ b/test/fixtures/IC-TE-2025.json @@ -31,7 +31,7 @@ "start": "2025-04-16T23:00:00.000Z", "end": "2025-04-17T23:00:00.000Z", "name": "Jueves Santo", - "type": "observance", + "type": "public", "rule": "easter -3", "_weekday": "Thu" },