Share via


WeekFields.DayOfWeek Method

Definition

Returns a field to access the day of week based on this WeekFields.

[Android.Runtime.Register("dayOfWeek", "()Ljava/time/temporal/TemporalField;", "", ApiSince=26)]
public Java.Time.Temporal.ITemporalField? DayOfWeek ();
[<Android.Runtime.Register("dayOfWeek", "()Ljava/time/temporal/TemporalField;", "", ApiSince=26)>]
member this.DayOfWeek : unit -> Java.Time.Temporal.ITemporalField

Returns

a field providing access to the day-of-week with localized numbering, not null

Attributes

Remarks

Returns a field to access the day of week based on this WeekFields.

This is similar to ChronoField#DAY_OF_WEEK but uses values for the day-of-week based on this WeekFields. The days are numbered from 1 to 7 where the #getFirstDayOfWeek() first day-of-week is assigned the value 1.

For example, if the first day-of-week is Sunday, then that will have the value 1, with other days ranging from Monday as 2 to Saturday as 7.

In the resolving phase of parsing, a localized day-of-week will be converted to a standardized ChronoField day-of-week. The day-of-week must be in the valid range 1 to 7. Other fields in this class build dates using the standardized day-of-week.

Java documentation for java.time.temporal.WeekFields.dayOfWeek().

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