Class PeriodAdditionConventions


  • public final class PeriodAdditionConventions
    extends Object
    Constants and implementations for standard period addition conventions.

    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.

    • Field Detail

      • NONE

        public static final PeriodAdditionConvention NONE
        No specific rule applies.

        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.

      • LAST_DAY

        public static final PeriodAdditionConvention LAST_DAY
        Convention applying a last day of month rule, ignoring business days.

        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.

      • LAST_BUSINESS_DAY

        public static final PeriodAdditionConvention LAST_BUSINESS_DAY
        Convention applying a last business day of month rule.

        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.