mirror of
https://github.com/InsanusMokrassar/krontab.git
synced 2024-12-02 15:00:14 +00:00
Compare commits
2 Commits
9ea8194d7d
...
681043db5a
Author | SHA1 | Date | |
---|---|---|---|
681043db5a | |||
f63ed1a873 |
@ -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)
|
||||
|
@ -5,9 +5,9 @@ import com.soywiz.klock.days
|
||||
import dev.inmo.krontab.buildSchedule
|
||||
import kotlin.test.*
|
||||
|
||||
class InfinityLoopCheckTest {
|
||||
class CheckMonthsAndDaysCorrectWork {
|
||||
@Test
|
||||
fun absenceOfInfinityLoopCheckTest() {
|
||||
fun checkMonthsAndDaysCorrectWork() {
|
||||
val now = DateTime.now().startOfYear.startOfDay
|
||||
for (i in 0 until now.year.days) {
|
||||
val scheduleDateTime = (now + i.days)
|
Loading…
Reference in New Issue
Block a user