/** * Returns a new instance with the specified number of days taken away. * <p> * This instance is immutable and unaffected by this method call. * * @param days the amount of days to take away, may be negative * @return the new period minus the specified number of days * @throws ArithmeticException if the result overflows an int */ public Days minus(int days) { return plus(FieldUtils.safeNegate(days)); }
/** * Returns a new instance with the specified number of days taken away. * <p> * This instance is immutable and unaffected by this method call. * * @param days the amount of days to take away, may be negative * @return the new period minus the specified number of days * @throws ArithmeticException if the result overflows an int */ public Days minus(int days) { return plus(FieldUtils.safeNegate(days)); }
/** * Returns a new instance with the specified number of days added. * <p> * This instance is immutable and unaffected by this method call. * * @param days the amount of days to add, may be negative, null means zero * @return the new period plus the specified number of days * @throws ArithmeticException if the result overflows an int */ public Days plus(Days days) { if (days == null) { return this; } return plus(days.getValue()); }
/** * Returns a new instance with the specified number of days added. * <p> * This instance is immutable and unaffected by this method call. * * @param days the amount of days to add, may be negative, null means zero * @return the new period plus the specified number of days * @throws ArithmeticException if the result overflows an int */ public Days plus(Days days) { if (days == null) { return this; } return plus(days.getValue()); }
/** * Returns a new instance with the specified number of days taken away. * <p> * This instance is immutable and unaffected by this method call. * * @param days the amount of days to take away, may be negative * @return the new period minus the specified number of days * @throws ArithmeticException if the result overflows an int */ public Days minus(int days) { return plus(FieldUtils.safeNegate(days)); }
/** * Returns a new instance with the specified number of days added. * <p> * This instance is immutable and unaffected by this method call. * * @param days the amount of days to add, may be negative, null means zero * @return the new period plus the specified number of days * @throws ArithmeticException if the result overflows an int */ public Days plus(Days days) { if (days == null) { return this; } return plus(days.getValue()); }
/** * Returns a new instance with the specified number of days taken away. * <p> * This instance is immutable and unaffected by this method call. * * @param days the amount of days to take away, may be negative * @return the new period minus the specified number of days * @throws ArithmeticException if the result overflows an int */ public Days minus(int days) { return plus(FieldUtils.safeNegate(days)); }
/** * Returns a new instance with the specified number of days taken away. * <p> * This instance is immutable and unaffected by this method call. * * @param days the amount of days to take away, may be negative * @return the new period minus the specified number of days * @throws ArithmeticException if the result overflows an int */ public Days minus(int days) { return plus(FieldUtils.safeNegate(days)); }
/** * Returns a new instance with the specified number of days taken away. * <p> * This instance is immutable and unaffected by this method call. * * @param days the amount of days to take away, may be negative * @return the new period minus the specified number of days * @throws ArithmeticException if the result overflows an int */ public Days minus(int days) { return plus(FieldUtils.safeNegate(days)); }
/** * Returns a new instance with the specified number of days taken away. * <p> * This instance is immutable and unaffected by this method call. * * @param days the amount of days to take away, may be negative * @return the new period minus the specified number of days * @throws ArithmeticException if the result overflows an int */ public Days minus(int days) { return plus(FieldUtils.safeNegate(days)); }
/** * Returns a new instance with the specified number of days taken away. * <p> * This instance is immutable and unaffected by this method call. * * @param days the amount of days to take away, may be negative * @return the new period minus the specified number of days * @throws ArithmeticException if the result overflows an int */ public Days minus(int days) { return plus(FieldUtils.safeNegate(days)); }
/** * Returns a new instance with the specified number of days taken away. * <p> * This instance is immutable and unaffected by this method call. * * @param days the amount of days to take away, may be negative * @return the new period minus the specified number of days * @throws ArithmeticException if the result overflows an int */ public Days minus(int days) { return plus(FieldUtils.safeNegate(days)); }
/** * Returns a new instance with the specified number of days taken away. * <p> * This instance is immutable and unaffected by this method call. * * @param days the amount of days to take away, may be negative * @return the new period minus the specified number of days * @throws ArithmeticException if the result overflows an int */ public Days minus(int days) { return plus(FieldUtils.safeNegate(days)); }
/** * Returns a new instance with the specified number of days taken away. * <p> * This instance is immutable and unaffected by this method call. * * @param days the amount of days to take away, may be negative * @return the new period minus the specified number of days * @throws ArithmeticException if the result overflows an int */ public Days minus(int days) { return plus(FieldUtils.safeNegate(days)); }
/** * Returns a new instance with the specified number of days added. * <p> * This instance is immutable and unaffected by this method call. * * @param days the amount of days to add, may be negative, null means zero * @return the new period plus the specified number of days * @throws ArithmeticException if the result overflows an int */ public Days plus(Days days) { if (days == null) { return this; } return plus(days.getValue()); }
/** * Returns a new instance with the specified number of days added. * <p> * This instance is immutable and unaffected by this method call. * * @param days the amount of days to add, may be negative, null means zero * @return the new period plus the specified number of days * @throws ArithmeticException if the result overflows an int */ public Days plus(Days days) { if (days == null) { return this; } return plus(days.getValue()); }
/** * Returns a new instance with the specified number of days added. * <p> * This instance is immutable and unaffected by this method call. * * @param days the amount of days to add, may be negative, null means zero * @return the new period plus the specified number of days * @throws ArithmeticException if the result overflows an int */ public Days plus(Days days) { if (days == null) { return this; } return plus(days.getValue()); }
/** * Returns a new instance with the specified number of days added. * <p> * This instance is immutable and unaffected by this method call. * * @param days the amount of days to add, may be negative, null means zero * @return the new period plus the specified number of days * @throws ArithmeticException if the result overflows an int */ public Days plus(Days days) { if (days == null) { return this; } return plus(days.getValue()); }
/** * Returns a new instance with the specified number of days added. * <p> * This instance is immutable and unaffected by this method call. * * @param days the amount of days to add, may be negative, null means zero * @return the new period plus the specified number of days * @throws ArithmeticException if the result overflows an int */ public Days plus(Days days) { if (days == null) { return this; } return plus(days.getValue()); }
int getPositionForDate(LocalDate date) { return getCount() - Days.daysBetween(date, LocalDate.now()) .plus(Days.ONE).getDays(); }