Lines Matching defs:amount

330      * Adds the specified (signed) amount of time to the given calendar field,
335 * call is <code>amount</code>, modulo any overflow that has occurred in
351 * @param amount the amount of date or time to be added to the field.
357 public void add(int field, int amount) {
358 // If amount == 0, do nothing even the given field is out of
360 if (amount == 0) {
373 d.addYear(amount);
381 d.addMonth(amount);
388 int era = internalGet(ERA) + amount;
396 long delta = amount;
400 // amount to milliseconds and call setTimeInMillis.
419 // given amount to the number of days.
432 // Convert the amount to the number of days (delta)
434 delta = amount / 2;
435 timeOfDay = 12 * (amount % 2);
490 * Adds a signed amount to the specified calendar field without changing larger fields.
491 * A negative roll amount means to subtract from field without changing
492 * larger fields. If the specified amount is 0, this method performs nothing.
495 * amount so that all the calendar fields are normalized. If there
500 * @param amount the signed amount to add to <code>field</code>.
509 public void roll(int field, int amount) {
510 // If amount == 0, do nothing even the given field is out of
512 if (amount == 0) {
543 int nh = (h + amount) % unit;
599 int n = getRolledValue(internalGet(field), amount, min, max);
623 int n = getRolledValue(internalGet(field), amount, min, max);
644 int mon = (internalGet(MONTH) + amount) % 12;
683 int n = getRolledValue(internalGet(field), amount, min, max);
708 int value = woy + amount;
767 value = getRolledValue(woy, amount, min, max) - 1;
805 int value = getRolledValue(internalGet(field), amount, 1, max) - 1;
837 int value = getRolledValue((int)(cachedFixedDate - month1), amount,
855 int value = getRolledValue(internalGet(DAY_OF_YEAR), amount, min, max);
882 amount %= 7;
883 if (amount == 0) {
888 fd += amount;
926 int value = getRolledValue(internalGet(field), amount, min, max) - 1;
934 set(field, getRolledValue(internalGet(field), amount, min, max));
2348 * Returns the new value after 'roll'ing the specified value and amount.
2350 private static final int getRolledValue(int value, int amount, int min, int max) {
2353 amount %= range;
2354 int n = value + amount;