Skip to content

Commit

Permalink
Merge pull request #433 from janjongerden/improve-netherlands-holidays
Browse files Browse the repository at this point in the history
Improve dutch holiday naming
  • Loading branch information
derTobsch authored Jan 17, 2024
2 parents d8e283f + 98ab04a commit 435cb1e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ holiday.description.JUNETEENTH = Juneteenth
holiday.description.KALANIANAOLE = Dag van prins Jonah Kuhio Kalanianaole
holiday.description.KAMEHAMEHA = Kamehameha Dag
holiday.description.KINGS_CORONATION = King's Coronation
holiday.description.KINGS_DAY = Dag van de koning
holiday.description.KINGS_DAY = Koningsdag
holiday.description.KINGS_FEAST = Koningsfeest
holiday.description.KRUGER = Kruger dag
holiday.description.LABOUR_DAY = Dag van de arbeid
Expand Down Expand Up @@ -346,16 +346,16 @@ holiday.description.christian.ASH_WEDNESDAY = Aswoensdag
holiday.description.christian.CARNIVAL = Carnaval
holiday.description.christian.CLEAN_MONDAY = Schone maandag
holiday.description.christian.CORPUS_CHRISTI = Sacrementsdag
holiday.description.christian.EASTER = Pasen
holiday.description.christian.EASTER_MONDAY = Paasmaandag
holiday.description.christian.EASTER = Eerste paasdag
holiday.description.christian.EASTER_MONDAY = Tweede paasdag
holiday.description.christian.EASTER_SATURDAY = Paaszaterdag
holiday.description.christian.EASTER_TUESDAY = Paasdinsdag
holiday.description.christian.GENERAL_PRAYER_DAY = Dag van het gebed
holiday.description.christian.GOOD_FRIDAY = Goede vrijdag
holiday.description.christian.MARDI_GRAS = Mardi Gras
holiday.description.christian.MAUNDY_THURSDAY = Witte donderdag
holiday.description.christian.PENTECOST = Pinksteren
holiday.description.christian.PENTECOST_MONDAY = Pinksteren maandag
holiday.description.christian.PENTECOST = Eerste pinksterdag
holiday.description.christian.PENTECOST_MONDAY = Tweede pinksterdag
holiday.description.christian.SACRED_HEART = Heilig hart
holiday.description.christian.SHROVE_MONDAY = Vastenmaandag
holiday.description.christian.WHIT_MONDAY = Pinkstermaandag
Expand Down
6 changes: 3 additions & 3 deletions jollyday-core/src/main/resources/holidays/Holidays_nl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
</Fixed>
<Fixed month="MAY" day="5" validFrom="1945" validTo="1989" descriptionPropertiesKey="LIBERATION" every="FIVE_YEARS"/>
<Fixed month="MAY" day="5" validFrom="1990" descriptionPropertiesKey="LIBERATION"/>
<Fixed month="DECEMBER" day="25" descriptionPropertiesKey="CHRISTMAS"/>
<Fixed month="DECEMBER" day="26" descriptionPropertiesKey="STEPHENS"/>
<Fixed month="DECEMBER" day="25" descriptionPropertiesKey="FIRST_CHRISTMAS_DAY"/>
<Fixed month="DECEMBER" day="26" descriptionPropertiesKey="SECOND_CHRISTMAS_DAY"/>
<ChristianHoliday type="GOOD_FRIDAY" descriptionPropertiesKey="christian.GOOD_FRIDAY"/>
<ChristianHoliday type="EASTER" descriptionPropertiesKey="christian.EASTER"/>
<ChristianHoliday type="EASTER_MONDAY" validFrom="1642" descriptionPropertiesKey="christian.EASTER_MONDAY"/>
<ChristianHoliday type="ASCENSION_DAY" descriptionPropertiesKey="christian.ASCENSION_DAY"/>
<ChristianHoliday type="PENTECOST" descriptionPropertiesKey="christian.PENTECOST"/>
<ChristianHoliday type="WHIT_MONDAY" descriptionPropertiesKey="christian.WHIT_MONDAY"/>
<ChristianHoliday type="PENTECOST_MONDAY" descriptionPropertiesKey="christian.PENTECOST_MONDAY"/>
</Holidays>
</Configuration>
Original file line number Diff line number Diff line change
Expand Up @@ -80,21 +80,21 @@ void ensuresThatAllLiberationIsConfiguredUntil1990(@ForAll @YearRange(min = 1990
}

@Property
void ensuresThatChristmasIsConfigured(@ForAll @YearRange Year year) {
void ensuresThatFirstChristmasDayIsConfigured(@ForAll @YearRange Year year) {
final HolidayManager holidayManager = HolidayManager.getInstance(create(NETHERLANDS));
final Set<Holiday> holidays = holidayManager.getHolidays(year.getValue());
assertThat(holidays)
.isNotEmpty()
.contains(new Holiday(LocalDate.of(year.getValue(), DECEMBER, 25), "CHRISTMAS", OFFICIAL_HOLIDAY));
.contains(new Holiday(LocalDate.of(year.getValue(), DECEMBER, 25), "FIRST_CHRISTMAS_DAY", OFFICIAL_HOLIDAY));
}

@Property
void ensuresThatStephensIsConfigured(@ForAll @YearRange Year year) {
void ensuresThatSecondChristmasDayIsConfigured(@ForAll @YearRange Year year) {
final HolidayManager holidayManager = HolidayManager.getInstance(create(NETHERLANDS));
final Set<Holiday> holidays = holidayManager.getHolidays(year.getValue());
assertThat(holidays)
.isNotEmpty()
.contains(new Holiday(LocalDate.of(year.getValue(), DECEMBER, 26), "STEPHENS", OFFICIAL_HOLIDAY));
.contains(new Holiday(LocalDate.of(year.getValue(), DECEMBER, 26), "SECOND_CHRISTMAS_DAY", OFFICIAL_HOLIDAY));
}

@Property
Expand Down Expand Up @@ -158,12 +158,12 @@ void ensuresThatPentecostIsConfigured(@ForAll @YearRange Year year) {
}

@Property
void ensuresThatWhitMondayIsConfigured(@ForAll @YearRange Year year) {
void ensuresThatPentecostMondayIsConfigured(@ForAll @YearRange Year year) {
final HolidayManager holidayManager = HolidayManager.getInstance(create(NETHERLANDS));
final Set<Holiday> holidays = holidayManager.getHolidays(year.getValue());
assertThat(holidays)
.isNotEmpty()
.extracting(Holiday::getPropertiesKey)
.contains("christian.WHIT_MONDAY");
.contains("christian.PENTECOST_MONDAY");
}
}

0 comments on commit 435cb1e

Please sign in to comment.