This repository has been archived by the owner on Jul 11, 2022. It is now read-only.
Releases: puetzp/cron-lingo
Releases · puetzp/cron-lingo
v0.4.2
v0.4.1
v0.4.0
Added
- Introduced new WeekdayModifier variant "Last" to select the last occurrence of some weekday, e.g. "at 6 PM (last Monday)".
- Added
MultiSchedule
to accomodate a combination of several distinctSchedule
s. - Added
cron_lingo::error::Error::UnexpectedEndOfInput
. - Added
cron_lingo::error::Error::Syntax
andcron_lingo::error::SyntaxError
.
Changed
- Renamed
cron_lingo::error::InvalidExpression
to simplycron_lingo::error::Error
. - Expressions must now be parsed separately using
from_str
but may then be combined together withstd::ops::Add
or added to an existingMultiSchedule
usingstd::ops::AddAssign
. - Iterator of
Schedule
orMultiSchedule
is now fallible (next()
returnsOption<Result<time::OffsetDateTime, cron_lingo::error::Error>
) as the retrieval of the local offset may fail. - Creation of said iterators via
Schedule::iter()
orMultiSchedule::iter()
is now fallible as well for the same reason. - Moved from time v0.2.22 to v0.3. Compile flag is needed in order to avoid runtime errors when the local offset is retrieved internally:
RUSTFLAGS="--cfg unsound_local_offset" cargo build
. The compile flag may be omitted when your application is single-threaded.
Removed
- Removed variants
DuplicateInput
andIllogicalWeekdayCombination
from error enum as the occurrence of duplicates et al. does not prevent correct computation of the next upcoming date.
v0.3.1
v0.3.0
Added
- Add
skip_outdated()
method to ScheduleIter to override default behaviour innext()
. By defaultnext()
will never return a date that is in the past, but instead resume the iteration from the current local time.
Changed
- Rename Timetable to Schedule
- Complete expression syntax overhaul to offer more possibilities