Adds or subtracts the specified amount of time to the given calendar field, based on the calendar's rules. For example, to subtract 5 days from the current time of the calendar, you can achieve it by calling:
add(Calendar.DAY_OF_MONTH, -5)
.
field | the calendar field. | |
amount | the amount of date or time to be added to the field. |
roll(int,int), set(int,int)
Diagram: Calendar