public interface BusinessdayCalendar extends Serializable
| Modifier and Type | Interface and Description |
|---|---|
static class |
BusinessdayCalendar.DateOffsetUnit |
static class |
BusinessdayCalendar.DateRollConvention |
| Modifier and Type | Method and Description |
|---|---|
LocalDate |
getAdjustedDate(LocalDate date,
BusinessdayCalendar.DateRollConvention dateRollConvention)
Get an adjusted date for a given date.
|
LocalDate |
getAdjustedDate(LocalDate baseDate,
String dateOffsetCode,
BusinessdayCalendar.DateRollConvention dateRollConvention)
Get an adjusted date for a given date and offset code.
|
LocalDate |
getDateFromDateAndOffsetCode(LocalDate baseDate,
String dateOffsetCode)
Create a new date by "adding" a year fraction to a given base date.
|
LocalDate |
getRolledDate(LocalDate baseDate,
int businessDays)
Find a new date by adding the given number of business days to a given base date.
|
boolean |
isBusinessday(LocalDate date)
Test if a given date is a businessday.
|
boolean isBusinessday(LocalDate date)
date - The given date.LocalDate getAdjustedDate(LocalDate date, BusinessdayCalendar.DateRollConvention dateRollConvention)
date - Given date to be adjusted.dateRollConvention - The date roll convention to be used for the adjustment.LocalDate getAdjustedDate(LocalDate baseDate, String dateOffsetCode, BusinessdayCalendar.DateRollConvention dateRollConvention)
baseDate - The start date.dateOffsetCode - String containing date offset codes (like 2D, 1W, 3M, etc.) or combination of them separated by spaces.dateRollConvention - The date roll convention to be used for the adjustment.LocalDate getRolledDate(LocalDate baseDate, int businessDays)
baseDate - The starting date.businessDays - The number of business days from the starting date (negative values are allowed).LocalDate getDateFromDateAndOffsetCode(LocalDate baseDate, String dateOffsetCode)
The date offset may be given by codes like 1D, 2D, 1W, 2W, 1M, 2M, 3M, 1Y, 2Y, etc., where the letters denote the units of the corresponding offset. If the date offset does not carry a letter code at the end, it will be interpreted as ACT/365 year fraction.
Date offsets can be given as (mapping to the correspondingDateOffsetUnit):
The function may be used to ease the creation of maturities in spreadsheets.
baseDate - The start date.dateOffsetCode - String containing date offset codes (like 2D, 1W, 3M, etc.) or combination of them separated by spaces.Copyright © 2019. All rights reserved.