From 93b56c0861be91ad17efae42f78bbf2f3da4359e Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Mon, 18 Sep 2023 14:12:49 +0600 Subject: [PATCH 1/4] start 2.2.1 --- CHANGELOG.md | 2 ++ gradle.properties | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e3d8af..7c19e4e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ # Changelog +## 2.2.1 + ## 2.2.0 * Versions diff --git a/gradle.properties b/gradle.properties index 10116fa..4399bc3 100644 --- a/gradle.properties +++ b/gradle.properties @@ -36,5 +36,5 @@ androidx_work_version=2.8.1 ## Common -version=2.2.0 -android_code_version=30 +version=2.2.1 +android_code_version=31 From c406f883d2b2c0b1ec79bd78c7cd622c6bf8cd9f Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Mon, 18 Sep 2023 14:15:20 +0600 Subject: [PATCH 2/4] potential fix of #65 --- CHANGELOG.md | 2 ++ src/commonMain/kotlin/internal/NearDateTimeCalculator.kt | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7c19e4e..160e6cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## 2.2.1 +* Potential fix of [#65](https://github.com/InsanusMokrassar/krontab/issues/65) + ## 2.2.0 * Versions diff --git a/src/commonMain/kotlin/internal/NearDateTimeCalculator.kt b/src/commonMain/kotlin/internal/NearDateTimeCalculator.kt index 9853bf5..bcc698d 100644 --- a/src/commonMain/kotlin/internal/NearDateTimeCalculator.kt +++ b/src/commonMain/kotlin/internal/NearDateTimeCalculator.kt @@ -108,13 +108,19 @@ internal fun NearDateTimeCalculatorDays( } else { dateTime }) - dateTime.copy( + val newDateTime = dateTime.copy( dayOfMonth = min(dateTime.month.days(dateTime.year), newOne.toInt() + 1), // index1 hour = 0, minute = 0, second = 0, milliseconds = 0 ) + // If day of month has not been changed, use old dateTime due to no changes required + if (newDateTime.dayOfMonth == dateTime.dayOfMonth) { + dateTime + } else { + newDateTime + } } ) From 6b4bc42f3d1e78da6aebad052059d5f087c7b0f0 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Mon, 18 Sep 2023 14:20:21 +0600 Subject: [PATCH 3/4] update dependencies --- CHANGELOG.md | 3 +++ gradle.properties | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 160e6cb..15ac190 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,9 @@ ## 2.2.1 * Potential fix of [#65](https://github.com/InsanusMokrassar/krontab/issues/65) +* Versions + * `Kotlin`: `1.9.20-Beta` + * `Klock`: `4.0.10` ## 2.2.0 diff --git a/gradle.properties b/gradle.properties index 4399bc3..0b8585c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,13 +9,13 @@ android.useAndroidX=true android.enableJetifier=false -kotlin_version=1.9.0 +kotlin_version=1.9.20-Beta kotlin_coroutines_version=1.7.3 kotlin_serialization_version=1.5.1 -dokka_version=1.8.20 +dokka_version=1.9.0 -klockVersion=4.0.9 +klockVersion=4.0.10 ## Github reease From 211b57cdf623aeeb90c6323827b31b58375dae9d Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Mon, 18 Sep 2023 14:24:59 +0600 Subject: [PATCH 4/4] update kotlinx serialization --- CHANGELOG.md | 1 + gradle.properties | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 15ac190..6dce745 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ * Versions * `Kotlin`: `1.9.20-Beta` * `Klock`: `4.0.10` + * `Serialization`: `1.6.0` ## 2.2.0 diff --git a/gradle.properties b/gradle.properties index 0b8585c..f3a0b7b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -11,7 +11,7 @@ android.enableJetifier=false kotlin_version=1.9.20-Beta kotlin_coroutines_version=1.7.3 -kotlin_serialization_version=1.5.1 +kotlin_serialization_version=1.6.0 dokka_version=1.9.0