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