DatePeriod

A special case of DateTimePeriod that only stores date components and has all time components equal to zero.

A DatePeriod is automatically returned from all constructor functions for DateTimePeriod if it turns out that the time components are zero.

DatePeriod values are used in operations on LocalDates and are returned from operations on LocalDates, but they also can be passed anywhere a DateTimePeriod is expected.

Constructors

Link copied to clipboard
constructor(years: Int = 0, months: Int = 0, days: Int = 0)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override val days: Int

The number of calendar days.

Link copied to clipboard
open override val hours: Int

The number of whole hours in this period. Always equal to zero.

Link copied to clipboard
open override val minutes: Int

The number of whole minutes in this period. Always equal to zero.

Link copied to clipboard
open override val nanoseconds: Int

The number of nanoseconds in this period. Always equal to zero.

Link copied to clipboard
open override val seconds: Int

The number of whole seconds in this period. Always equal to zero.

Functions

Link copied to clipboard
operator fun DatePeriod.plus(other: DatePeriod): DatePeriod

Adds two DatePeriod instances.

Link copied to clipboard