Update NearDateTimeCalculator.kt

This commit is contained in:
InsanusMokrassar 2022-06-15 14:46:12 +06:00 committed by GitHub
parent f63ed1a873
commit 681043db5a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -101,7 +101,7 @@ internal fun NearDateTimeCalculatorDays(
times: Array<Byte>
) = CommonNearDateTimeCalculator(
times,
{ (it.dayOfMonth - 1).toByte() },
{ (it.dayOfMonth - 1).toByte() }, // index1, so, decrease
{ dateTime, newOne ->
val dateTime = (if (newOne < dateTime.dayOfMonth) {
dateTime.plus(1.months)