Share via


IChronoLocalDate.ITemporalAdjuster.AdjustInto(ITemporal) Method

Definition

Adjusts the specified temporal object to have the same date as this object.

[Android.Runtime.Register("adjustInto", "(Ljava/time/temporal/Temporal;)Ljava/time/temporal/Temporal;", "GetAdjustInto_Ljava_time_temporal_Temporal_Handler:Java.Time.Chrono.IChronoLocalDate, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)]
override sealed Java.Time.Temporal.ITemporal? ITemporalAdjuster.AdjustInto (Java.Time.Temporal.ITemporal? temporal);
[<Android.Runtime.Register("adjustInto", "(Ljava/time/temporal/Temporal;)Ljava/time/temporal/Temporal;", "GetAdjustInto_Ljava_time_temporal_Temporal_Handler:Java.Time.Chrono.IChronoLocalDate, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)>]
abstract member Java.Time.Temporal.ITemporalAdjuster.AdjustInto : Java.Time.Temporal.ITemporal -> Java.Time.Temporal.ITemporal
override this.Java.Time.Temporal.ITemporalAdjuster.AdjustInto : Java.Time.Temporal.ITemporal -> Java.Time.Temporal.ITemporal

Parameters

temporal
ITemporal

the target object to be adjusted, not null

Returns

the adjusted object, not null

Implements

Attributes

Remarks

Adjusts the specified temporal object to have the same date as this object.

This returns a temporal object of the same observable type as the input with the date changed to be the same as this.

The adjustment is equivalent to using Temporal#with(TemporalField, long) passing ChronoField#EPOCH_DAY as the field.

In most cases, it is clearer to reverse the calling pattern by using Temporal#with(TemporalAdjuster):

// these two lines are equivalent, but the second approach is recommended
              temporal = thisLocalDate.adjustInto(temporal);
              temporal = temporal.with(thisLocalDate);

This instance is immutable and unaffected by this method call.

Java documentation for java.time.chrono.ChronoLocalDate.adjustInto(java.time.temporal.Temporal).

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