Package de.mhus.lib.core.base.service
Class HolidayProviderImpl
- java.lang.Object
-
- de.mhus.lib.core.MLog
-
- de.mhus.lib.core.base.service.HolidayProviderImpl
-
- All Implemented Interfaces:
HolidayProviderIfc,ILog
public class HolidayProviderImpl extends MLog implements HolidayProviderIfc
-
-
Constructor Summary
Constructors Constructor Description HolidayProviderImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidfillDefaultHolydays(Locale locale, int year, Map<String,String> map)Map<String,String>getHolidays(Locale locale, int year)Returns a list of holidays for the area and year.booleanisHoliday(Locale locale, Date date)Returns if the given day is a holiday in the given area.booleanisWorkingDay(Locale locale, Date date)Returns true if the day is not a Sunday and not a holiday.
-
-
-
Method Detail
-
isHoliday
public boolean isHoliday(Locale locale, Date date)
Description copied from interface:HolidayProviderIfcReturns if the given day is a holiday in the given area.- Specified by:
isHolidayin interfaceHolidayProviderIfc- Parameters:
locale- The requested area or null for the default area.date- The day to check- Returns:
- true if the day (ignoring time) is a holiday.
-
isWorkingDay
public boolean isWorkingDay(Locale locale, Date date)
Description copied from interface:HolidayProviderIfcReturns true if the day is not a Sunday and not a holiday.- Specified by:
isWorkingDayin interfaceHolidayProviderIfc- Returns:
- true if the specified date is a working day
-
getHolidays
public Map<String,String> getHolidays(Locale locale, int year)
Description copied from interface:HolidayProviderIfcReturns a list of holidays for the area and year.- Specified by:
getHolidaysin interfaceHolidayProviderIfc- Returns:
- true if the specified date is a holiday
-
-