@Override public DaysAdjustment build() { return new DaysAdjustment( days, calendar, adjustment); }
/** * Obtains an instance that can adjust a date by a specific number of calendar days. * <p> * When adjusting a date, the specified number of calendar days is added. * Holidays and weekends are not taken into account in the calculation. * <p> * No business day adjustment is applied to the result of the addition. * * @param numberOfDays the number of days * @return the days adjustment */ public static DaysAdjustment ofCalendarDays(int numberOfDays) { return new DaysAdjustment(numberOfDays, HolidayCalendarIds.NO_HOLIDAYS, BusinessDayAdjustment.NONE); }
/** * Obtains an instance that can adjust a date by a specific number of calendar days. * <p> * When adjusting a date, the specified number of calendar days is added. * Holidays and weekends are not taken into account in the calculation. * <p> * The business day adjustment is applied to the result of the addition. * * @param numberOfDays the number of days * @param adjustment the business day adjustment to apply to the result of the addition * @return the days adjustment */ public static DaysAdjustment ofCalendarDays(int numberOfDays, BusinessDayAdjustment adjustment) { return new DaysAdjustment(numberOfDays, HolidayCalendarIds.NO_HOLIDAYS, adjustment); }
/** * Obtains an instance that can adjust a date by a specific number of business days. * <p> * When adjusting a date, the specified number of business days is added. * This is equivalent to repeatedly finding the next business day. * <p> * No business day adjustment is applied to the result of the addition. * * @param numberOfDays the number of days * @param holidayCalendar the calendar that defines holidays and business days * @return the days adjustment */ public static DaysAdjustment ofBusinessDays(int numberOfDays, HolidayCalendarId holidayCalendar) { return new DaysAdjustment(numberOfDays, holidayCalendar, BusinessDayAdjustment.NONE); }
/** * Obtains an instance that can adjust a date by a specific number of business days. * <p> * When adjusting a date, the specified number of business days is added. * This is equivalent to repeatedly finding the next business day. * <p> * The business day adjustment is applied to the result of the addition. * * @param numberOfDays the number of days * @param holidayCalendar the calendar that defines holidays and business days * @param adjustment the business day adjustment to apply to the result of the addition * @return the days adjustment */ public static DaysAdjustment ofBusinessDays( int numberOfDays, HolidayCalendarId holidayCalendar, BusinessDayAdjustment adjustment) { return new DaysAdjustment(numberOfDays, holidayCalendar, adjustment); }