TemporalAdjusters.OfDateAdjuster(IUnaryOperator) 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.
Obtains a TemporalAdjuster
that wraps a date adjuster.
[Android.Runtime.Register("ofDateAdjuster", "(Ljava/util/function/UnaryOperator;)Ljava/time/temporal/TemporalAdjuster;", "", ApiSince=26)]
public static Java.Time.Temporal.ITemporalAdjuster? OfDateAdjuster (Java.Util.Functions.IUnaryOperator? dateBasedAdjuster);
[<Android.Runtime.Register("ofDateAdjuster", "(Ljava/util/function/UnaryOperator;)Ljava/time/temporal/TemporalAdjuster;", "", ApiSince=26)>]
static member OfDateAdjuster : Java.Util.Functions.IUnaryOperator -> Java.Time.Temporal.ITemporalAdjuster
Parameters
- dateBasedAdjuster
- IUnaryOperator
the date-based adjuster, not null
Returns
the temporal adjuster wrapping on the date adjuster, not null
- Attributes
Remarks
Obtains a TemporalAdjuster
that wraps a date adjuster.
The TemporalAdjuster
is based on the low level Temporal
interface. This method allows an adjustment from LocalDate
to LocalDate
to be wrapped to match the temporal-based interface. This is provided for convenience to make user-written adjusters simpler.
In general, user-written adjusters should be static constants:
{@code
static TemporalAdjuster TWO_DAYS_LATER =
TemporalAdjusters.ofDateAdjuster(date -> date.plusDays(2));
}
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.