WebCab Options and Futures Demo v2.5 (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` `DEFAULT_CALENDAR_NAME` A string constant which identifies the `DefaultBusinessCalendar` 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

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:
  - LONDON - for London business calendar
  - NEW_YORK - for New York business calendar
  - TOKYO - for Tokyo business calendar
  - DEFAULT_CALENDAR_NAME - for a standard simplified business calendar

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

WebCab Options and Futures Demo v2.5 (J2SE Edition)