다음을 통해 공유


Calendar.Add(CalendarField, Int32) Method

Definition

Adds or subtracts the specified amount of time to the given calendar field, based on the calendar's rules.

[Android.Runtime.Register("add", "(II)V", "GetAdd_IIHandler")]
public abstract void Add (Java.Util.CalendarField field, int amount);
[<Android.Runtime.Register("add", "(II)V", "GetAdd_IIHandler")>]
abstract member Add : Java.Util.CalendarField * int -> unit

Parameters

field
CalendarField

the calendar field.

amount
Int32

the amount of date or time to be added to the field.

Attributes

Exceptions

if field is DST_OFFSET or ZONE_OFFSET.

Remarks

Java documentation for java.util.Calendar.add(int, int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to