WeekFields.Of Method

Definition

Overloads

Of(Locale)

Obtains an instance of WeekFields appropriate for a locale.

Of(DayOfWeek, Int32)

Obtains an instance of WeekFields from the first day-of-week and minimal days.

Of(Locale)

Obtains an instance of WeekFields appropriate for a locale.

[Android.Runtime.Register("of", "(Ljava/util/Locale;)Ljava/time/temporal/WeekFields;", "", ApiSince=26)]
public static Java.Time.Temporal.WeekFields? Of (Java.Util.Locale? locale);
[<Android.Runtime.Register("of", "(Ljava/util/Locale;)Ljava/time/temporal/WeekFields;", "", ApiSince=26)>]
static member Of : Java.Util.Locale -> Java.Time.Temporal.WeekFields

Parameters

locale
Locale

the locale to use, not null

Returns

the week-definition, not null

Attributes

Remarks

Obtains an instance of WeekFields appropriate for a locale.

This will look up appropriate values from the provider of localization data. Since Android 13, if the locale contains "fw" (First day of week)

Unicode extensions, returned instance will reflect the values specified with those extensions.

Java documentation for java.time.temporal.WeekFields.of(java.util.Locale).

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

Of(DayOfWeek, Int32)

Obtains an instance of WeekFields from the first day-of-week and minimal days.

[Android.Runtime.Register("of", "(Ljava/time/DayOfWeek;I)Ljava/time/temporal/WeekFields;", "", ApiSince=26)]
public static Java.Time.Temporal.WeekFields? Of (Java.Time.DayOfWeek? firstDayOfWeek, int minimalDaysInFirstWeek);
[<Android.Runtime.Register("of", "(Ljava/time/DayOfWeek;I)Ljava/time/temporal/WeekFields;", "", ApiSince=26)>]
static member Of : Java.Time.DayOfWeek * int -> Java.Time.Temporal.WeekFields

Parameters

firstDayOfWeek
DayOfWeek

the first day of the week, not null

minimalDaysInFirstWeek
Int32

the minimal number of days in the first week, from 1 to 7

Returns

the week-definition, not null

Attributes

Remarks

Obtains an instance of WeekFields from the first day-of-week and minimal days.

The first day-of-week defines the ISO DayOfWeek that is day 1 of the week. The minimal number of days in the first week defines how many days must be present in a month or year, starting from the first day-of-week, before the week is counted as the first week. A value of 1 will count the first day of the month or year as part of the first week, whereas a value of 7 will require the whole seven days to be in the new month or year.

WeekFields instances are singletons; for each unique combination of firstDayOfWeek and minimalDaysInFirstWeek the same instance will be returned.

Java documentation for java.time.temporal.WeekFields.of(java.time.DayOfWeek, 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