TemporalAdjusters.NextOrSame(DayOfWeek) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns the next-or-same day-of-week adjuster, which adjusts the date to the first occurrence of the specified day-of-week after the date being adjusted unless it is already on that day in which case the same object is returned.
[Android.Runtime.Register("nextOrSame", "(Ljava/time/DayOfWeek;)Ljava/time/temporal/TemporalAdjuster;", "", ApiSince=26)]
public static Java.Time.Temporal.ITemporalAdjuster? NextOrSame (Java.Time.DayOfWeek? dayOfWeek);
[<Android.Runtime.Register("nextOrSame", "(Ljava/time/DayOfWeek;)Ljava/time/temporal/TemporalAdjuster;", "", ApiSince=26)>]
static member NextOrSame : Java.Time.DayOfWeek -> Java.Time.Temporal.ITemporalAdjuster
Parameters
- dayOfWeek
- DayOfWeek
the day-of-week to check for or move the date to, not null
Returns
the next-or-same day-of-week adjuster, not null
- Attributes
Remarks
Returns the next-or-same day-of-week adjuster, which adjusts the date to the first occurrence of the specified day-of-week after the date being adjusted unless it is already on that day in which case the same object is returned.
The ISO calendar system behaves as follows:<br> The input 2011-01-15 (a Saturday) for parameter (MONDAY) will return 2011-01-17 (two days later).<br> The input 2011-01-15 (a Saturday) for parameter (WEDNESDAY) will return 2011-01-19 (four days later).<br> The input 2011-01-15 (a Saturday) for parameter (SATURDAY) will return 2011-01-15 (same as input).
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.nextOrSame(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.