WebCab Bonds
v2.01
(J2SE Edition)

webcab.lib.calendar
Class BusinessCalendarUtilities

java.lang.Object
  |
  +--webcab.lib.calendar.BusinessCalendarUtilities

public class BusinessCalendarUtilities
extends Object

Utility class. It serves for finding out several religious, astronomical important dates specific to different regions of the globe.


Field Summary
static String BEIJING_CALENDAR_NAME
          A string constant which identifies the BeijingBusinessCalendar implementation.
static String BUDAPEST_CALENDAR_NAME
          A string constant which identifies the BudapestBusinessCalendar implementation.
static String COPENHAGEN_CALENDAR_NAME
          A string constant which identifies the CopenhagenBusinessCalendar implementation.
static String DEFAULT_CALENDAR_NAME
          A string constant which identifies the DefaultBusinessCalendar implementation.
static String HONGKONG_CALENDAR_NAME
          A string constant which identifies the HongKongBusinessCalendar implementation.
static String ITALY_CALENDAR_NAME
          A string constant which identifies the ItalyBusinessCalendar implementation.
static String LONDON_CALENDAR_NAME
          A string constant which identifies the LondonBusinessCalendar implementation.
static String NEWYORK_CALENDAR_NAME
          A string constant which identifies the NewYorkBusinessCalendar implementation.
static String TOKYO_CALENDAR_NAME
          A string constant which identifies the TokyoBusinessCalendar implementation.
 
Method Summary
static int autumnalEquinox(int year)
          Returns the Autumnal Equinox day as a day of year.
static int catholicEasterMonday(int year)
          Returns the Catholic Easter Monday day as a day of year.
static Calendar dateToCalendar(Date date)
          Gets the Calendar instance equivalent to Date instance, date.
static BusinessCalendar getInstance(String cityCalendarName)
          Factory method for getting specific business calendars.
static int vernalEquinox(int year)
          Returns the Vernal Equinox day as a day of year.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_CALENDAR_NAME

public static final String DEFAULT_CALENDAR_NAME
A string constant which identifies the DefaultBusinessCalendar implementation. The value of this constant is DEFAULT.

See Also:
Constant Field Values

NEWYORK_CALENDAR_NAME

public static final String NEWYORK_CALENDAR_NAME
A string constant which identifies the NewYorkBusinessCalendar implementation. The value of this constant is NEW_YORK.

See Also:
Constant Field Values

LONDON_CALENDAR_NAME

public static final String LONDON_CALENDAR_NAME
A string constant which identifies the LondonBusinessCalendar implementation. The value of this constant is LONDON.

See Also:
Constant Field Values

TOKYO_CALENDAR_NAME

public static final String TOKYO_CALENDAR_NAME
A string constant which identifies the TokyoBusinessCalendar implementation. The value of this constant is TOKYO.

See Also:
Constant Field Values

BEIJING_CALENDAR_NAME

public static final String BEIJING_CALENDAR_NAME
A string constant which identifies the BeijingBusinessCalendar implementation. The value of this constant is BEIJING.

See Also:
Constant Field Values

HONGKONG_CALENDAR_NAME

public static final String HONGKONG_CALENDAR_NAME
A string constant which identifies the HongKongBusinessCalendar implementation. The value of this constant is HONGKONG.

See Also:
Constant Field Values

BUDAPEST_CALENDAR_NAME

public static final String BUDAPEST_CALENDAR_NAME
A string constant which identifies the BudapestBusinessCalendar implementation. The value of this constant is BUDAPEST.

See Also:
Constant Field Values

COPENHAGEN_CALENDAR_NAME

public static final String COPENHAGEN_CALENDAR_NAME
A string constant which identifies the CopenhagenBusinessCalendar implementation. The value of this constant is COPENHAGEN.

See Also:
Constant Field Values

ITALY_CALENDAR_NAME

public static final String ITALY_CALENDAR_NAME
A string constant which identifies the ItalyBusinessCalendar implementation. The value of this constant is ITALY.

See Also:
Constant Field Values
Method Detail

catholicEasterMonday

public static int catholicEasterMonday(int year)
Returns the Catholic Easter Monday day as a day of year.

Parameters:
year - the year we are interested in
Returns:
the Catholic Easter Monday as a day of year
Throws:
IllegalArgumentException - if year is less than 1900 or greater than 2100

vernalEquinox

public static int vernalEquinox(int year)
Returns the Vernal Equinox day as a day of year.

Parameters:
year - the year we are interested in
Returns:
the Vernal Equinox day as a day of year
Throws:
IllegalArgumentException - if year is less than 1900 or greater than 2100

autumnalEquinox

public static int autumnalEquinox(int year)
Returns the Autumnal Equinox day as a day of year.

Parameters:
year - the year we are interested in
Returns:
the Autumnal Equinox day as a day of year
Throws:
IllegalArgumentException - if year is less than 1900 or greater than 2100

dateToCalendar

public static Calendar dateToCalendar(Date date)
Gets the Calendar instance equivalent to Date instance, date.

Parameters:
date - the date to transform
Returns:
the Calendar instance equivalent to Date instance, date

getInstance

public static BusinessCalendar getInstance(String cityCalendarName)
Factory method for getting specific business calendars. The method takes a string identifier representing the name of the city and returns its corresponding business calendar. For identifies you may use the following constants defined within this class:

Returns:
a business calendar instance corresponding to the given city name

WebCab Bonds
v2.01
(J2SE Edition)