mirror of
https://github.com/InsanusMokrassar/krontab.git
synced 2024-11-26 03:58:50 +00:00
add "each"
This commit is contained in:
parent
5a13437c17
commit
66e75b4315
@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
### 0.3.2
|
### 0.3.2
|
||||||
|
|
||||||
|
* Function `TimeBuilder#each` was added (works as `at`)
|
||||||
* Add opportunity to use `first` shortcuts:
|
* Add opportunity to use `first` shortcuts:
|
||||||
* Value property `TimeBuilder#first` for including via functions like `TimeBuilder#at`
|
* Value property `TimeBuilder#first` for including via functions like `TimeBuilder#at`
|
||||||
* Shortcut for kron string format `f` or `F`
|
* Shortcut for kron string format `f` or `F`
|
||||||
|
@ -48,6 +48,13 @@ sealed class TimeBuilder (
|
|||||||
result = (result ?: emptySet()) + value.clamp(restrictionsRange)
|
result = (result ?: emptySet()) + value.clamp(restrictionsRange)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Shortcut for [at]. In fact will
|
||||||
|
*/
|
||||||
|
@Suppress("unused", "NOTHING_TO_INLINE")
|
||||||
|
inline infix fun each(value: Int) = at(value)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Just wrapper for more obvious writing something like "[from] 2 [every] 5". For example, for [SecondsBuilder] it
|
* Just wrapper for more obvious writing something like "[from] 2 [every] 5". For example, for [SecondsBuilder] it
|
||||||
* will mean "[from] second second [every] 5 seconds", or "2, 7, 13, ..."
|
* will mean "[from] second second [every] 5 seconds", or "2, 7, 13, ..."
|
||||||
|
Loading…
Reference in New Issue
Block a user