Sdílet prostřednictvím


ChronoPeriod.Between(IChronoLocalDate, IChronoLocalDate) Method

Definition

Caution

Use 'Java.Time.Chrono.IChronoPeriod.Between'. This class will be removed in a future release.

Obtains a ChronoPeriod consisting of amount of time between two dates.

[Android.Runtime.Register("between", "(Ljava/time/chrono/ChronoLocalDate;Ljava/time/chrono/ChronoLocalDate;)Ljava/time/chrono/ChronoPeriod;", "", ApiSince=26)]
[System.Obsolete("Use 'Java.Time.Chrono.IChronoPeriod.Between'. This class will be removed in a future release.")]
public static Java.Time.Chrono.IChronoPeriod? Between (Java.Time.Chrono.IChronoLocalDate? startDateInclusive, Java.Time.Chrono.IChronoLocalDate? endDateExclusive);
[<Android.Runtime.Register("between", "(Ljava/time/chrono/ChronoLocalDate;Ljava/time/chrono/ChronoLocalDate;)Ljava/time/chrono/ChronoPeriod;", "", ApiSince=26)>]
[<System.Obsolete("Use 'Java.Time.Chrono.IChronoPeriod.Between'. This class will be removed in a future release.")>]
static member Between : Java.Time.Chrono.IChronoLocalDate * Java.Time.Chrono.IChronoLocalDate -> Java.Time.Chrono.IChronoPeriod

Parameters

startDateInclusive
IChronoLocalDate

the start date, inclusive, specifying the chronology of the calculation, not null

endDateExclusive
IChronoLocalDate

the end date, exclusive, in any chronology, not null

Returns

the period between this date and the end date, not null

Attributes

Remarks

Obtains a ChronoPeriod consisting of amount of time between two dates.

The start date is included, but the end date is not. The period is calculated using ChronoLocalDate#until(ChronoLocalDate). As such, the calculation is chronology specific.

The chronology of the first date is used. The chronology of the second date is ignored, with the date being converted to the target chronology system before the calculation starts.

The result of this method can be a negative period if the end is before the start. In most cases, the positive/negative sign will be the same in each of the supported fields.

Java documentation for java.time.chrono.ChronoPeriod.between(java.time.chrono.ChronoLocalDate, java.time.chrono.ChronoLocalDate).

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