Language

MonthDay.Of Method

Definition

Overloads

Name Description
Of(Month, Int32)

Obtains an instance of MonthDay.

Of(Int32, Int32)

Obtains an instance of MonthDay.

Of(Month, Int32)

Obtains an instance of MonthDay.

[Android.Runtime.Register("of", "(Ljava/time/Month;I)Ljava/time/MonthDay;", "", ApiSince=26)]
public static Java.Time.MonthDay? Of(Java.Time.Month? month, int dayOfMonth);
[<Android.Runtime.Register("of", "(Ljava/time/Month;I)Ljava/time/MonthDay;", "", ApiSince=26)>]
static member Of : Java.Time.Month * int -> Java.Time.MonthDay

Parameters

month
Month

the month-of-year to represent, not null

dayOfMonth
Int32

the day-of-month to represent, from 1 to 31

Returns

the month-day, not null

Attributes

Remarks

Obtains an instance of MonthDay. The day-of-month must be valid for the month within a leap year. Hence, for February, day 29 is valid. For example, passing in April and day 31 will throw an exception, as there can never be April 31st in any year. By contrast, passing in February 29th is permitted, as that month-day can sometimes be valid.

Java reference for java.time.MonthDay.of.

Applies to

Of(Int32, Int32)

Obtains an instance of MonthDay.

[Android.Runtime.Register("of", "(II)Ljava/time/MonthDay;", "", ApiSince=26)]
public static Java.Time.MonthDay? Of(int month, int dayOfMonth);
[<Android.Runtime.Register("of", "(II)Ljava/time/MonthDay;", "", ApiSince=26)>]
static member Of : int * int -> Java.Time.MonthDay

Parameters

month
Int32

the month-of-year to represent, from 1 (January) to 12 (December)

dayOfMonth
Int32

the day-of-month to represent, from 1 to 31

Returns

the month-day, not null

Attributes

Remarks

Obtains an instance of MonthDay. The day-of-month must be valid for the month within a leap year. Hence, for month 2 (February), day 29 is valid. For example, passing in month 4 (April) and day 31 will throw an exception, as there can never be April 31st in any year. By contrast, passing in February 29th is permitted, as that month-day can sometimes be valid.

Java reference for java.time.MonthDay.of.

Applies to