Package-level declarations

Functions

Link copied to clipboard
fun max(dateA: Date?, dateB: Date?): Date?

Returns the greater of two dates.

Link copied to clipboard
fun maxOf(vararg dates: Date?): Date?
Link copied to clipboard
fun min(dateA: Date?, dateB: Date?): Date?
Link copied to clipboard
fun minOf(vararg dates: Date?): Date?

Inherited functions

Link copied to clipboard
infix fun Date?.after(that: Date?): Boolean

Tests if this date is after that date.

Link copied to clipboard

Returns difference between this date and that date in TimeDuration.

fun Date.diff(otherTime: Long): TimeDuration

Returns difference between this date and the otherTime in TimeDuration.

Link copied to clipboard
fun Date.inOffsetWith(other: Date, offset: Long): Boolean

Check if current date has difference with other no more that offset.

Link copied to clipboard
inline fun Date?.isWithinDurationFromNow(duration: TimeDuration, now: () -> Long = { System.currentTimeMillis() }): Boolean

Returns true if the date is within the specified duration from now.

Link copied to clipboard
inline fun Date?.truncateFuture(now: () -> Long = { System.currentTimeMillis() }): Date?

Truncates the date to the current time if it's in the future.