mirror of
https://github.com/InsanusMokrassar/krontab.git
synced 2024-11-26 12:08:50 +00:00
removing of unnecessary code
This commit is contained in:
parent
12d2d82c71
commit
5cc9c8278e
@ -28,30 +28,6 @@ internal data class CronDateTime(
|
||||
}
|
||||
|
||||
internal val klockDayOfMonth = dayOfMonth ?.plus(1)
|
||||
|
||||
companion object {
|
||||
/**
|
||||
* Using [clamp] extension for checking every parameter to be ensure that they are all correct
|
||||
* @param month 0-11
|
||||
* @param dayOfMonth 0-31
|
||||
* @param hours 0-23
|
||||
* @param minutes 0-59
|
||||
* @param seconds 0-59
|
||||
*/
|
||||
fun create(
|
||||
month: Int? = null,
|
||||
dayOfMonth: Int? = null,
|
||||
hours: Int? = null,
|
||||
minutes: Int? = null,
|
||||
seconds: Int? = null
|
||||
) = CronDateTime(
|
||||
month ?.clamp(monthRange) ?.toByte(),
|
||||
dayOfMonth ?.clamp(dayOfMonthRange) ?.toByte(),
|
||||
hours ?.clamp(hoursRange) ?.toByte(),
|
||||
minutes ?.clamp(minutesRange) ?.toByte(),
|
||||
seconds ?.clamp(secondsRange) ?.toByte()
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user