From aa41470e21a241a0c713bc51c77cec847ef48149 Mon Sep 17 00:00:00 2001 From: Tobias Schneider Date: Sat, 21 Dec 2024 20:01:19 +0100 Subject: [PATCH] armenia: add armenia closes #520 --- .../jollyday/core/HolidayCalendar.java | 2 +- .../country_descriptions.properties | 11 +++ .../country_descriptions_de.properties | 11 +++ .../country_descriptions_el.properties | 11 +++ .../country_descriptions_fr.properties | 11 +++ .../country_descriptions_nl.properties | 11 +++ .../country_descriptions_pt.properties | 11 +++ .../country_descriptions_sv.properties | 11 +++ .../holiday_descriptions.properties | 1 + .../holiday_descriptions_de.properties | 1 + .../holiday_descriptions_el.properties | 1 + .../holiday_descriptions_fr.properties | 1 + .../holiday_descriptions_nl.properties | 1 + .../holiday_descriptions_pt.properties | 1 + .../holiday_descriptions_sv.properties | 1 + .../main/resources/holidays/Holidays_am.xml | 73 +++++++++++++++++++ .../jollyday/tests/country/HolidayAMTest.java | 37 ++++++++++ 17 files changed, 195 insertions(+), 1 deletion(-) create mode 100644 jollyday-core/src/main/resources/holidays/Holidays_am.xml create mode 100644 jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidayAMTest.java diff --git a/jollyday-core/src/main/java/de/focus_shift/jollyday/core/HolidayCalendar.java b/jollyday-core/src/main/java/de/focus_shift/jollyday/core/HolidayCalendar.java index 74499d28f..470b908a3 100644 --- a/jollyday-core/src/main/java/de/focus_shift/jollyday/core/HolidayCalendar.java +++ b/jollyday-core/src/main/java/de/focus_shift/jollyday/core/HolidayCalendar.java @@ -11,7 +11,7 @@ */ public enum HolidayCalendar { - ALBANIA("AL"), ANDORRA("AD"), ARGENTINA("AR"), AUSTRALIA("AU"), AUSTRIA("AT"), + ALBANIA("AL"), ANDORRA("AD"), ARGENTINA("AR"), ARMENIA("AM"), AUSTRALIA("AU"), AUSTRIA("AT"), BAHAMAS("BS"), BELARUS("BY"), BELGIUM("BE"), BERMUDA("BM"), BOLIVIA("BO"), BOSNIA_HERZIGOWINA("BA"), BRAZIL("BR"), BRITISH_VIRGIN_ISLANDS("VG"), BULGARIA("BG"), CANADA(Locale.CANADA.getCountry()), CAYMAN_ISLANDS("KY"), CHILE("CL"), COLOMBIA("CO"), COSTA_RICA("CR"), CROATIA("HR"), CUBA("CU"), CZECH_REPUBLIC("CZ"), CYPRUS("CY"), DENMARK("DK"), DOW_JONES_STOXX("DJ_STOXX"), diff --git a/jollyday-core/src/main/resources/descriptions/country_descriptions.properties b/jollyday-core/src/main/resources/descriptions/country_descriptions.properties index b2c4bd7a1..f1287c9ff 100644 --- a/jollyday-core/src/main/resources/descriptions/country_descriptions.properties +++ b/jollyday-core/src/main/resources/descriptions/country_descriptions.properties @@ -12,6 +12,17 @@ country.description.ag = Antigua And Barbuda country.description.ai = Anguilla country.description.al = Albania country.description.am = Armenia +country.description.am.ag = Aragatsotn +country.description.am.ar = Ararat +country.description.am.av = Armavir +country.description.am.er = Yerevan +country.description.am.gr = Gegharkunik +country.description.am.kt = Kotayk +country.description.am.lo = Lori +country.description.am.sh = Shirak +country.description.am.su = Syunik +country.description.am.tv = Tavush +country.description.am.vd = Vayots Dzor country.description.an = Netherlands Antilles country.description.ao = Angola country.description.aq = Antarctica diff --git a/jollyday-core/src/main/resources/descriptions/country_descriptions_de.properties b/jollyday-core/src/main/resources/descriptions/country_descriptions_de.properties index f57639c22..00bc3cfb4 100644 --- a/jollyday-core/src/main/resources/descriptions/country_descriptions_de.properties +++ b/jollyday-core/src/main/resources/descriptions/country_descriptions_de.properties @@ -12,6 +12,17 @@ country.description.ag = Antigua und Barbuda country.description.ai = Anguilla country.description.al = Albanien country.description.am = Armenien +country.description.am.ag = Aragatsotn +country.description.am.ar = Ararat +country.description.am.av = Armavir +country.description.am.er = Jerewan +country.description.am.gr = Gegharkunik +country.description.am.kt = Kotajk +country.description.am.lo = Lori +country.description.am.sh = Schirak +country.description.am.su = Sjunik +country.description.am.tv = Tawusch +country.description.am.vd = Wajoz Dsor country.description.an = Niederländische Antillen country.description.ao = Angola country.description.aq = Antarktis diff --git a/jollyday-core/src/main/resources/descriptions/country_descriptions_el.properties b/jollyday-core/src/main/resources/descriptions/country_descriptions_el.properties index 473d9e86f..09c43cb5b 100644 --- a/jollyday-core/src/main/resources/descriptions/country_descriptions_el.properties +++ b/jollyday-core/src/main/resources/descriptions/country_descriptions_el.properties @@ -12,6 +12,17 @@ country.description.ag = Αντίγκουα και Μπαρμπούντα country.description.ai = Ανγκουίλα country.description.al = Αλβανία country.description.am = Αρμενία +country.description.am.ag = Αραγκατσότν +country.description.am.ar = Αραράτ +country.description.am.av = Αρμαβίρ +country.description.am.er = Ερεβάν +country.description.am.gr = Γκεγκαρκουνίκ +country.description.am.kt = Κοτάικ +country.description.am.lo = Λορί +country.description.am.sh = Σιράκ +country.description.am.su = Σιουνίκ +country.description.am.tv = Ταβούς +country.description.am.vd = Βαγιότς Ντζόρ country.description.an = Ολλανδικές Αντίλλες country.description.ao = Ανγκόλα country.description.aq = Ανταρκτική diff --git a/jollyday-core/src/main/resources/descriptions/country_descriptions_fr.properties b/jollyday-core/src/main/resources/descriptions/country_descriptions_fr.properties index bb42ed4e4..f79c1280b 100644 --- a/jollyday-core/src/main/resources/descriptions/country_descriptions_fr.properties +++ b/jollyday-core/src/main/resources/descriptions/country_descriptions_fr.properties @@ -12,6 +12,17 @@ country.description.ag = Antigua-et-Barbuda country.description.ai = Anguilla country.description.al = Albanie country.description.am = Arménie +country.description.am.ag = Aragatsotn +country.description.am.ar = Ararat +country.description.am.av = Armavir +country.description.am.er = Erevan +country.description.am.gr = Gegharkunik +country.description.am.kt = Kotayk +country.description.am.lo = Lori +country.description.am.sh = Chirak +country.description.am.su = Syunik +country.description.am.tv = Tavush +country.description.am.vd = Vayots Dzor country.description.an = Antilles néerlandaises country.description.ao = Angola country.description.aq = Antarctique diff --git a/jollyday-core/src/main/resources/descriptions/country_descriptions_nl.properties b/jollyday-core/src/main/resources/descriptions/country_descriptions_nl.properties index bc24b653f..1ddc37799 100644 --- a/jollyday-core/src/main/resources/descriptions/country_descriptions_nl.properties +++ b/jollyday-core/src/main/resources/descriptions/country_descriptions_nl.properties @@ -12,6 +12,17 @@ country.description.ag = Antigua And Barbuda country.description.ai = Anguilla country.description.al = Albania country.description.am = Armenia +country.description.am.ag = Aragatsotn +country.description.am.ar = Ararat +country.description.am.av = Armavir +country.description.am.er = Jerevan +country.description.am.gr = Gegharkunik +country.description.am.kt = Kotayk +country.description.am.lo = Lori +country.description.am.sh = Sjirok +country.description.am.su = Sjoenik +country.description.am.tv = Tavoesj +country.description.am.vd = Vayots Dzor country.description.an = Netherlands Antilles country.description.ao = Angola country.description.aq = Antarctica diff --git a/jollyday-core/src/main/resources/descriptions/country_descriptions_pt.properties b/jollyday-core/src/main/resources/descriptions/country_descriptions_pt.properties index ef3a3bce5..6df3672d0 100644 --- a/jollyday-core/src/main/resources/descriptions/country_descriptions_pt.properties +++ b/jollyday-core/src/main/resources/descriptions/country_descriptions_pt.properties @@ -12,6 +12,17 @@ country.description.ag = Antígua e Barbuda country.description.ai = Anguilha country.description.al = Albânia country.description.am = Arménia +country.description.am.ag = Aragatsotn +country.description.am.ar = Ararat +country.description.am.av = Armavir +country.description.am.er = Erevan +country.description.am.gr = Gegharkunik +country.description.am.kt = Kotayk +country.description.am.lo = Lori +country.description.am.sh = Shirak +country.description.am.su = Syunik +country.description.am.tv = Tavush +country.description.am.vd = Vayots Dzor country.description.an = Antilhas Neerlandesas country.description.ao = Angola country.description.aq = Antárctica diff --git a/jollyday-core/src/main/resources/descriptions/country_descriptions_sv.properties b/jollyday-core/src/main/resources/descriptions/country_descriptions_sv.properties index f345ddd7f..bef5c1d9c 100644 --- a/jollyday-core/src/main/resources/descriptions/country_descriptions_sv.properties +++ b/jollyday-core/src/main/resources/descriptions/country_descriptions_sv.properties @@ -12,6 +12,17 @@ country.description.ag = Antigua And Barbuda country.description.ai = Anguilla country.description.al = Albania country.description.am = Armenia +country.description.am.ag = Aragatsotn +country.description.am.ar = Ararat +country.description.am.av = Armavir +country.description.am.er = Jerevan +country.description.am.gr = Gegharkunik +country.description.am.kt = Kotayk +country.description.am.lo = Lori +country.description.am.sh = Sjurak +country.description.am.su = Sjunik +country.description.am.tv = Tavusj +country.description.am.vd = Vayots Dzor country.description.an = Netherlands Antilles country.description.ao = Angola country.description.aq = Antarctica diff --git a/jollyday-core/src/main/resources/descriptions/holiday_descriptions.properties b/jollyday-core/src/main/resources/descriptions/holiday_descriptions.properties index c70babd0c..8f5d44812 100644 --- a/jollyday-core/src/main/resources/descriptions/holiday_descriptions.properties +++ b/jollyday-core/src/main/resources/descriptions/holiday_descriptions.properties @@ -21,6 +21,7 @@ holiday.description.ANTI_FASCIST holiday.description.ANZAC = ANZAC day holiday.description.APARECIDA = Our Lady of Aparecida holiday.description.ARBOR = Arbor Day +holiday.description.ARMENIAN_GENOCIDE_REMEMBRANCE_DAY = Armenian Genocide Remembrance Day holiday.description.ARMISTICE = Armistice Day holiday.description.ARMY_DAY = Army Day holiday.description.ARRIVAL_OF_INDENTURED_LABORERS = Arrival of Indentured Labourers diff --git a/jollyday-core/src/main/resources/descriptions/holiday_descriptions_de.properties b/jollyday-core/src/main/resources/descriptions/holiday_descriptions_de.properties index a4697c501..ff3711e35 100644 --- a/jollyday-core/src/main/resources/descriptions/holiday_descriptions_de.properties +++ b/jollyday-core/src/main/resources/descriptions/holiday_descriptions_de.properties @@ -20,6 +20,7 @@ holiday.description.ANTI_FASCIST holiday.description.ANZAC = ANZAC Tag holiday.description.APARECIDA = Erscheinung der Gottesmutter Maria holiday.description.ARBOR = Arbor Tag +holiday.description.ARMENIAN_GENOCIDE_REMEMBRANCE_DAY = Gedenktag an den Armenischen Völkermord holiday.description.ARMISTICE = Waffenstillstand holiday.description.ARMY_DAY = Tag des Heeres holiday.description.ARRIVAL_OF_INDENTURED_LABORERS = Ankunft der Gastarbeiter diff --git a/jollyday-core/src/main/resources/descriptions/holiday_descriptions_el.properties b/jollyday-core/src/main/resources/descriptions/holiday_descriptions_el.properties index cbb7d9a42..34b4f2c03 100644 --- a/jollyday-core/src/main/resources/descriptions/holiday_descriptions_el.properties +++ b/jollyday-core/src/main/resources/descriptions/holiday_descriptions_el.properties @@ -21,6 +21,7 @@ holiday.description.ANTI_FASCIST holiday.description.ANZAC = Ημέρα ANZAC holiday.description.APARECIDA = Η Παναγία της Απαρεκίδας = Our Lady of Aparecida holiday.description.ARBOR = Ημέρα του δέντρου +holiday.description.ARMENIAN_GENOCIDE_REMEMBRANCE_DAY = Ημέρα Μνήμης της Αρμενικής Γενοκτονίας holiday.description.ARMISTICE = Ημέρα Ανακωχής holiday.description.ARMY_DAY = Ημέρα του Στρατού holiday.description.ARRIVAL_OF_INDENTURED_LABORERS = Άφιξη μισθωτών εργατών diff --git a/jollyday-core/src/main/resources/descriptions/holiday_descriptions_fr.properties b/jollyday-core/src/main/resources/descriptions/holiday_descriptions_fr.properties index 0a5ee8848..2a09c954c 100644 --- a/jollyday-core/src/main/resources/descriptions/holiday_descriptions_fr.properties +++ b/jollyday-core/src/main/resources/descriptions/holiday_descriptions_fr.properties @@ -21,6 +21,7 @@ holiday.description.ANTI_FASCIST holiday.description.ANZAC = Journée d'ANZAC holiday.description.APARECIDA = Notre Dame d'Aparecida holiday.description.ARBOR = Fête des Arbres +holiday.description.ARMENIAN_GENOCIDE_REMEMBRANCE_DAY = Journée de Commémoration du Génocide Arménien holiday.description.ARMISTICE = Armistice holiday.description.ARMY_DAY = Journée Militaire holiday.description.ARRIVAL_OF_INDENTURED_LABORERS = Arrivée des travailleurs sous contrat diff --git a/jollyday-core/src/main/resources/descriptions/holiday_descriptions_nl.properties b/jollyday-core/src/main/resources/descriptions/holiday_descriptions_nl.properties index 1348ea22e..c2a3da292 100644 --- a/jollyday-core/src/main/resources/descriptions/holiday_descriptions_nl.properties +++ b/jollyday-core/src/main/resources/descriptions/holiday_descriptions_nl.properties @@ -21,6 +21,7 @@ holiday.description.ANTI_FASCIST holiday.description.ANZAC = ANZAC dag holiday.description.APARECIDA = Onze lieve vrouw van Aparecida holiday.description.ARBOR = Arbor Dag +holiday.description.ARMENIAN_GENOCIDE_REMEMBRANCE_DAY = Herdenkingsdag van de Armeense Genocide holiday.description.ARMISTICE = Wapenstilstand holiday.description.ARMY_DAY = Dag van het leger holiday.description.ARRIVAL_OF_INDENTURED_LABORERS = Aankomst van de contractarbeiders diff --git a/jollyday-core/src/main/resources/descriptions/holiday_descriptions_pt.properties b/jollyday-core/src/main/resources/descriptions/holiday_descriptions_pt.properties index 0d48f0daf..aef1b49db 100644 --- a/jollyday-core/src/main/resources/descriptions/holiday_descriptions_pt.properties +++ b/jollyday-core/src/main/resources/descriptions/holiday_descriptions_pt.properties @@ -21,6 +21,7 @@ holiday.description.ANTI_FASCIST holiday.description.ANZAC = Dia de ANZAC holiday.description.APARECIDA = Nossa Senhora da Aparecida holiday.description.ARBOR = Dia da Árvore +holiday.description.ARMENIAN_GENOCIDE_REMEMBRANCE_DAY = Dia da Memória do Genocídio Armênio holiday.description.ARMISTICE = Armistice Day holiday.description.ARMY_DAY = Dia das Forças Armadas holiday.description.ARRIVAL_OF_INDENTURED_LABORERS = Chegada dos trabalhadores contratados diff --git a/jollyday-core/src/main/resources/descriptions/holiday_descriptions_sv.properties b/jollyday-core/src/main/resources/descriptions/holiday_descriptions_sv.properties index 51e29814f..30150fc94 100644 --- a/jollyday-core/src/main/resources/descriptions/holiday_descriptions_sv.properties +++ b/jollyday-core/src/main/resources/descriptions/holiday_descriptions_sv.properties @@ -21,6 +21,7 @@ holiday.description.ANTI_FASCIST holiday.description.ANZAC = ANZAC day holiday.description.APARECIDA = Our Lady of Aparecida holiday.description.ARBOR = Arbor Day +holiday.description.ARMENIAN_GENOCIDE_REMEMBRANCE_DAY = Minnesdagen för det Armeniska Folkmordet holiday.description.ARMISTICE = Armistice Day holiday.description.ARMY_DAY = Army Day holiday.description.ARRIVAL_OF_INDENTURED_LABORERS = Ankomst av kontraktsanställda arbetare diff --git a/jollyday-core/src/main/resources/holidays/Holidays_am.xml b/jollyday-core/src/main/resources/holidays/Holidays_am.xml new file mode 100644 index 000000000..d24babe3f --- /dev/null +++ b/jollyday-core/src/main/resources/holidays/Holidays_am.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + https://en.wikipedia.org/wiki/Public_holidays_in_Armenia + https://en.wikipedia.org/wiki/ISO_3166-2:AM + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidayAMTest.java b/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidayAMTest.java new file mode 100644 index 000000000..06c90b1e1 --- /dev/null +++ b/jollyday-tests/src/test/java/de/focus_shift/jollyday/tests/country/HolidayAMTest.java @@ -0,0 +1,37 @@ +package de.focus_shift.jollyday.tests.country; + +import org.junit.jupiter.api.Test; + +import static de.focus_shift.jollyday.core.HolidayCalendar.ARMENIA; +import static de.focus_shift.jollyday.tests.CalendarCheckerApi.assertFor; +import static java.time.Month.APRIL; +import static java.time.Month.DECEMBER; +import static java.time.Month.JANUARY; +import static java.time.Month.JULY; +import static java.time.Month.MARCH; +import static java.time.Month.MAY; +import static java.time.Month.SEPTEMBER; + +class HolidayAMTest { + + @Test + void ensuresHolidays() { + + assertFor(ARMENIA) + .hasFixedHoliday("NEW_YEAR", JANUARY, 1).and() + .hasFixedHoliday("NEW_YEAR", JANUARY, 2).and() + .hasFixedHoliday("CHRISTMAS", JANUARY, 5).and() + .hasFixedHoliday("CHRISTMAS", JANUARY, 6).and() + .hasFixedHoliday("ARMY_DAY", JANUARY, 28).and() + .hasFixedHoliday("", MARCH, 8).and() + .hasFixedHoliday("ARMENIAN_GENOCIDE_REMEMBRANCE_DAY", APRIL, 24).and() + .hasFixedHoliday("LABOUR_DAY", MAY, 1).and() + .hasFixedHoliday("", MAY, 9).and() + .hasFixedHoliday("REPUBLIC_DAY", MAY, 28).and() + .hasFixedHoliday("CONSTITUTION_DAY", JULY, 5).and() + .hasFixedHoliday("INDEPENDENCE_DAY", SEPTEMBER, 21).and() + .hasFixedHoliday("NEW_YEARS_EVE", DECEMBER, 31).and() + .hasChristianHoliday("EASTER") + .check(); + } +}