From 24991a5b2240061f47e78f9bbcdb52494ca7b976 Mon Sep 17 00:00:00 2001 From: Cyril Mouttet Date: Mon, 8 Jul 2024 14:35:21 +0200 Subject: [PATCH 1/6] touched lu files --- v2/lu/lu_holidays.go | 63 +++++++++++++++++++ v2/lu/lu_holidays_test.go | 123 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 186 insertions(+) create mode 100644 v2/lu/lu_holidays.go create mode 100644 v2/lu/lu_holidays_test.go diff --git a/v2/lu/lu_holidays.go b/v2/lu/lu_holidays.go new file mode 100644 index 0000000..9cb03e1 --- /dev/null +++ b/v2/lu/lu_holidays.go @@ -0,0 +1,63 @@ +// (c) Rick Arnold. Licensed under the BSD license (see LICENSE). + +// Package be provides holiday definitions for Belgium. +package be + +import ( + "time" + + "github.com/rickar/cal/v2" + "github.com/rickar/cal/v2/aa" +) + +var ( + // Nieuwjaar represents New Year's Day on 1-Jan + Nieuwjaar = aa.NewYear.Clone(&cal.Holiday{Name: "Nieuwjaarsdag", Type: cal.ObservancePublic}) + + // Paasmaandag represents Easter Monday on the day after Easter + Paasmaandag = aa.EasterMonday.Clone(&cal.Holiday{Name: "Paasmaandag", Type: cal.ObservancePublic}) + + // DagVanDeArbeid represents Labor Day on the first Monday in May + DagVanDeArbeid = aa.WorkersDay.Clone(&cal.Holiday{Name: "Dag van de Arbeid", Type: cal.ObservancePublic}) + + // OnzeLieveHeerHemelvaart represents Ascension Day on the 39th day after Easter + OnzeLieveHeerHemelvaart = aa.AscensionDay.Clone(&cal.Holiday{Name: "Onze Lieve Heer Hemelvaart", Type: cal.ObservancePublic}) + + // Pinkstermaandag represents Pentecost Monday on the day after Pentecost (50 days after Easter) + Pinkstermaandag = aa.PentecostMonday.Clone(&cal.Holiday{Name: "Pinkstermaandag", Type: cal.ObservancePublic}) + + // NationaleFeestdag represents Belgian National Day on 21-Jul + NationaleFeestdag = &cal.Holiday{ + Name: "Nationale Feestdag", + Type: cal.ObservancePublic, + Month: time.July, + Day: 21, + Func: cal.CalcDayOfMonth, + } + + // OnzeLieveVrouwHemelvaart represents Assumption of Mary on 15-Aug + OnzeLieveVrouwHemelvaart = aa.AssumptionOfMary.Clone(&cal.Holiday{Name: "Onze Lieve Vrouw Hemelvaart", Type: cal.ObservancePublic}) + + // Allerheiligen represents All Saints' Day on 1-Nov + Allerheiligen = aa.AllSaintsDay.Clone(&cal.Holiday{Name: "Allerheiligen", Type: cal.ObservancePublic}) + + // Wapenstilstand represents Armistice Day on 11-Nov + Wapenstilstand = aa.ArmisticeDay.Clone(&cal.Holiday{Name: "Wapenstilstand", Type: cal.ObservancePublic}) + + // Kerstmis represents Christmas Day on 25-Dec + Kerstmis = aa.ChristmasDay.Clone(&cal.Holiday{Name: "Kerstmis", Type: cal.ObservancePublic}) + + // Holidays provides a list of the standard national holidays + Holidays = []*cal.Holiday{ + Nieuwjaar, + Paasmaandag, + DagVanDeArbeid, + OnzeLieveHeerHemelvaart, + Pinkstermaandag, + NationaleFeestdag, + OnzeLieveVrouwHemelvaart, + Allerheiligen, + Wapenstilstand, + Kerstmis, + } +) diff --git a/v2/lu/lu_holidays_test.go b/v2/lu/lu_holidays_test.go new file mode 100644 index 0000000..552106d --- /dev/null +++ b/v2/lu/lu_holidays_test.go @@ -0,0 +1,123 @@ +// (c) Rick Arnold. Licensed under the BSD license (see LICENSE). + +package be + +import ( + "testing" + "time" + + "github.com/rickar/cal/v2" +) + +func d(y, m, d int) time.Time { + return time.Date(y, time.Month(m), d, 0, 0, 0, 0, cal.DefaultLoc) +} + +func TestHolidays(t *testing.T) { + tests := []struct { + h *cal.Holiday + y int + wantAct time.Time + wantObs time.Time + }{ + {Nieuwjaar, 2015, d(2015, 1, 1), d(2015, 1, 1)}, + {Nieuwjaar, 2016, d(2016, 1, 1), d(2016, 1, 1)}, + {Nieuwjaar, 2017, d(2017, 1, 1), d(2017, 1, 1)}, + {Nieuwjaar, 2018, d(2018, 1, 1), d(2018, 1, 1)}, + {Nieuwjaar, 2019, d(2019, 1, 1), d(2019, 1, 1)}, + {Nieuwjaar, 2020, d(2020, 1, 1), d(2020, 1, 1)}, + {Nieuwjaar, 2021, d(2021, 1, 1), d(2021, 1, 1)}, + {Nieuwjaar, 2022, d(2022, 1, 1), d(2022, 1, 1)}, + + {Paasmaandag, 2015, d(2015, 4, 6), d(2015, 4, 6)}, + {Paasmaandag, 2016, d(2016, 3, 28), d(2016, 3, 28)}, + {Paasmaandag, 2017, d(2017, 4, 17), d(2017, 4, 17)}, + {Paasmaandag, 2018, d(2018, 4, 2), d(2018, 4, 2)}, + {Paasmaandag, 2019, d(2019, 4, 22), d(2019, 4, 22)}, + {Paasmaandag, 2020, d(2020, 4, 13), d(2020, 4, 13)}, + {Paasmaandag, 2021, d(2021, 4, 5), d(2021, 4, 5)}, + {Paasmaandag, 2022, d(2022, 4, 18), d(2022, 4, 18)}, + + {DagVanDeArbeid, 2015, d(2015, 5, 1), d(2015, 5, 1)}, + {DagVanDeArbeid, 2016, d(2016, 5, 1), d(2016, 5, 1)}, + {DagVanDeArbeid, 2017, d(2017, 5, 1), d(2017, 5, 1)}, + {DagVanDeArbeid, 2018, d(2018, 5, 1), d(2018, 5, 1)}, + {DagVanDeArbeid, 2019, d(2019, 5, 1), d(2019, 5, 1)}, + {DagVanDeArbeid, 2020, d(2020, 5, 1), d(2020, 5, 1)}, + {DagVanDeArbeid, 2021, d(2021, 5, 1), d(2021, 5, 1)}, + {DagVanDeArbeid, 2022, d(2022, 5, 1), d(2022, 5, 1)}, + + {OnzeLieveHeerHemelvaart, 2015, d(2015, 5, 14), d(2015, 5, 14)}, + {OnzeLieveHeerHemelvaart, 2016, d(2016, 5, 5), d(2016, 5, 5)}, + {OnzeLieveHeerHemelvaart, 2017, d(2017, 5, 25), d(2017, 5, 25)}, + {OnzeLieveHeerHemelvaart, 2018, d(2018, 5, 10), d(2018, 5, 10)}, + {OnzeLieveHeerHemelvaart, 2019, d(2019, 5, 30), d(2019, 5, 30)}, + {OnzeLieveHeerHemelvaart, 2020, d(2020, 5, 21), d(2020, 5, 21)}, + {OnzeLieveHeerHemelvaart, 2021, d(2021, 5, 13), d(2021, 5, 13)}, + {OnzeLieveHeerHemelvaart, 2022, d(2022, 5, 26), d(2022, 5, 26)}, + + {Pinkstermaandag, 2015, d(2015, 5, 25), d(2015, 5, 25)}, + {Pinkstermaandag, 2016, d(2016, 5, 16), d(2016, 5, 16)}, + {Pinkstermaandag, 2017, d(2017, 6, 5), d(2017, 6, 5)}, + {Pinkstermaandag, 2018, d(2018, 5, 21), d(2018, 5, 21)}, + {Pinkstermaandag, 2019, d(2019, 6, 10), d(2019, 6, 10)}, + {Pinkstermaandag, 2020, d(2020, 6, 1), d(2020, 6, 1)}, + {Pinkstermaandag, 2021, d(2021, 5, 24), d(2021, 5, 24)}, + {Pinkstermaandag, 2022, d(2022, 6, 6), d(2022, 6, 6)}, + + {NationaleFeestdag, 2015, d(2015, 7, 21), d(2015, 7, 21)}, + {NationaleFeestdag, 2016, d(2016, 7, 21), d(2016, 7, 21)}, + {NationaleFeestdag, 2017, d(2017, 7, 21), d(2017, 7, 21)}, + {NationaleFeestdag, 2018, d(2018, 7, 21), d(2018, 7, 21)}, + {NationaleFeestdag, 2019, d(2019, 7, 21), d(2019, 7, 21)}, + {NationaleFeestdag, 2020, d(2020, 7, 21), d(2020, 7, 21)}, + {NationaleFeestdag, 2021, d(2021, 7, 21), d(2021, 7, 21)}, + {NationaleFeestdag, 2022, d(2022, 7, 21), d(2022, 7, 21)}, + + {OnzeLieveVrouwHemelvaart, 2015, d(2015, 8, 15), d(2015, 8, 15)}, + {OnzeLieveVrouwHemelvaart, 2016, d(2016, 8, 15), d(2016, 8, 15)}, + {OnzeLieveVrouwHemelvaart, 2017, d(2017, 8, 15), d(2017, 8, 15)}, + {OnzeLieveVrouwHemelvaart, 2018, d(2018, 8, 15), d(2018, 8, 15)}, + {OnzeLieveVrouwHemelvaart, 2019, d(2019, 8, 15), d(2019, 8, 15)}, + {OnzeLieveVrouwHemelvaart, 2020, d(2020, 8, 15), d(2020, 8, 15)}, + {OnzeLieveVrouwHemelvaart, 2021, d(2021, 8, 15), d(2021, 8, 15)}, + {OnzeLieveVrouwHemelvaart, 2022, d(2022, 8, 15), d(2022, 8, 15)}, + + {Allerheiligen, 2015, d(2015, 11, 1), d(2015, 11, 1)}, + {Allerheiligen, 2016, d(2016, 11, 1), d(2016, 11, 1)}, + {Allerheiligen, 2017, d(2017, 11, 1), d(2017, 11, 1)}, + {Allerheiligen, 2018, d(2018, 11, 1), d(2018, 11, 1)}, + {Allerheiligen, 2019, d(2019, 11, 1), d(2019, 11, 1)}, + {Allerheiligen, 2020, d(2020, 11, 1), d(2020, 11, 1)}, + {Allerheiligen, 2021, d(2021, 11, 1), d(2021, 11, 1)}, + {Allerheiligen, 2022, d(2022, 11, 1), d(2022, 11, 1)}, + + {Wapenstilstand, 2015, d(2015, 11, 11), d(2015, 11, 11)}, + {Wapenstilstand, 2016, d(2016, 11, 11), d(2016, 11, 11)}, + {Wapenstilstand, 2017, d(2017, 11, 11), d(2017, 11, 11)}, + {Wapenstilstand, 2018, d(2018, 11, 11), d(2018, 11, 11)}, + {Wapenstilstand, 2019, d(2019, 11, 11), d(2019, 11, 11)}, + {Wapenstilstand, 2020, d(2020, 11, 11), d(2020, 11, 11)}, + {Wapenstilstand, 2021, d(2021, 11, 11), d(2021, 11, 11)}, + {Wapenstilstand, 2022, d(2022, 11, 11), d(2022, 11, 11)}, + + {Kerstmis, 2015, d(2015, 12, 25), d(2015, 12, 25)}, + {Kerstmis, 2016, d(2016, 12, 25), d(2016, 12, 25)}, + {Kerstmis, 2017, d(2017, 12, 25), d(2017, 12, 25)}, + {Kerstmis, 2018, d(2018, 12, 25), d(2018, 12, 25)}, + {Kerstmis, 2019, d(2019, 12, 25), d(2019, 12, 25)}, + {Kerstmis, 2020, d(2020, 12, 25), d(2020, 12, 25)}, + {Kerstmis, 2021, d(2021, 12, 25), d(2021, 12, 25)}, + {Kerstmis, 2022, d(2022, 12, 25), d(2022, 12, 25)}, + } + + for _, test := range tests { + gotAct, gotObs := test.h.Calc(test.y) + if !gotAct.Equal(test.wantAct) { + t.Errorf("%s %d: got actual: %s, want: %s", test.h.Name, test.y, gotAct.String(), test.wantAct.String()) + } + if !gotObs.Equal(test.wantObs) { + t.Errorf("%s %d: got observed: %s, want: %s", test.h.Name, test.y, gotObs.String(), test.wantObs.String()) + } + } +} From b3b76d684ed80f1df95c8e4bcca37c42c3707db7 Mon Sep 17 00:00:00 2001 From: Cyril Mouttet Date: Mon, 8 Jul 2024 15:22:16 +0200 Subject: [PATCH 2/6] Integrating luxembourg holidays --- v2/lu/lu_holidays.go | 66 ++++++++++++++++++++++---------------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/v2/lu/lu_holidays.go b/v2/lu/lu_holidays.go index 9cb03e1..5fba6be 100644 --- a/v2/lu/lu_holidays.go +++ b/v2/lu/lu_holidays.go @@ -1,6 +1,6 @@ // (c) Rick Arnold. Licensed under the BSD license (see LICENSE). -// Package be provides holiday definitions for Belgium. +// Package be provides holiday definitions for Luxembourg. package be import ( @@ -11,53 +11,53 @@ import ( ) var ( - // Nieuwjaar represents New Year's Day on 1-Jan - Nieuwjaar = aa.NewYear.Clone(&cal.Holiday{Name: "Nieuwjaarsdag", Type: cal.ObservancePublic}) + // NeitJoer represents New Year's Day on 1-Jan + NeitJoer = aa.NewYear.Clone(&cal.Holiday{Name: "Neit Joer", Type: cal.ObservancePublic}) - // Paasmaandag represents Easter Monday on the day after Easter - Paasmaandag = aa.EasterMonday.Clone(&cal.Holiday{Name: "Paasmaandag", Type: cal.ObservancePublic}) + // Ouschterméindeg represents Easter Monday on the day after Easter + Ouschtermeindeg = aa.EasterMonday.Clone(&cal.Holiday{Name: "Ouschterméindeg", Type: cal.ObservancePublic}) - // DagVanDeArbeid represents Labor Day on the first Monday in May - DagVanDeArbeid = aa.WorkersDay.Clone(&cal.Holiday{Name: "Dag van de Arbeid", Type: cal.ObservancePublic}) + // DagVunAarbecht represents Labor Day on the first Monday in May + DagVunAarbecht = aa.WorkersDay.Clone(&cal.Holiday{Name: "Dag vun der Aarbecht", Type: cal.ObservancePublic}) - // OnzeLieveHeerHemelvaart represents Ascension Day on the 39th day after Easter - OnzeLieveHeerHemelvaart = aa.AscensionDay.Clone(&cal.Holiday{Name: "Onze Lieve Heer Hemelvaart", Type: cal.ObservancePublic}) + // ChristiHimmelfaart represents Ascension Day on the 39th day after Easter + ChristiHimmelfaart = aa.AscensionDay.Clone(&cal.Holiday{Name: "Christi Himmelfaart", Type: cal.ObservancePublic}) - // Pinkstermaandag represents Pentecost Monday on the day after Pentecost (50 days after Easter) - Pinkstermaandag = aa.PentecostMonday.Clone(&cal.Holiday{Name: "Pinkstermaandag", Type: cal.ObservancePublic}) + // Pengschtméindeg represents Pentecost Monday on the day after Pentecost (50 days after Easter) + Pengschtméindeg = aa.PentecostMonday.Clone(&cal.Holiday{Name: "Péngschtméindeg", Type: cal.ObservancePublic}) - // NationaleFeestdag represents Belgian National Day on 21-Jul - NationaleFeestdag = &cal.Holiday{ - Name: "Nationale Feestdag", + // Nationalfeierdag represents Luxembourg National Day on 23-Jul + Nationalfeierdag = &cal.Holiday{ + Name: "Nationalfeierdag", Type: cal.ObservancePublic, Month: time.July, - Day: 21, + Day: 23, Func: cal.CalcDayOfMonth, } - // OnzeLieveVrouwHemelvaart represents Assumption of Mary on 15-Aug - OnzeLieveVrouwHemelvaart = aa.AssumptionOfMary.Clone(&cal.Holiday{Name: "Onze Lieve Vrouw Hemelvaart", Type: cal.ObservancePublic}) + // MariesHimmelfaart represents Assumption of Mary on 15-Aug + MariesHimmelfaart = aa.AssumptionOfMary.Clone(&cal.Holiday{Name: "Maries Himmelfaart", Type: cal.ObservancePublic}) - // Allerheiligen represents All Saints' Day on 1-Nov - Allerheiligen = aa.AllSaintsDay.Clone(&cal.Holiday{Name: "Allerheiligen", Type: cal.ObservancePublic}) + // Allerhellgen represents All Saints' Day on 1-Nov + Allerhellgen = aa.AllSaintsDay.Clone(&cal.Holiday{Name: "Allerhellgen", Type: cal.ObservancePublic}) - // Wapenstilstand represents Armistice Day on 11-Nov - Wapenstilstand = aa.ArmisticeDay.Clone(&cal.Holiday{Name: "Wapenstilstand", Type: cal.ObservancePublic}) + // Chrëschtdag represents Christmas Day on 25-Dec + Chreschtdag = aa.ChristmasDay.Clone(&cal.Holiday{Name: "Chrëschtdag", Type: cal.ObservancePublic}) - // Kerstmis represents Christmas Day on 25-Dec - Kerstmis = aa.ChristmasDay.Clone(&cal.Holiday{Name: "Kerstmis", Type: cal.ObservancePublic}) + // ZweetenDagChrëschtdag represents second Christmas Day Day on 26-Dec + ZweetenDagChrëschtdag = aa.ChristmasDay2.Clone(&cal.Holiday{Name: "Zweeten Dag vum Chrëschtdag", Type: cal.ObservancePublic}) // Holidays provides a list of the standard national holidays Holidays = []*cal.Holiday{ - Nieuwjaar, - Paasmaandag, - DagVanDeArbeid, - OnzeLieveHeerHemelvaart, - Pinkstermaandag, - NationaleFeestdag, - OnzeLieveVrouwHemelvaart, - Allerheiligen, - Wapenstilstand, - Kerstmis, + NeitJoer, + Ouschtermeindeg, + DagVunAarbecht, + ChristiHimmelfaart, + Pengschtméindeg, + Nationalfeierdag, + MariesHimmelfaart, + Allerhellgen, + Chreschtdag, + ZweetenDagChrëschtdag, } ) From 3c811d8749b7f87a09133346ce575ef86534df16 Mon Sep 17 00:00:00 2001 From: Cyril Mouttet Date: Mon, 8 Jul 2024 15:48:17 +0200 Subject: [PATCH 3/6] Added Luxembourg tests --- v2/lu/lu_holidays_test.go | 160 +++++++++++++++++++------------------- 1 file changed, 80 insertions(+), 80 deletions(-) diff --git a/v2/lu/lu_holidays_test.go b/v2/lu/lu_holidays_test.go index 552106d..20260bb 100644 --- a/v2/lu/lu_holidays_test.go +++ b/v2/lu/lu_holidays_test.go @@ -20,95 +20,95 @@ func TestHolidays(t *testing.T) { wantAct time.Time wantObs time.Time }{ - {Nieuwjaar, 2015, d(2015, 1, 1), d(2015, 1, 1)}, - {Nieuwjaar, 2016, d(2016, 1, 1), d(2016, 1, 1)}, - {Nieuwjaar, 2017, d(2017, 1, 1), d(2017, 1, 1)}, - {Nieuwjaar, 2018, d(2018, 1, 1), d(2018, 1, 1)}, - {Nieuwjaar, 2019, d(2019, 1, 1), d(2019, 1, 1)}, - {Nieuwjaar, 2020, d(2020, 1, 1), d(2020, 1, 1)}, - {Nieuwjaar, 2021, d(2021, 1, 1), d(2021, 1, 1)}, - {Nieuwjaar, 2022, d(2022, 1, 1), d(2022, 1, 1)}, + {NeitJoer, 2015, d(2015, 1, 1), d(2015, 1, 1)}, + {NeitJoer, 2016, d(2016, 1, 1), d(2016, 1, 1)}, + {NeitJoer, 2017, d(2017, 1, 1), d(2017, 1, 1)}, + {NeitJoer, 2018, d(2018, 1, 1), d(2018, 1, 1)}, + {NeitJoer, 2019, d(2019, 1, 1), d(2019, 1, 1)}, + {NeitJoer, 2020, d(2020, 1, 1), d(2020, 1, 1)}, + {NeitJoer, 2021, d(2021, 1, 1), d(2021, 1, 1)}, + {NeitJoer, 2022, d(2022, 1, 1), d(2022, 1, 1)}, - {Paasmaandag, 2015, d(2015, 4, 6), d(2015, 4, 6)}, - {Paasmaandag, 2016, d(2016, 3, 28), d(2016, 3, 28)}, - {Paasmaandag, 2017, d(2017, 4, 17), d(2017, 4, 17)}, - {Paasmaandag, 2018, d(2018, 4, 2), d(2018, 4, 2)}, - {Paasmaandag, 2019, d(2019, 4, 22), d(2019, 4, 22)}, - {Paasmaandag, 2020, d(2020, 4, 13), d(2020, 4, 13)}, - {Paasmaandag, 2021, d(2021, 4, 5), d(2021, 4, 5)}, - {Paasmaandag, 2022, d(2022, 4, 18), d(2022, 4, 18)}, + {Ouschtermeindeg, 2015, d(2015, 4, 6), d(2015, 4, 6)}, + {Ouschtermeindeg, 2016, d(2016, 3, 28), d(2016, 3, 28)}, + {Ouschtermeindeg, 2017, d(2017, 4, 17), d(2017, 4, 17)}, + {Ouschtermeindeg, 2018, d(2018, 4, 2), d(2018, 4, 2)}, + {Ouschtermeindeg, 2019, d(2019, 4, 22), d(2019, 4, 22)}, + {Ouschtermeindeg, 2020, d(2020, 4, 13), d(2020, 4, 13)}, + {Ouschtermeindeg, 2021, d(2021, 4, 5), d(2021, 4, 5)}, + {Ouschtermeindeg, 2022, d(2022, 4, 18), d(2022, 4, 18)}, - {DagVanDeArbeid, 2015, d(2015, 5, 1), d(2015, 5, 1)}, - {DagVanDeArbeid, 2016, d(2016, 5, 1), d(2016, 5, 1)}, - {DagVanDeArbeid, 2017, d(2017, 5, 1), d(2017, 5, 1)}, - {DagVanDeArbeid, 2018, d(2018, 5, 1), d(2018, 5, 1)}, - {DagVanDeArbeid, 2019, d(2019, 5, 1), d(2019, 5, 1)}, - {DagVanDeArbeid, 2020, d(2020, 5, 1), d(2020, 5, 1)}, - {DagVanDeArbeid, 2021, d(2021, 5, 1), d(2021, 5, 1)}, - {DagVanDeArbeid, 2022, d(2022, 5, 1), d(2022, 5, 1)}, + {DagVunAarbecht, 2015, d(2015, 5, 1), d(2015, 5, 1)}, + {DagVunAarbecht, 2016, d(2016, 5, 1), d(2016, 5, 1)}, + {DagVunAarbecht, 2017, d(2017, 5, 1), d(2017, 5, 1)}, + {DagVunAarbecht, 2018, d(2018, 5, 1), d(2018, 5, 1)}, + {DagVunAarbecht, 2019, d(2019, 5, 1), d(2019, 5, 1)}, + {DagVunAarbecht, 2020, d(2020, 5, 1), d(2020, 5, 1)}, + {DagVunAarbecht, 2021, d(2021, 5, 1), d(2021, 5, 1)}, + {DagVunAarbecht, 2022, d(2022, 5, 1), d(2022, 5, 1)}, - {OnzeLieveHeerHemelvaart, 2015, d(2015, 5, 14), d(2015, 5, 14)}, - {OnzeLieveHeerHemelvaart, 2016, d(2016, 5, 5), d(2016, 5, 5)}, - {OnzeLieveHeerHemelvaart, 2017, d(2017, 5, 25), d(2017, 5, 25)}, - {OnzeLieveHeerHemelvaart, 2018, d(2018, 5, 10), d(2018, 5, 10)}, - {OnzeLieveHeerHemelvaart, 2019, d(2019, 5, 30), d(2019, 5, 30)}, - {OnzeLieveHeerHemelvaart, 2020, d(2020, 5, 21), d(2020, 5, 21)}, - {OnzeLieveHeerHemelvaart, 2021, d(2021, 5, 13), d(2021, 5, 13)}, - {OnzeLieveHeerHemelvaart, 2022, d(2022, 5, 26), d(2022, 5, 26)}, + {ChristiHimmelfaart, 2015, d(2015, 5, 14), d(2015, 5, 14)}, + {ChristiHimmelfaart, 2016, d(2016, 5, 5), d(2016, 5, 5)}, + {ChristiHimmelfaart, 2017, d(2017, 5, 25), d(2017, 5, 25)}, + {ChristiHimmelfaart, 2018, d(2018, 5, 10), d(2018, 5, 10)}, + {ChristiHimmelfaart, 2019, d(2019, 5, 30), d(2019, 5, 30)}, + {ChristiHimmelfaart, 2020, d(2020, 5, 21), d(2020, 5, 21)}, + {ChristiHimmelfaart, 2021, d(2021, 5, 13), d(2021, 5, 13)}, + {ChristiHimmelfaart, 2022, d(2022, 5, 26), d(2022, 5, 26)}, - {Pinkstermaandag, 2015, d(2015, 5, 25), d(2015, 5, 25)}, - {Pinkstermaandag, 2016, d(2016, 5, 16), d(2016, 5, 16)}, - {Pinkstermaandag, 2017, d(2017, 6, 5), d(2017, 6, 5)}, - {Pinkstermaandag, 2018, d(2018, 5, 21), d(2018, 5, 21)}, - {Pinkstermaandag, 2019, d(2019, 6, 10), d(2019, 6, 10)}, - {Pinkstermaandag, 2020, d(2020, 6, 1), d(2020, 6, 1)}, - {Pinkstermaandag, 2021, d(2021, 5, 24), d(2021, 5, 24)}, - {Pinkstermaandag, 2022, d(2022, 6, 6), d(2022, 6, 6)}, + {Pengschtméindeg, 2015, d(2015, 5, 25), d(2015, 5, 25)}, + {Pengschtméindeg, 2016, d(2016, 5, 16), d(2016, 5, 16)}, + {Pengschtméindeg, 2017, d(2017, 6, 5), d(2017, 6, 5)}, + {Pengschtméindeg, 2018, d(2018, 5, 21), d(2018, 5, 21)}, + {Pengschtméindeg, 2019, d(2019, 6, 10), d(2019, 6, 10)}, + {Pengschtméindeg, 2020, d(2020, 6, 1), d(2020, 6, 1)}, + {Pengschtméindeg, 2021, d(2021, 5, 24), d(2021, 5, 24)}, + {Pengschtméindeg, 2022, d(2022, 6, 6), d(2022, 6, 6)}, - {NationaleFeestdag, 2015, d(2015, 7, 21), d(2015, 7, 21)}, - {NationaleFeestdag, 2016, d(2016, 7, 21), d(2016, 7, 21)}, - {NationaleFeestdag, 2017, d(2017, 7, 21), d(2017, 7, 21)}, - {NationaleFeestdag, 2018, d(2018, 7, 21), d(2018, 7, 21)}, - {NationaleFeestdag, 2019, d(2019, 7, 21), d(2019, 7, 21)}, - {NationaleFeestdag, 2020, d(2020, 7, 21), d(2020, 7, 21)}, - {NationaleFeestdag, 2021, d(2021, 7, 21), d(2021, 7, 21)}, - {NationaleFeestdag, 2022, d(2022, 7, 21), d(2022, 7, 21)}, + {Nationalfeierdag, 2015, d(2015, 7, 23), d(2015, 7, 23)}, + {Nationalfeierdag, 2016, d(2016, 7, 23), d(2016, 7, 23)}, + {Nationalfeierdag, 2017, d(2017, 7, 23), d(2017, 7, 23)}, + {Nationalfeierdag, 2018, d(2018, 7, 23), d(2018, 7, 23)}, + {Nationalfeierdag, 2019, d(2019, 7, 23), d(2019, 7, 23)}, + {Nationalfeierdag, 2020, d(2020, 7, 23), d(2020, 7, 23)}, + {Nationalfeierdag, 2021, d(2021, 7, 23), d(2021, 7, 23)}, + {Nationalfeierdag, 2022, d(2022, 7, 23), d(2022, 7, 23)}, - {OnzeLieveVrouwHemelvaart, 2015, d(2015, 8, 15), d(2015, 8, 15)}, - {OnzeLieveVrouwHemelvaart, 2016, d(2016, 8, 15), d(2016, 8, 15)}, - {OnzeLieveVrouwHemelvaart, 2017, d(2017, 8, 15), d(2017, 8, 15)}, - {OnzeLieveVrouwHemelvaart, 2018, d(2018, 8, 15), d(2018, 8, 15)}, - {OnzeLieveVrouwHemelvaart, 2019, d(2019, 8, 15), d(2019, 8, 15)}, - {OnzeLieveVrouwHemelvaart, 2020, d(2020, 8, 15), d(2020, 8, 15)}, - {OnzeLieveVrouwHemelvaart, 2021, d(2021, 8, 15), d(2021, 8, 15)}, - {OnzeLieveVrouwHemelvaart, 2022, d(2022, 8, 15), d(2022, 8, 15)}, + {MariesHimmelfaart, 2015, d(2015, 8, 15), d(2015, 8, 15)}, + {MariesHimmelfaart, 2016, d(2016, 8, 15), d(2016, 8, 15)}, + {MariesHimmelfaart, 2017, d(2017, 8, 15), d(2017, 8, 15)}, + {MariesHimmelfaart, 2018, d(2018, 8, 15), d(2018, 8, 15)}, + {MariesHimmelfaart, 2019, d(2019, 8, 15), d(2019, 8, 15)}, + {MariesHimmelfaart, 2020, d(2020, 8, 15), d(2020, 8, 15)}, + {MariesHimmelfaart, 2021, d(2021, 8, 15), d(2021, 8, 15)}, + {MariesHimmelfaart, 2022, d(2022, 8, 15), d(2022, 8, 15)}, - {Allerheiligen, 2015, d(2015, 11, 1), d(2015, 11, 1)}, - {Allerheiligen, 2016, d(2016, 11, 1), d(2016, 11, 1)}, - {Allerheiligen, 2017, d(2017, 11, 1), d(2017, 11, 1)}, - {Allerheiligen, 2018, d(2018, 11, 1), d(2018, 11, 1)}, - {Allerheiligen, 2019, d(2019, 11, 1), d(2019, 11, 1)}, - {Allerheiligen, 2020, d(2020, 11, 1), d(2020, 11, 1)}, - {Allerheiligen, 2021, d(2021, 11, 1), d(2021, 11, 1)}, - {Allerheiligen, 2022, d(2022, 11, 1), d(2022, 11, 1)}, + {Allerhellgen, 2015, d(2015, 11, 1), d(2015, 11, 1)}, + {Allerhellgen, 2016, d(2016, 11, 1), d(2016, 11, 1)}, + {Allerhellgen, 2017, d(2017, 11, 1), d(2017, 11, 1)}, + {Allerhellgen, 2018, d(2018, 11, 1), d(2018, 11, 1)}, + {Allerhellgen, 2019, d(2019, 11, 1), d(2019, 11, 1)}, + {Allerhellgen, 2020, d(2020, 11, 1), d(2020, 11, 1)}, + {Allerhellgen, 2021, d(2021, 11, 1), d(2021, 11, 1)}, + {Allerhellgen, 2022, d(2022, 11, 1), d(2022, 11, 1)}, - {Wapenstilstand, 2015, d(2015, 11, 11), d(2015, 11, 11)}, - {Wapenstilstand, 2016, d(2016, 11, 11), d(2016, 11, 11)}, - {Wapenstilstand, 2017, d(2017, 11, 11), d(2017, 11, 11)}, - {Wapenstilstand, 2018, d(2018, 11, 11), d(2018, 11, 11)}, - {Wapenstilstand, 2019, d(2019, 11, 11), d(2019, 11, 11)}, - {Wapenstilstand, 2020, d(2020, 11, 11), d(2020, 11, 11)}, - {Wapenstilstand, 2021, d(2021, 11, 11), d(2021, 11, 11)}, - {Wapenstilstand, 2022, d(2022, 11, 11), d(2022, 11, 11)}, + {Chreschtdag, 2015, d(2015, 12, 25), d(2015, 12, 25)}, + {Chreschtdag, 2016, d(2016, 12, 25), d(2016, 12, 25)}, + {Chreschtdag, 2017, d(2017, 12, 25), d(2017, 12, 25)}, + {Chreschtdag, 2018, d(2018, 12, 25), d(2018, 12, 25)}, + {Chreschtdag, 2019, d(2019, 12, 25), d(2019, 12, 25)}, + {Chreschtdag, 2020, d(2020, 12, 25), d(2020, 12, 25)}, + {Chreschtdag, 2021, d(2021, 12, 25), d(2021, 12, 25)}, + {Chreschtdag, 2022, d(2022, 12, 25), d(2022, 12, 25)}, - {Kerstmis, 2015, d(2015, 12, 25), d(2015, 12, 25)}, - {Kerstmis, 2016, d(2016, 12, 25), d(2016, 12, 25)}, - {Kerstmis, 2017, d(2017, 12, 25), d(2017, 12, 25)}, - {Kerstmis, 2018, d(2018, 12, 25), d(2018, 12, 25)}, - {Kerstmis, 2019, d(2019, 12, 25), d(2019, 12, 25)}, - {Kerstmis, 2020, d(2020, 12, 25), d(2020, 12, 25)}, - {Kerstmis, 2021, d(2021, 12, 25), d(2021, 12, 25)}, - {Kerstmis, 2022, d(2022, 12, 25), d(2022, 12, 25)}, + {ZweetenDagChrëschtdag, 2015, d(2015, 12, 26), d(2015, 12, 26)}, + {ZweetenDagChrëschtdag, 2016, d(2016, 12, 26), d(2016, 12, 26)}, + {ZweetenDagChrëschtdag, 2017, d(2017, 12, 26), d(2017, 12, 26)}, + {ZweetenDagChrëschtdag, 2018, d(2018, 12, 26), d(2018, 12, 26)}, + {ZweetenDagChrëschtdag, 2019, d(2019, 12, 26), d(2019, 12, 26)}, + {ZweetenDagChrëschtdag, 2020, d(2020, 12, 26), d(2020, 12, 26)}, + {ZweetenDagChrëschtdag, 2021, d(2021, 12, 26), d(2021, 12, 26)}, + {ZweetenDagChrëschtdag, 2022, d(2022, 12, 26), d(2022, 12, 26)}, } for _, test := range tests { From f5f1f44c85f74c14c63eb91d7781f49b7ba6a8fe Mon Sep 17 00:00:00 2001 From: Cyril Mouttet Date: Mon, 8 Jul 2024 15:51:48 +0200 Subject: [PATCH 4/6] Added go mod --- go.mod | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 go.mod diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..e4e0fe1 --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module github.com/placid2000/cal/v2 + +go 1.21.1 From 005c651073f058ac667beeaf1c44966aed3ff522 Mon Sep 17 00:00:00 2001 From: Cyril Mouttet Date: Mon, 5 Aug 2024 10:25:49 +0200 Subject: [PATCH 5/6] Renamed packge to lu --- v2/lu/lu_holidays.go | 2 +- v2/lu/lu_holidays_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/v2/lu/lu_holidays.go b/v2/lu/lu_holidays.go index 5fba6be..e2df6d5 100644 --- a/v2/lu/lu_holidays.go +++ b/v2/lu/lu_holidays.go @@ -1,7 +1,7 @@ // (c) Rick Arnold. Licensed under the BSD license (see LICENSE). // Package be provides holiday definitions for Luxembourg. -package be +package lu import ( "time" diff --git a/v2/lu/lu_holidays_test.go b/v2/lu/lu_holidays_test.go index 20260bb..5d1b436 100644 --- a/v2/lu/lu_holidays_test.go +++ b/v2/lu/lu_holidays_test.go @@ -1,6 +1,6 @@ // (c) Rick Arnold. Licensed under the BSD license (see LICENSE). -package be +package lu import ( "testing" From 4387a0f4f4f7a02444a0a3aeb1589176100d4292 Mon Sep 17 00:00:00 2001 From: Cyril Mouttet Date: Mon, 5 Aug 2024 10:28:24 +0200 Subject: [PATCH 6/6] Removed go mod file from v2 directory --- go.mod | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 go.mod diff --git a/go.mod b/go.mod deleted file mode 100644 index e4e0fe1..0000000 --- a/go.mod +++ /dev/null @@ -1,3 +0,0 @@ -module github.com/placid2000/cal/v2 - -go 1.21.1