DayBased

class DayBased(val days: Int) : DateTimeUnit.DateBased

A date-time unit equal to some number of calendar days.

A calendar day is not considered identical to 24 hours, thus a DayBased-unit cannot be expressed as a multiple of some TimeBased-unit.

The reason lies in time zone transitions, because of which some days can be 23 or 25 hours. For example, we say that exactly a whole day has passed between 2019-10-27T02:59 and 2019-10-28T02:59 in Berlin, despite the fact that the clocks were turned back one hour, so there are, in fact, 25 hours between the two date-times.

Constructors

Link copied to clipboard
fun DayBased(days: Int)

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open operator override fun times(scalar: Int): DateTimeUnit.DayBased

Produces a date-time unit that is a multiple of this unit times the specified integer scalar value.

Link copied to clipboard
open override fun toString(): String

Properties

Link copied to clipboard
val days: Int

The length of this unit in days.