A holiday calendar, classifying dates as holidays or business days.
Many calculations in finance require knowledge of whether a date is a business day or not. This class encapsulates that knowledge, with each day treated as a holiday or a business day. Weekends are effectively treated as a special kind of holiday.
Applications should refer to holidays using HolidayCalendarId. The identifier must be resolved to a HolidayCalendar before the holiday data methods can be accessed. See HolidayCalendarIds for a standard set of identifiers available in ReferenceData.standard().
Returns an adjuster that changes the date.
Gets the stream of business days between the two dates.
Combines this holiday calendar with another.
Calculates the number of business days between two dates.
Gets the identifier for the calendar.
Gets the name that identifies this calendar.
Gets the stream of holidays between the two dates.
Checks if the specified date is a business day.
Checks if the specified date is a holiday.
Checks if the specified date is the last business day of the month.
Calculates the last business day of the month.
Finds the next business day, always returning a later date.
Finds the next business day, returning the input date if it is a business day.
Finds the next business day within the month, returning the input date if it is a business day, or the last business day of the month if the next business day is in a different month.
Finds the previous business day, always returning an earlier date.
Finds the previous business day, returning the input date if it is a business day.
Shifts the date by the specified number of business days.
This is the opposite of isBusinessDay(LocalDate). A weekend is treated as a holiday.
This is the opposite of isHoliday(LocalDate). A weekend is treated as a holiday.
If the amount is zero, the input date is returned. If the amount is positive, later business days are chosen. If the amount is negative, earlier business days are chosen.
Given a date, this method returns the next business day.
Given a date, this method returns a business day. If the input date is a business day, it is returned. Otherwise, the next business day is returned.
Given a date, this method returns the previous business day.
Given a date, this method returns a business day. If the input date is a business day, it is returned. Otherwise, the previous business day is returned.
Given a date, this method returns a business day. If the input date is a business day, it is returned. If the next business day is within the same month, it is returned. Otherwise, the last business day of the month is returned.
Note that the result of this method may be earlier than the input date.
This corresponds to the modified following business day convention.
This returns true if the date specified is the last valid business day of the month.
Given a date, this method returns the date of the last business day of the month.
This calculates the number of business days within the range. If the dates are equal, zero is returned. If the end is before the start, an exception is thrown.
This method will treat weekends as holidays. If the dates are equal, an empty stream is returned. If the end is before the start, an exception is thrown.
The resulting calendar will declare a day as a business day if it is a business day in both source calendars.
This identifier is used to locate the index in ReferenceData.
This is the name associated with the identifier.