between
Returns the number of whole centuries between two years.
Returns the number of whole centuries between two year-months.
Returns the number of whole centuries between two dates.
Returns the number of whole centuries between two date-times, which are assumed to be in the same time zone.
Returns the number of whole centuries between two date-times, adjusting the offset of endExclusive if necessary to match the starting date-time.
Returns the number of whole centuries between two date-times, adjusting the time zone of endExclusive if necessary to match the starting date-time.
Returns the number of whole decades between two years.
Returns the number of whole decades between two year-months.
Returns the number of whole decades between two dates.
Returns the number of whole decades between two date-times, which are assumed to be in the same time zone.
Returns the number of whole decades between two date-times, adjusting the offset of endExclusive if necessary to match the starting date-time.
Returns the number of whole decades between two date-times, adjusting the time zone of endExclusive if necessary to match the starting date-time.
Returns the number of years between two years.
Returns the number of whole years between two year-months.
Returns the number of whole years between two dates.
Returns the number of whole years between two date-times, which are assumed to be in the same time zone.
Returns the number of whole years between two date-times, adjusting the offset of endExclusive if necessary to match the starting date-time.
Returns the number of whole years between date-times, adjusting the time zone of endExclusive if necessary to match the starting date-time.
Returns the number of months between two year-months.
Returns the number of whole months between two dates.
Returns the number of whole months between two date-times, which are assumed to be in the same time zone.
Returns the number of whole months between two date-times, adjusting the offset of endExclusive if necessary to match the starting date-time.
Returns the number of whole months between two zoned date-times, adjusting the time zone of endExclusive if necessary to match the starting date-time.
Returns the number of whole weeks between two dates.
Returns the number whole weeks between two date-times, which are assumed to be in the same time zone.
Returns the number whole weeks between two date-times, adjusting the offset of endExclusive if necessary to match the starting date-time.
Returns the number of whole weeks between two zoned date-times, adjusting the time zone of endExclusive if necessary to match the starting date-time.
Returns the number of days between two dates.
Returns the number whole days between two date-times, which are assumed to be in the same time zone.
Returns the number whole days between two date-times, adjusting the offset of endExclusive if necessary to match the starting date-time.
Returns the number of whole days between two zoned date-times, adjusting the time zone of endExclusive if necessary to match the starting date-time.
Returns the number of whole hours between two date-times, which are assumed to be at the same UTC offset. In general, it's more appropriate to calculate duration using Instant or ZonedDateTime as any daylight savings rules won't be taken into account when working with DateTime directly.
Returns the number of whole hours between two time points.
Returns the number of whole minutes between two date-times, which are assumed to be at the same UTC offset. In general, it's more appropriate to calculate duration using Instant or ZonedDateTime as any daylight savings rules won't be taken into account when working with DateTime directly.
Returns the number of whole minutes between two time points.
Returns the number of whole seconds between two date-times, which are assumed to be at the same UTC offset. In general, it's more appropriate to calculate duration using Instant or ZonedDateTime as any daylight savings rules won't be taken into account when working with DateTime directly.
Throws
if the result overflows
Returns the number of whole seconds between two time points.
Throws
if the result overflows
Returns the number of whole milliseconds between two date-times, which are assumed to be at the same UTC offset. In general, it's more appropriate to calculate duration using Instant or ZonedDateTime as any daylight savings rules won't be taken into account when working with DateTime directly.
Throws
if the result overflows
Returns the number of whole milliseconds between two time points.
Throws
if the result overflows
Returns the number of whole microseconds between two date-times, which are assumed to be at the same UTC offset. In general, it's more appropriate to calculate duration using Instant or ZonedDateTime as any daylight savings rules won't be taken into account when working with DateTime directly.
Throws
if the result overflows
Returns the number of whole microseconds between two time points.
Throws
if the result overflows
Returns the number of nanoseconds between two date-times, which are assumed to be at the same UTC offset. In general, it's more appropriate to calculate duration using Instant or ZonedDateTime as any daylight savings rules won't be taken into account when working with DateTime directly.
Throws
if the result overflows
Returns the number of nanoseconds between two time points.
Throws
if the result overflows
Returns the Duration between two date-times, which are assumed to be at the same UTC offset. In general, it's more appropriate to calculate duration using Instant or ZonedDateTime as any daylight savings rules won't be taken into account when working with DateTime directly.
Returns the Duration between two time points.
Returns the Period between two dates.
Returns the Period between two date-times, which are assumed to be in the same time zone.
Returns the Period between two date-times, adjusting the offset of endExclusive if necessary to match the starting date-time.
Returns the Period between two zoned date-times, adjusting the time zone of endExclusive if necessary to match the starting date-time.