de.jaret.util.date.holidayenumerator
Interface HolidayEnumerator

All Known Implementing Classes:
HolidayEnumerator_de_DE, HolidayEnumerator_en_US, HolidayEnumerator_fr_FR, HolidayEnumerator_pl_PL, HolidayEnumeratorBase

public interface HolidayEnumerator

Interface for a class enumerating holidays and other specially named days for a given Locale and additional RegionID. A special day is a day with a given name but without a meaning to the working world (such as the 24.12. in germany: it is named "Heiligabend" but it is not a holiday by law). Those can be used for additional information in calendar tools.

Version:
$Id: HolidayEnumerator.java 293 2007-03-11 17:50:57Z olk $
Author:
Peter Kliem

Method Summary
 String[] getAvailableRegionIds()
          Retrieve the available region identifiers of the holiday enumerator.
 String getDayName(Date date)
          Retrieve the name of a special day or holiday.
 Locale getLocale()
          Retrieve the Locale of this HolidayEnumerator.
 List<NamedDate> getNamedDays(int year, boolean includeSpecialDays)
          Retrieve a list of named days for a given year.
 List<NamedDate> getNamedDays(int year, int month, boolean includeSpecialDays)
          Retrieve a list of named days for a given year.
 String getRegionId()
          Retrieve the RegionId of this HolidayEnumerator.
 boolean isHoliday(Date date)
          Check whether a given day denotes a holiday.
 boolean isSpecialDay(Date date)
          Check whether a given day denotes a special (named) day.
 

Method Detail

isSpecialDay

boolean isSpecialDay(Date date)
Check whether a given day denotes a special (named) day.

Parameters:
date - The date to be checked
Returns:
true if the date denotes a named day.

isHoliday

boolean isHoliday(Date date)
Check whether a given day denotes a holiday.

Parameters:
date - date to be checked
Returns:
true if the date denotes a holiday

getDayName

String getDayName(Date date)
Retrieve the name of a special day or holiday.

Parameters:
date - date for which the name is to be retrieved
Returns:
the name of the day or null if no name is found.

getNamedDays

List<NamedDate> getNamedDays(int year,
                             boolean includeSpecialDays)
Retrieve a list of named days for a given year.

Parameters:
year - year to be questioned
includeSpecialDays - if true, special days are includes, otherwise the list will only contain holidays
Returns:
an ordered list of named dates

getNamedDays

List<NamedDate> getNamedDays(int year,
                             int month,
                             boolean includeSpecialDays)
Retrieve a list of named days for a given year.

Parameters:
year - year to be questioned
month - month to be questioned
includeSpecialDays - if true, special days are includes, otherwise the list will only contain holidays
Returns:
an ordered list of named dates

getLocale

Locale getLocale()
Retrieve the Locale of this HolidayEnumerator.

Returns:
configured Locale

getRegionId

String getRegionId()
Retrieve the RegionId of this HolidayEnumerator.

Returns:
the regionid

getAvailableRegionIds

String[] getAvailableRegionIds()
Retrieve the available region identifiers of the holiday enumerator.

Returns:
the availbale ids or an empty array for no regions


Copyright © 2013. All Rights Reserved.