public class LocalPublicHolidays extends java.lang.Object implements PublicHolidays
PublicHolidays-interface
but it does not have any holidays at all.| Constructor and Description |
|---|
LocalPublicHolidays() |
| Modifier and Type | Method and Description |
|---|---|
protected java.util.Map<CalendarTools.DayOfYear,java.lang.String> |
getFixedHolidays()
Provides the local fixed public holidays (without a year) including their
names.
|
protected java.util.Map<java.util.Calendar,java.lang.String> |
getFixedHolidays(java.util.Calendar year)
Returns the fixed holidays as
Calendar-instances with respect to the year
specified by the designated calendar. |
protected java.util.Map<java.util.Calendar,java.lang.String> |
getFloatingHolidays(java.util.Calendar year)
Provides the local floating holidays in the designated year including their
names.
|
java.lang.String |
getPublicHolidayName(java.util.Calendar day)
Returns the name of the public holiday represented by the designated
calendar-instance.
|
java.util.Calendar[] |
getPublicHolidaysForMonth(java.util.Calendar month)
Returns the public holidays in the month represented by the designated
calendar with respect to the local conventions.
|
java.util.Calendar[] |
getPublicHolidaysForYear(java.util.Calendar year)
Returns the public holidays in the year represented by the designated
calendar with respect to the local conventions.
|
int[] |
getWorkingWeekdays()
Returns the
day of weeks that are working days
with respect to the local conventions. |
boolean |
isFloatingHoliday(java.util.Calendar day)
Gets whether the designated calendar represents a day which is a public
holiday with respect to the local conventions and if so, whether it is a
floating holiday, meaning the day of the year changes every year (in
contrast to a fixed holiday).
|
boolean |
isPublicHoliday(java.util.Calendar day)
Returns whether the designated calendar represents a day which is a public
holiday with respect to the local conventions.
|
boolean |
isWorkingDay(java.util.Calendar day)
Returns whether the designated calendar represents a working day with
respect to the local calendar, that is with respect to weekends and public
holidays.
|
protected java.util.Map<CalendarTools.DayOfYear,java.lang.String> getFixedHolidays()
protected java.util.Map<java.util.Calendar,java.lang.String> getFloatingHolidays(java.util.Calendar year)
year - A calendar specifying the year of which to retrieve the
floating holidays.protected java.util.Map<java.util.Calendar,java.lang.String> getFixedHolidays(java.util.Calendar year)
Calendar-instances with respect to the year
specified by the designated calendar. GregorianCalendars are used with UTC as
timezone and a time of one minute after midnight. Override this method in case of another
calendar system or timezone.year - The calendar specifying the year of which to retrieve the fixed holidays.public int[] getWorkingWeekdays()
PublicHolidaysday of weeks that are working days
with respect to the local conventions. The order corresponds to the normal
order of days in the week and respects the
Calendar.getFirstDayOfWeek().getWorkingWeekdays in interface PublicHolidaysday of weeks that are working days
with respect to the local conventions.public boolean isWorkingDay(java.util.Calendar day)
PublicHolidaysisWorkingDay in interface PublicHolidaysday - A calendar representing a specific day.public boolean isPublicHoliday(java.util.Calendar day)
PublicHolidaysisPublicHoliday in interface PublicHolidaysday - A calendar representing a specific day.public boolean isFloatingHoliday(java.util.Calendar day)
PublicHolidaysisFloatingHoliday in interface PublicHolidaysday - A calendar representing a specific day.public java.lang.String getPublicHolidayName(java.util.Calendar day)
PublicHolidaysgetPublicHolidayName in interface PublicHolidaysday - A calendar representing a specific day.public java.util.Calendar[] getPublicHolidaysForMonth(java.util.Calendar month)
PublicHolidaysgetPublicHolidaysForMonth in interface PublicHolidaysmonth - A calendar representing a month in a specific year.public java.util.Calendar[] getPublicHolidaysForYear(java.util.Calendar year)
PublicHolidaysgetPublicHolidaysForYear in interface PublicHolidaysyear - A calendar representing a specific year.