Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .docs/world.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public enum HolidayCalendar {
NAMIBIA("NA"), NETHERLANDS("NL"), NEW_ZEALAND("NZ"), NICARAGUA("NI"), NIGER("NE"), NIGERIA("NG"), NORWAY("NO"), NYSE("NYSE"), NYSE_EURONEXT("NYSE_EURONEXT"),
PANAMA("PA"), PARAGUAY("PY"), PERU("PE"), POLAND("PL"), PORTUGAL("PT"),
ROMANIA("RO"), RUSSIA("RU"), RWANDA("RW"),
SAN_MARINO("SM"), SAUDI_ARABIA("SA"), SERBIA("RS"), SIERRA_LEONE("SL"), SEYCHELLES("SC"), SINGAPORE("SG"), SLOWAKIA("SK"), SLOWENIA("SI"), SOMALIA("SO"), SUDAN("SD"), SOUTH_AFRICA("ZA"), SOUTH_SUDAN("SS"), SPAIN("ES"), SURINAME("SR"), SYRIA("SY"), SWEDEN("SE"), SWITZERLAND("CH"),
SAN_MARINO("SM"), SAUDI_ARABIA("SA"), SERBIA("RS"), SIERRA_LEONE("SL"), SEYCHELLES("SC"), SINGAPORE("SG"), SLOWAKIA("SK"), SLOWENIA("SI"), SOMALIA("SO"), SUDAN("SD"), SOUTH_AFRICA("ZA"), SOUTH_SUDAN("SS"), SPAIN("ES"), SVALBARD_AND_JAN_MAYEN("SJ"), SURINAME("SR"), SYRIA("SY"), SWEDEN("SE"), SWITZERLAND("CH"),
TARGET("TARGET"), TARGET2_SECURITIES("TARGET2_SECURITIES"), TAJIKISTAN("TJ"), TANZANIA("TZ"), TOGO("TG"), TRINIDAD_AND_TOBAGO("TT"), TUNISIA("TN"), TURKMENISTAN("TM"), TURKEY("TR"),
UGANDA("UG"), UKRAINE("UA"), UNITED_ARAB_EMIRATES("AE"), UNITED_KINGDOM(Locale.UK.getCountry()), UNITED_STATES(Locale.US.getCountry()), URUGUAY("UY"), UZBEKISTAN("UZ"),
VATICAN_CITY("VA"), VENEZUELA("VE"), VIETNAM("VN"), YEMEN("YE"),
Expand Down
26 changes: 26 additions & 0 deletions jollyday-core/src/main/resources/holidays/Holidays_sj.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>

<Configuration hierarchy="sj" description="Svalbard and Jan Mayen"
xmlns="https://focus_shift.de/jollyday/schema/holiday"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://focus_shift.de/jollyday/schema/holiday https://focus_shift.de/jollyday/schema/holiday/holiday.xsd">
<Holidays>
<Fixed month="JANUARY" day="1" descriptionPropertiesKey="NEW_YEAR"/>
<Fixed month="MAY" day="1" descriptionPropertiesKey="LABOUR_DAY"/>
<Fixed month="MAY" day="17" descriptionPropertiesKey="CONSTITUTION_DAY"/>
<Fixed month="DECEMBER" day="25" descriptionPropertiesKey="CHRISTMAS"/>
<Fixed month="DECEMBER" day="26" descriptionPropertiesKey="STEPHENS"/>
<ChristianHoliday type="MAUNDY_THURSDAY"/>
<ChristianHoliday type="GOOD_FRIDAY"/>
<ChristianHoliday type="EASTER"/>
<ChristianHoliday type="EASTER_MONDAY"/>
<ChristianHoliday type="ASCENSION_DAY"/>
<ChristianHoliday type="PENTECOST"/>
<ChristianHoliday type="WHIT_MONDAY"/>
</Holidays>

<Sources>
<Source>https://en.wikipedia.org/wiki/Public_holidays_in_Svalbard</Source>
<Source of="ISO 3166">https://www.iso.org/obp/ui/#iso:code:3166:SJ</Source>
</Sources>
</Configuration>
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package de.focus_shift.jollyday.tests.country;

import org.junit.jupiter.api.Test;

import static de.focus_shift.jollyday.core.HolidayCalendar.SVALBARD_AND_JAN_MAYEN;
import static de.focus_shift.jollyday.tests.CalendarCheckerApi.assertFor;
import static java.time.Month.JANUARY;
import static java.time.Month.MAY;
import static java.time.Month.DECEMBER;

class HolidaySJTest {

@Test
void ensuresHolidays() {
assertFor(SVALBARD_AND_JAN_MAYEN)
.hasFixedHoliday("NEW_YEAR", JANUARY, 1).and()
.hasFixedHoliday("LABOUR_DAY", MAY, 1).and()
.hasFixedHoliday("CONSTITUTION_DAY", MAY, 17).and()
.hasFixedHoliday("CHRISTMAS", DECEMBER, 25).and()
.hasFixedHoliday("STEPHENS", DECEMBER, 26).and()
.hasChristianHoliday("MAUNDY_THURSDAY").and()
.hasChristianHoliday("GOOD_FRIDAY").and()
.hasChristianHoliday("EASTER").and()
.hasChristianHoliday("EASTER_MONDAY").and()
.hasChristianHoliday("ASCENSION_DAY").and()
.hasChristianHoliday("PENTECOST").and()
.hasChristianHoliday("WHIT_MONDAY")
.check();
}
}
Loading