public interface BusinessDayConvention extends Named
The purpose of this convention is to define how to handle non-business days. When processing dates in finance, it is typically intended that non-business days, such as weekends and holidays, are converted to a nearby valid business day. The convention, in conjunction with a holiday calendar, defines exactly how the adjustment should be made.
The most common implementations are provided in
Additional implementations may be added by implementing this interface.
All implementations of this interface must be immutable and thread-safe.
|Modifier and Type||Method and Description|
Adjusts the date as necessary if it is not a business day.
Gets the extended enum helper.
Gets the name that uniquely identifies this convention.
Obtains an instance from the specified unique name.
static BusinessDayConvention of(String uniqueName)
uniqueName- the unique name
IllegalArgumentException- if the name is not known
static ExtendedEnum<BusinessDayConvention> extendedEnum()
This helper allows instances of the convention to be looked up. It also provides the complete set of available instances.
LocalDate adjust(LocalDate date, HolidayCalendar calendar)
If the date is a business day it will be returned unaltered. If the date is not a business day, the convention will be applied.
date- the date to adjust
calendar- the calendar that defines holidays and business days
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.