isSameDay

infix fun Calendar.isSameDay(date: Calendar): Boolean
infix fun LocalDateTime.isSameDay(date: LocalDateTime): Boolean

Two days are considered to be the same if they have the same day.

Since

1.1.0


infix fun Date.isSameDay(date: Date): Boolean

Two days are considered to be the same if they have the same day.

Example:

val date1 = Date()
val date2 = Date()
date1 isSameDay date2 // true

Since

1.1.0


infix fun Instant.isSameDay(date: Instant): Boolean
infix fun LocalDate.isSameDay(date: LocalDate): Boolean

Two days are considered to be the same if they have the same day.

Example:

val date1 = now()
val date2 = now()
date1 isSameDay date2 // true

Since

1.1.0

See also