mirror of
https://github.com/InsanusMokrassar/krontab.git
synced 2024-11-26 12:08:50 +00:00
potential fix of #65
This commit is contained in:
parent
93b56c0861
commit
c406f883d2
@ -2,6 +2,8 @@
|
||||
|
||||
## 2.2.1
|
||||
|
||||
* Potential fix of [#65](https://github.com/InsanusMokrassar/krontab/issues/65)
|
||||
|
||||
## 2.2.0
|
||||
|
||||
* Versions
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user