Added in API level 24

DateInterval

class DateInterval : Serializable
kotlin.Any
   ↳ android.icu.util.DateInterval

This class represents date interval. It is a pair of long representing from date 1 to date 2.

Summary

Public constructors
DateInterval(from: Long, to: Long)

Constructor given from date and to date.

Public methods
Boolean
equals(other: Any?)

Override equals

Long

Get the from date.

Long

Get the to date.

Int

Override hashcode

String

Override toString

Public constructors

DateInterval

Added in API level 24
DateInterval(
    from: Long,
    to: Long)

Constructor given from date and to date.

Parameters
from Long: The from date in date interval.
to Long: The to date in date interval.

Public methods

equals

Added in API level 24
fun equals(other: Any?): Boolean

Override equals

Parameters
obj the reference object with which to compare.
Return
Boolean true if this object is the same as the obj argument; false otherwise.

getFromDate

Added in API level 24
fun getFromDate(): Long

Get the from date.

Return
Long the from date in dateInterval.

getToDate

Added in API level 24
fun getToDate(): Long

Get the to date.

Return
Long the to date in dateInterval.

hashCode

Added in API level 24
fun hashCode(): Int

Override hashcode

Return
Int a hash code value for this object.

toString

Added in API level 24
fun toString(): String

Override toString

Return
String a string representation of the object.