/** * Returns a copy of this month-day plus the specified number of months. * <p> * This month-day instance is immutable and unaffected by this method call. * The month will wrap at the end of the year from December to January. * The day will be adjusted to the last valid value if necessary. * <p> * The following three lines are identical in effect: * <pre> * MonthDay added = md.plusMonths(6); * MonthDay added = md.plus(Period.months(6)); * MonthDay added = md.withFieldAdded(DurationFieldType.months(), 6); * </pre> * * @param months the amount of months to add, may be negative * @return the new month-day plus the increased months, never null */ public MonthDay plusMonths(int months) { return withFieldAdded(DurationFieldType.months(), months); }
/** * Returns a copy of this month-day plus the specified number of days. * <p> * This month-day instance is immutable and unaffected by this method call. * The month will wrap at the end of the year from December to January. * <p> * If the number of days added requires wrapping past the end of February, * the wrapping will be calculated assuming February has 29 days. * <p> * The following three lines are identical in effect: * <pre> * MonthDay added = md.plusDays(6); * MonthDay added = md.plus(Period.days(6)); * MonthDay added = md.withFieldAdded(DurationFieldType.days(), 6); * </pre> * * @param days the amount of days to add, may be negative * @return the new month-day plus the increased days, never null */ public MonthDay plusDays(int days) { return withFieldAdded(DurationFieldType.days(), days); }
/** * Returns a copy of this month-day plus the specified number of months. * <p> * This month-day instance is immutable and unaffected by this method call. * The month will wrap at the end of the year from December to January. * The day will be adjusted to the last valid value if necessary. * <p> * The following three lines are identical in effect: * <pre> * MonthDay added = md.plusMonths(6); * MonthDay added = md.plus(Period.months(6)); * MonthDay added = md.withFieldAdded(DurationFieldType.months(), 6); * </pre> * * @param months the amount of months to add, may be negative * @return the new month-day plus the increased months, never null */ public MonthDay plusMonths(int months) { return withFieldAdded(DurationFieldType.months(), months); }
/** * Returns a copy of this month-day plus the specified number of days. * <p> * This month-day instance is immutable and unaffected by this method call. * The month will wrap at the end of the year from December to January. * <p> * If the number of days added requires wrapping past the end of February, * the wrapping will be calculated assuming February has 29 days. * <p> * The following three lines are identical in effect: * <pre> * MonthDay added = md.plusDays(6); * MonthDay added = md.plus(Period.days(6)); * MonthDay added = md.withFieldAdded(DurationFieldType.days(), 6); * </pre> * * @param days the amount of days to add, may be negative * @return the new month-day plus the increased days, never null */ public MonthDay plusDays(int days) { return withFieldAdded(DurationFieldType.days(), days); }
/** * Returns a copy of this month-day minus the specified number of months. * <p> * This month-day instance is immutable and unaffected by this method call. * The month will wrap at the end of the year from January to December. * <p> * The following three lines are identical in effect: * <pre> * MonthDay subtracted = md.minusDays(6); * MonthDay subtracted = md.minus(Period.days(6)); * MonthDay subtracted = md.withFieldAdded(DurationFieldType.days(), -6); * </pre> * * @param days the amount of days to subtract, may be negative * @return the new month-day minus the increased days, never null */ public MonthDay minusDays(int days) { return withFieldAdded(DurationFieldType.days(), FieldUtils.safeNegate(days)); }
/** * Returns a copy of this month-day minus the specified number of months. * <p> * This MonthDay instance is immutable and unaffected by this method call. * The month will wrap at the end of the year from January to December. * The day will be adjusted to the last valid value if necessary. * <p> * The following three lines are identical in effect: * <pre> * MonthDay subtracted = md.minusMonths(6); * MonthDay subtracted = md.minus(Period.months(6)); * MonthDay subtracted = md.withFieldAdded(DurationFieldType.months(), -6); * </pre> * * @param months the amount of months to subtract, may be negative * @return the new month-day minus the increased months, never null */ public MonthDay minusMonths(int months) { return withFieldAdded(DurationFieldType.months(), FieldUtils.safeNegate(months)); }
/** * Returns a copy of this month-day minus the specified number of months. * <p> * This month-day instance is immutable and unaffected by this method call. * The month will wrap at the end of the year from January to December. * <p> * The following three lines are identical in effect: * <pre> * MonthDay subtracted = md.minusDays(6); * MonthDay subtracted = md.minus(Period.days(6)); * MonthDay subtracted = md.withFieldAdded(DurationFieldType.days(), -6); * </pre> * * @param days the amount of days to subtract, may be negative * @return the new month-day minus the increased days, never null */ public MonthDay minusDays(int days) { return withFieldAdded(DurationFieldType.days(), FieldUtils.safeNegate(days)); }
/** * Returns a copy of this month-day minus the specified number of months. * <p> * This MonthDay instance is immutable and unaffected by this method call. * The month will wrap at the end of the year from January to December. * The day will be adjusted to the last valid value if necessary. * <p> * The following three lines are identical in effect: * <pre> * MonthDay subtracted = md.minusMonths(6); * MonthDay subtracted = md.minus(Period.months(6)); * MonthDay subtracted = md.withFieldAdded(DurationFieldType.months(), -6); * </pre> * * @param months the amount of months to subtract, may be negative * @return the new month-day minus the increased months, never null */ public MonthDay minusMonths(int months) { return withFieldAdded(DurationFieldType.months(), FieldUtils.safeNegate(months)); }
/** * Returns a copy of this month-day plus the specified number of days. * <p> * This month-day instance is immutable and unaffected by this method call. * The month will wrap at the end of the year from December to January. * <p> * The following three lines are identical in effect: * <pre> * MonthDay added = md.plusDays(6); * MonthDay added = md.plus(Period.days(6)); * MonthDay added = md.withFieldAdded(DurationFieldType.days(), 6); * </pre> * * @param days the amount of days to add, may be negative * @return the new month-day plus the increased days, never null */ public MonthDay plusDays(int days) { return withFieldAdded(DurationFieldType.days(), days); }
/** * Returns a copy of this month-day plus the specified number of months. * <p> * This month-day instance is immutable and unaffected by this method call. * The month will wrap at the end of the year from December to January. * The day will be adjusted to the last valid value if necessary. * <p> * The following three lines are identical in effect: * <pre> * MonthDay added = md.plusMonths(6); * MonthDay added = md.plus(Period.months(6)); * MonthDay added = md.withFieldAdded(DurationFieldType.months(), 6); * </pre> * * @param months the amount of months to add, may be negative * @return the new month-day plus the increased months, never null */ public MonthDay plusMonths(int months) { return withFieldAdded(DurationFieldType.months(), months); }
/** * Returns a copy of this month-day minus the specified number of months. * <p> * This month-day instance is immutable and unaffected by this method call. * The month will wrap at the end of the year from January to December. * <p> * The following three lines are identical in effect: * <pre> * MonthDay subtracted = md.minusDays(6); * MonthDay subtracted = md.minus(Period.days(6)); * MonthDay subtracted = md.withFieldAdded(DurationFieldType.days(), -6); * </pre> * * @param days the amount of days to subtract, may be negative * @return the new month-day minus the increased days, never null */ public MonthDay minusDays(int days) { return withFieldAdded(DurationFieldType.days(), FieldUtils.safeNegate(days)); }
/** * Returns a copy of this month-day minus the specified number of months. * <p> * This MonthDay instance is immutable and unaffected by this method call. * The month will wrap at the end of the year from January to December. * The day will be adjusted to the last valid value if necessary. * <p> * The following three lines are identical in effect: * <pre> * MonthDay subtracted = md.minusMonths(6); * MonthDay subtracted = md.minus(Period.months(6)); * MonthDay subtracted = md.withFieldAdded(DurationFieldType.months(), -6); * </pre> * * @param months the amount of months to subtract, may be negative * @return the new month-day minus the increased months, never null */ public MonthDay minusMonths(int months) { return withFieldAdded(DurationFieldType.months(), FieldUtils.safeNegate(months)); }
/** * Returns a copy of this month-day plus the specified number of days. * <p> * This month-day instance is immutable and unaffected by this method call. * The month will wrap at the end of the year from December to January. * <p> * The following three lines are identical in effect: * <pre> * MonthDay added = md.plusDays(6); * MonthDay added = md.plus(Period.days(6)); * MonthDay added = md.withFieldAdded(DurationFieldType.days(), 6); * </pre> * * @param days the amount of days to add, may be negative * @return the new month-day plus the increased days, never null */ public MonthDay plusDays(int days) { return withFieldAdded(DurationFieldType.days(), days); }
/** * Returns a copy of this month-day plus the specified number of days. * <p> * This month-day instance is immutable and unaffected by this method call. * The month will wrap at the end of the year from December to January. * <p> * The following three lines are identical in effect: * <pre> * MonthDay added = md.plusDays(6); * MonthDay added = md.plus(Period.days(6)); * MonthDay added = md.withFieldAdded(DurationFieldType.days(), 6); * </pre> * * @param days the amount of days to add, may be negative * @return the new month-day plus the increased days, never null */ public MonthDay plusDays(int days) { return withFieldAdded(DurationFieldType.days(), days); }
/** * Returns a copy of this month-day plus the specified number of days. * <p> * This month-day instance is immutable and unaffected by this method call. * The month will wrap at the end of the year from December to January. * <p> * The following three lines are identical in effect: * <pre> * MonthDay added = md.plusDays(6); * MonthDay added = md.plus(Period.days(6)); * MonthDay added = md.withFieldAdded(DurationFieldType.days(), 6); * </pre> * * @param days the amount of days to add, may be negative * @return the new month-day plus the increased days, never null */ public MonthDay plusDays(int days) { return withFieldAdded(DurationFieldType.days(), days); }
/** * Returns a copy of this month-day plus the specified number of days. * <p> * This month-day instance is immutable and unaffected by this method call. * The month will wrap at the end of the year from December to January. * <p> * The following three lines are identical in effect: * <pre> * MonthDay added = md.plusDays(6); * MonthDay added = md.plus(Period.days(6)); * MonthDay added = md.withFieldAdded(DurationFieldType.days(), 6); * </pre> * * @param days the amount of days to add, may be negative * @return the new month-day plus the increased days, never null */ public MonthDay plusDays(int days) { return withFieldAdded(DurationFieldType.days(), days); }
/** * Returns a copy of this month-day minus the specified number of months. * <p> * This month-day instance is immutable and unaffected by this method call. * The month will wrap at the end of the year from January to December. * <p> * The following three lines are identical in effect: * <pre> * MonthDay subtracted = md.minusDays(6); * MonthDay subtracted = md.minus(Period.days(6)); * MonthDay subtracted = md.withFieldAdded(DurationFieldType.days(), -6); * </pre> * * @param days the amount of days to subtract, may be negative * @return the new month-day minus the increased days, never null */ public MonthDay minusDays(int days) { return withFieldAdded(DurationFieldType.days(), FieldUtils.safeNegate(days)); }
/** * Returns a copy of this month-day minus the specified number of months. * <p> * This month-day instance is immutable and unaffected by this method call. * The month will wrap at the end of the year from January to December. * <p> * The following three lines are identical in effect: * <pre> * MonthDay subtracted = md.minusDays(6); * MonthDay subtracted = md.minus(Period.days(6)); * MonthDay subtracted = md.withFieldAdded(DurationFieldType.days(), -6); * </pre> * * @param days the amount of days to subtract, may be negative * @return the new month-day minus the increased days, never null */ public MonthDay minusDays(int days) { return withFieldAdded(DurationFieldType.days(), FieldUtils.safeNegate(days)); }
/** * Returns a copy of this month-day minus the specified number of months. * <p> * This month-day instance is immutable and unaffected by this method call. * The month will wrap at the end of the year from January to December. * <p> * The following three lines are identical in effect: * <pre> * MonthDay subtracted = md.minusDays(6); * MonthDay subtracted = md.minus(Period.days(6)); * MonthDay subtracted = md.withFieldAdded(DurationFieldType.days(), -6); * </pre> * * @param days the amount of days to subtract, may be negative * @return the new month-day minus the increased days, never null */ public MonthDay minusDays(int days) { return withFieldAdded(DurationFieldType.days(), FieldUtils.safeNegate(days)); }
/** * Returns a copy of this month-day minus the specified number of months. * <p> * This month-day instance is immutable and unaffected by this method call. * The month will wrap at the end of the year from January to December. * <p> * The following three lines are identical in effect: * <pre> * MonthDay subtracted = md.minusDays(6); * MonthDay subtracted = md.minus(Period.days(6)); * MonthDay subtracted = md.withFieldAdded(DurationFieldType.days(), -6); * </pre> * * @param days the amount of days to subtract, may be negative * @return the new month-day minus the increased days, never null */ public MonthDay minusDays(int days) { return withFieldAdded(DurationFieldType.days(), FieldUtils.safeNegate(days)); }