<aside> <img src="attachment:a3a56fc3-c53c-47ff-aacc-d7c34f62abfd:table_of_content.png" alt="attachment:a3a56fc3-c53c-47ff-aacc-d7c34f62abfd:table_of_content.png" width="40px" />
TABLE OF CONTENT
</aside>
| Package | ‣ dev.tommasop1804.italyutils |
|---|---|
| Since version | 2026-02.1 |
| JVM class name | UtilsKt |
TemporalAccessor.isItalianHolday| Since version | 2026-02.1 |
|---|---|
| Receiver | ‣ TemporalAccessor |
| Type | ‣ Boolean |
| Exceptions | UnsupportedTemporalTypeException → if cannot define year, month and day from the given temporal accessor |
| Dinamically computed | ✔️ |
Checks if the temporal object represents an Italian public holiday.
The method uses the italianHoliday property to determine if the date corresponds to a public holiday in Italy. These include fixed-date holidays such as «Capodanno» (New Year's Day) and «Natale» (Christmas), as well as variable holidays like «Pasqua» (Easter) and «Lunedì dell'Angelo» (Easter Monday). Italian holidays such as «San Francesco d'Assisi» are considered when applicable by year-based conditions.
TemporalAccessor.italianHoliday| Since version | 2026-02.1 |
|---|---|
| Receiver | ‣ TemporalAccessor |
| Type | ‣ Pair<String, String>? |
| Exceptions | UnsupportedTemporalTypeException → if cannot define year, month and day from the given temporal accessor |
| Dinamically computed | ✔️ |
Determines the Italian holiday corresponding to the date represented by this TemporalAccessor.
The function checks for holidays based on predefined fixed dates and computes the dates for Easter and Easter Monday for a given year. If the date matches a holiday, it returns the name of the holiday in both Italian and English.
It's possible that there's more than one Italian name, separated by / .
Returns a Strings pair representing the holiday name in Italian (first) and English (second), or null if the date does not correspond to any Italian holiday.