public final class PeriodAdditionConventions extends Object
The purpose of each convention is to define how to handle the addition of a period. The default implementations include two different end-of-month rules. The convention is generally only applicable for month-based periods.
Modifier and Type | Field and Description |
---|---|
static PeriodAdditionConvention |
LAST_BUSINESS_DAY
Convention applying a last business day of month rule.
|
static PeriodAdditionConvention |
LAST_DAY
Convention applying a last day of month rule, ignoring business days.
|
static PeriodAdditionConvention |
NONE
No specific rule applies.
|
public static final PeriodAdditionConvention NONE
Given a date, the specified period is added using standard date arithmetic. The business day adjustment is applied to produce the final result.
For example, adding a period of 1 month to June 30th will result in July 30th.
public static final PeriodAdditionConvention LAST_DAY
Given a date, the specified period is added using standard date arithmetic, shifting to the end-of-month if the base date is the last day of the month. The business day adjustment is applied to produce the final result. Note that this rule is based on the last day of the month, not the last business day of the month.
For example, adding a period of 1 month to June 30th will result in July 31st.
public static final PeriodAdditionConvention LAST_BUSINESS_DAY
Given a date, the specified period is added using standard date arithmetic, shifting to the last business day of the month if the base date is the last business day of the month. The business day adjustment is applied to produce the final result.
For example, adding a period of 1 month to June 29th will result in July 31st assuming that June 30th is not a valid business day and July 31st is.
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.