mirror of
https://github.com/InsanusMokrassar/krontab.git
synced 2024-12-05 00:10:14 +00:00
Compare commits
No commits in common. "681043db5a015b523860f762c7887018d27d067e" and "9ea8194d7d03de513da40102d85b96d4083be6bb" have entirely different histories.
681043db5a
...
9ea8194d7d
@ -101,7 +101,7 @@ internal fun NearDateTimeCalculatorDays(
|
|||||||
times: Array<Byte>
|
times: Array<Byte>
|
||||||
) = CommonNearDateTimeCalculator(
|
) = CommonNearDateTimeCalculator(
|
||||||
times,
|
times,
|
||||||
{ (it.dayOfMonth - 1).toByte() }, // index1, so, decrease
|
{ (it.dayOfMonth - 1).toByte() },
|
||||||
{ dateTime, newOne ->
|
{ dateTime, newOne ->
|
||||||
val dateTime = (if (newOne < dateTime.dayOfMonth) {
|
val dateTime = (if (newOne < dateTime.dayOfMonth) {
|
||||||
dateTime.plus(1.months)
|
dateTime.plus(1.months)
|
||||||
|
@ -5,9 +5,9 @@ import com.soywiz.klock.days
|
|||||||
import dev.inmo.krontab.buildSchedule
|
import dev.inmo.krontab.buildSchedule
|
||||||
import kotlin.test.*
|
import kotlin.test.*
|
||||||
|
|
||||||
class CheckMonthsAndDaysCorrectWork {
|
class InfinityLoopCheckTest {
|
||||||
@Test
|
@Test
|
||||||
fun checkMonthsAndDaysCorrectWork() {
|
fun absenceOfInfinityLoopCheckTest() {
|
||||||
val now = DateTime.now().startOfYear.startOfDay
|
val now = DateTime.now().startOfYear.startOfDay
|
||||||
for (i in 0 until now.year.days) {
|
for (i in 0 until now.year.days) {
|
||||||
val scheduleDateTime = (now + i.days)
|
val scheduleDateTime = (now + i.days)
|
Loading…
Reference in New Issue
Block a user