Home | History | Annotate | Download | only in i18n

Lines Matching full:amount

185 * Add a signed amount to a specified field, using this calendar's rules.
205 * @param amount the amount to add to the field.
211 void HebrewCalendar::add(UCalendarDateFields field, int32_t amount, UErrorCode& status)
219 // We can't just do a set(MONTH, get(MONTH) + amount). The
220 // reason is ADAR_1. Suppose amount is +2 and we land in
222 // if amount is -2 and we land in ADAR_1, then we have to
227 if (amount > 0) {
229 month += amount;
243 month += amount;
263 Calendar::add(field, amount, status);
271 void HebrewCalendar::add(EDateFields field, int32_t amount, UErrorCode& status)
273 add((UCalendarDateFields)field, amount, status);
277 * Rolls (up/down) a specified amount time on the given field. For
302 * @param amount the amount by which the field should be rolled.
308 void HebrewCalendar::roll(UCalendarDateFields field, int32_t amount, UErrorCode& status)
321 int32_t newMonth = month + (amount % yearLength);
327 if (amount > 0 && month < ADAR_1 && newMonth >= ADAR_1) {
329 } else if (amount < 0 && month > ADAR_1 && newMonth <= ADAR_1) {
338 Calendar::roll(field, amount, status);
342 void HebrewCalendar::roll(EDateFields field, int32_t amount, UErrorCode& status) {
343 roll((UCalendarDateFields)field, amount, status);