infix fun LocalDateTime.shouldHaveSameDayAs(date: LocalDateTime): Unit
Asserts that this day is the same as date's day
Verifies that this day is the same as date's day, ignoring any other fields. For example, 09/02/1998 10:00:00 has the same day as 09/03/2018 11:30:30, and this assertion should pass for this comparison
Opposite of LocalDateTime.shouldNotHaveSameDayAs
val firstDate = LocalDateTime.of(1998, 2, 9, 10, 0, 0)
val secondDate = LocalDateTime.of(1998, 3, 9, 11, 30, 30)
firstDate shouldHaveSameDayAs secondDate // Assertion passes
val firstDate = LocalDateTime.of(1998, 2, 9, 10, 0, 0)
val secondDate = LocalDateTime.of(1998, 2, 10, 10, 0, 0)
firstDate shouldHaveSameDayAs secondDate // Assertion fails, 9 != 10