removing of unnecessary code

This commit is contained in:
InsanusMokrassar 2020-07-24 14:25:30 +06:00
parent 12d2d82c71
commit 5cc9c8278e

View File

@ -28,30 +28,6 @@ internal data class CronDateTime(
} }
internal val klockDayOfMonth = dayOfMonth ?.plus(1) 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()
)
}
} }
/** /**