|
|
@ -126,20 +126,20 @@ class DateUtilsTest : BaseUnitTest() {
|
|
|
|
val longMonth = GregorianCalendar(2020, Calendar.AUGUST, 1)
|
|
|
|
val longMonth = GregorianCalendar(2020, Calendar.AUGUST, 1)
|
|
|
|
|
|
|
|
|
|
|
|
assertThat(
|
|
|
|
assertThat(
|
|
|
|
DateUtils.getWeekdaysInMonth(Timestamp(february)),
|
|
|
|
arrayOf(4, 4, 4, 4, 4, 4, 4),
|
|
|
|
equalTo(arrayOf(4, 4, 4, 4, 4, 4, 4))
|
|
|
|
equalTo(DateUtils.getWeekdaysInMonth(Timestamp(february)))
|
|
|
|
)
|
|
|
|
)
|
|
|
|
assertThat(
|
|
|
|
assertThat(
|
|
|
|
DateUtils.getWeekdaysInMonth(Timestamp(leapFebruary)),
|
|
|
|
arrayOf(5, 4, 4, 4, 4, 4, 4),
|
|
|
|
equalTo(arrayOf(4, 4, 4, 4, 4, 4, 5))
|
|
|
|
equalTo(DateUtils.getWeekdaysInMonth(Timestamp(leapFebruary)))
|
|
|
|
)
|
|
|
|
)
|
|
|
|
assertThat(
|
|
|
|
assertThat(
|
|
|
|
DateUtils.getWeekdaysInMonth(Timestamp(month)),
|
|
|
|
arrayOf(4, 4, 4, 4, 5, 5, 4),
|
|
|
|
equalTo(arrayOf(4, 4, 4, 5, 5, 4, 4))
|
|
|
|
equalTo(DateUtils.getWeekdaysInMonth(Timestamp(month)))
|
|
|
|
)
|
|
|
|
)
|
|
|
|
assertThat(
|
|
|
|
assertThat(
|
|
|
|
DateUtils.getWeekdaysInMonth(Timestamp(longMonth)),
|
|
|
|
arrayOf(5, 5, 5, 4, 4, 4, 4),
|
|
|
|
equalTo(arrayOf(5, 5, 4, 4, 4, 4, 5))
|
|
|
|
equalTo(DateUtils.getWeekdaysInMonth(Timestamp(longMonth)))
|
|
|
|
)
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|