Compare commits

..

7 Commits

5 changed files with 19 additions and 7 deletions

View File

@@ -1,5 +1,10 @@
# Changelog # Changelog
## 0.7.4
* Versions
* `Coroutines`: `1.6.3`
## 0.7.3 ## 0.7.3
* Versions * Versions

View File

@@ -4,6 +4,13 @@
[![Build Status](https://github.com/InsanusMokrassar/krontab/actions/workflows/publishing_packages.yml/badge.svg)](https://github.com/InsanusMokrassar/krontab/actions/workflows/publishing_packages.yml) [![Build Status](https://github.com/InsanusMokrassar/krontab/actions/workflows/publishing_packages.yml/badge.svg)](https://github.com/InsanusMokrassar/krontab/actions/workflows/publishing_packages.yml)
[![KDocs](https://raw.githubusercontent.com/InsanusMokrassar/badges/master/kdocs.svg)](https://krontab.inmo.dev/index.html) [![KDocs](https://raw.githubusercontent.com/InsanusMokrassar/badges/master/kdocs.svg)](https://krontab.inmo.dev/index.html)
![JVM](https://img.shields.io/badge/JVM-red?style=for-the-badge&logo=openjdk&logoColor=white)
![Android](https://img.shields.io/badge/Android-green?style=for-the-badge&logo=android&logoColor=white)
![Js](https://img.shields.io/badge/JavaScript-323330?style=for-the-badge&logo=javascript&logoColor=F7DF1E)
[![KDocs](https://img.shields.io/badge/KDocs-323330?style=for-the-badge&logo=Kotlin&logoColor=7F52FF)](https://krontab.inmo.dev/index.html)
[![Tutorials](https://img.shields.io/badge/Tutorials-0288D1?style=for-the-badge&logo=bookstack&logoColor=white)](https://bookstack.inmo.dev/books/krontab)
Library was created to give oppotunity to launch some things from time to time according to some schedule in Library was created to give oppotunity to launch some things from time to time according to some schedule in
runtime of applications. runtime of applications.

View File

@@ -9,7 +9,7 @@ android.enableJetifier=false
kotlin_version=1.6.21 kotlin_version=1.6.21
kotlin_coroutines_version=1.6.1 kotlin_coroutines_version=1.6.3
dokka_version=1.6.21 dokka_version=1.6.21
@@ -17,7 +17,7 @@ klockVersion=2.7.0
## Github reease ## Github reease
github_release_plugin_version=2.3.7 github_release_plugin_version=2.4.1
## Android ## Android
@@ -33,5 +33,5 @@ androidx_work_version=2.7.1
## Common ## Common
version=0.7.3 version=0.7.4
android_code_version=14 android_code_version=15

View File

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

View File

@@ -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 InfinityLoopCheckTest { class CheckMonthsAndDaysCorrectWork {
@Test @Test
fun absenceOfInfinityLoopCheckTest() { fun checkMonthsAndDaysCorrectWork() {
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)