Share via


TemporalAdjusters.Previous(DayOfWeek) Method

Definition

Returns the previous day-of-week adjuster, which adjusts the date to the first occurrence of the specified day-of-week before the date being adjusted.

[Android.Runtime.Register("previous", "(Ljava/time/DayOfWeek;)Ljava/time/temporal/TemporalAdjuster;", "", ApiSince=26)]
public static Java.Time.Temporal.ITemporalAdjuster? Previous (Java.Time.DayOfWeek? dayOfWeek);
[<Android.Runtime.Register("previous", "(Ljava/time/DayOfWeek;)Ljava/time/temporal/TemporalAdjuster;", "", ApiSince=26)>]
static member Previous : Java.Time.DayOfWeek -> Java.Time.Temporal.ITemporalAdjuster

Parameters

dayOfWeek
DayOfWeek

the day-of-week to move the date to, not null

Returns

the previous day-of-week adjuster, not null

Attributes

Remarks

Returns the previous day-of-week adjuster, which adjusts the date to the first occurrence of the specified day-of-week before the date being adjusted.

The ISO calendar system behaves as follows:<br> The input 2011-01-15 (a Saturday) for parameter (MONDAY) will return 2011-01-10 (five days earlier).<br> The input 2011-01-15 (a Saturday) for parameter (WEDNESDAY) will return 2011-01-12 (three days earlier).<br> The input 2011-01-15 (a Saturday) for parameter (SATURDAY) will return 2011-01-08 (seven days earlier).

The behavior is suitable for use with most calendar systems. It uses the DAY_OF_WEEK field and the DAYS unit, and assumes a seven day week.

Java documentation for java.time.temporal.TemporalAdjusters.previous(java.time.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