Language

DateFormat.Field.OfCalendarField(Int32) Method

Definition

Returns the DateFormat.Field instance for the given calendar field.

[Android.Runtime.Register("ofCalendarField", "(I)Ljava/text/DateFormat$Field;", "")]
public static Java.Text.DateFormat.Field OfCalendarField(int calendarField);
[<Android.Runtime.Register("ofCalendarField", "(I)Ljava/text/DateFormat$Field;", "")>]
static member OfCalendarField : int -> Java.Text.DateFormat.Field

Parameters

calendarField
Int32

a calendar field constant.

Returns

Field instance representing calendarField.

Attributes

Exceptions

if calendarField is negative or greater than the field count of Calendar.

Remarks

Returns the Field constant that corresponds to the Calendar constant calendarField. If there is no direct mapping between the Calendar constant and a Field, null is returned.

Java reference for java.text.DateFormat.Field.ofCalendarField.

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