بنقرة واحدة
register-holiday-calendar
Register a new holiday calendar in the HolidayCalendar enum
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Register a new holiday calendar in the HolidayCalendar enum
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Write country-specific holiday tests using CalendarCheckerApi
Create XML holiday calendar configuration files for a new country or region
Add subdivision holiday configurations based on ISO 3166-2 codes
Add country description properties for localization
Add holiday description properties for localization
| name | Register Holiday Calendar |
| description | Register a new holiday calendar in the HolidayCalendar enum |
This guide explains how to register a new country calendar in the HolidayCalendar enum.
Edit: jollyday-core/src/main/java/de/focus_shift/jollyday/core/HolidayCalendar.java
The HolidayCalendar enum follows a strict organization pattern:
public enum HolidayCalendar {
ANTARCTICA("AQ"), ALBANIA("AL"), ANDORRA("AD"), ARGENTINA("AR"), ARMENIA("AM"), AUSTRALIA("AU"), AUSTRIA("AT"),
BAHAMAS("BS"), BELARUS("BY"), BELGIUM("BE"), BERMUDA("BM"), BOLIVIA("BO"), BRAZIL("BR"), ...
CANADA(Locale.CANADA.getCountry()), CAYMAN_ISLANDS("KY"), ...
GERMANY("DE"), GREECE("GR"), ...
UNITED_STATES(Locale.US.getCountry()), ...
}
Identify which line your country code should appear on based on the first letter:
| First Letter | Example Calendars |
|---|---|
| A | ANTARCTICA, ALBANIA, ANDORRA, ARGENTINA, AUSTRALIA |
| B | BELARUS, BELGIUM, BERMUDA, BRAZIL |
| D | DENMARK, DOMINICAN, ECUADAR (E starts D line) |
Add your calendar in alphabetical position within that letter group:
Before:
ALBANIA("AL"), ANDORRA("AD"), ARGENTINA("AR"),
Adding Antarctica (AQ) - after ARGENTINA:
ALBANIA("AL"), ANDORRA("AD"), ARGENTINA("AR"), ANTARCTICA("AQ"),
Format: COUNTRY_NAME("ISO_CODE")
Examples:
GERMANY("DE"), // Direct ISO code
CANADA(Locale.CANADA.getCountry()), // Java Locale for special cases
UNITED_STATES(Locale.US.getCountry()), // Java Locale for US
Adding a fictional "Zebra" country with code "ZB":
Before:
ZIMBABWE("ZW");
}
After:
ZEBRA("ZB"), ZIMBABWE("ZW");
}
Some countries use Java Locale instead of string codes:
CANADA(Locale.CANADA.getCountry()), // Returns "CA"
UNITED_STATES(Locale.US.getCountry()), // Returns "US"
After adding your calendar, verify: