Package fr.marcwrobel.jbanking.calendar
Enum FinancialCalendars
- All Implemented Interfaces:
Calendar,Serializable,Comparable<FinancialCalendars>,java.lang.constant.Constable
A non-exhaustive list of
Calendars for some of the most important
financial districts or financial systems in the
world.
For the time being only financial districts or financial systems that express their holidays using the gregorian calendar are supported.
Those calendars are valid from 2000 until further notice.
- Since:
- 2.1.0
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionFrankfurt (Germany) financial district holidays.A special calendar with no holidays but with saturday and sunday as weekends.London (United Kingdom) financial district holidays.Federal Reserve Bank of New York holidays.New York Stock Exchange (NYSE) holidays.A special calendar with no holidays and no weekends.Paris (France) financial district holidays.A special calendar with no holidays but with saturday and sunday as weekends.Sydney (Australia) financial district holidays.The calendar for Trans-European Automated Real-time Gross settlement Express Transfer (TARGET) closing days.Tokyo (Japan) financial district holidays. -
Field Summary
Fields inherited from interface fr.marcwrobel.jbanking.calendar.Calendar
MAX_ITERATIONS -
Method Summary
Modifier and TypeMethodDescriptionbusinessDaysWithin(LocalDate from, LocalDate to) Compute the business days betweenfrom(inclusive) andto(inclusive).getHolidaysFor(LocalDate date) Get all theHolidays matching with the given day.holidaysWithin(LocalDate from, LocalDate to) Compute the holidays betweenfrom(inclusive) andto(inclusive).booleanisBusinessDay(LocalDate date) Check whether the given date is a business day.booleanCheck whether the given date is a public holiday.Compute the next business day after the given date (excluded).Compute the previous business day before the given date (excluded).static FinancialCalendarsReturns the enum constant of this type with the specified name.static FinancialCalendars[]values()Returns an array containing the constants of this enum type, in the order they are declared.Methods inherited from class java.lang.Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOfMethods inherited from interface fr.marcwrobel.jbanking.calendar.Calendar
nextOrSame, previousOrSame, shift
-
Enum Constant Details
-
NO_HOLIDAYS
A special calendar with no holidays and no weekends. All days are business days. It may be used to indicate that a holiday calendar does not apply. -
SATURDAY_SUNDAY
A special calendar with no holidays but with saturday and sunday as weekends.Note that not all countries use saturday and sunday weekends.
-
FRIDAY_SATURDAY
A special calendar with no holidays but with saturday and sunday as weekends.Note that not all countries use saturday and sunday weekends.
-
FRANKFURT
Frankfurt (Germany) financial district holidays.Note that 2017 was the 500th anniversary of the act by Martin Luther which stated the Reformation. In Germany, the 31st of October was a national holiday that year. More on this bbc.com article.
- See Also:
-
LONDON
London (United Kingdom) financial district holidays.- See Also:
-
NEW_YORK_FED
Federal Reserve Bank of New York holidays.- See Also:
-
NEW_YORK_SOCK_EXCHANGE
New York Stock Exchange (NYSE) holidays.- See Also:
-
PARIS
Paris (France) financial district holidays. -
SYDNEY
Sydney (Australia) financial district holidays.- See Also:
-
TARGET
The calendar for Trans-European Automated Real-time Gross settlement Express Transfer (TARGET) closing days.- See Also:
-
TOKYO
Tokyo (Japan) financial district holidays.This calendar is valid from 2007 until further notice. Last verification occurred on 2021-02-19.
- See Also:
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
isHoliday
Description copied from interface:CalendarCheck whether the given date is a public holiday. -
getHolidaysFor
Description copied from interface:CalendarGet all theHolidays matching with the given day.- Specified by:
getHolidaysForin interfaceCalendar- Parameters:
date- a non-null and unmodifiable set ofHolidays.- Returns:
trueif the given date is a holiday,falseotherwise.- See Also:
-
isBusinessDay
Description copied from interface:CalendarCheck whether the given date is a business day.- Specified by:
isBusinessDayin interfaceCalendar- Parameters:
date- a non-null date.- Returns:
trueif the given date is a business day,falseotherwise.- See Also:
-
previous
Description copied from interface:CalendarCompute the previous business day before the given date (excluded). -
next
Description copied from interface:CalendarCompute the next business day after the given date (excluded). -
holidaysWithin
Description copied from interface:CalendarCompute the holidays betweenfrom(inclusive) andto(inclusive).- Specified by:
holidaysWithinin interfaceCalendar- Parameters:
from- a non-null dateto- a non-null date- Returns:
- a non-null and unmodifiable ordered list of dates
- See Also:
-
businessDaysWithin
Description copied from interface:CalendarCompute the business days betweenfrom(inclusive) andto(inclusive).- Specified by:
businessDaysWithinin interfaceCalendar- Parameters:
from- a non-null dateto- a non-null date- Returns:
- a non-null and unmodifiable ordered list of dates
- See Also:
-