Skip to content
This repository has been archived by the owner on Jul 11, 2022. It is now read-only.

Releases: puetzp/cron-lingo

v0.4.2

12 Mar 20:13
Compare
Choose a tag to compare

Added

  • impl From<Schedule> for MultiSchedule

v0.4.1

08 Mar 08:20
Compare
Choose a tag to compare

Added

  • Added methods ScheduleIter::assume_offset, ScheduleIter::use_local_offset and pendants for MultiScheduleIter that allow to change the default offset (local) that dates are computed in to another.

v0.4.0

04 Dec 15:04
Compare
Choose a tag to compare

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 distinct Schedules.
  • Added cron_lingo::error::Error::UnexpectedEndOfInput.
  • Added cron_lingo::error::Error::Syntax and cron_lingo::error::SyntaxError.

Changed

  • Renamed cron_lingo::error::InvalidExpression to simply cron_lingo::error::Error.
  • Expressions must now be parsed separately using from_str but may then be combined together with std::ops::Add or added to an existing MultiSchedule using std::ops::AddAssign.
  • Iterator of Schedule or MultiSchedule is now fallible (next() returns Option<Result<time::OffsetDateTime, cron_lingo::error::Error>) as the retrieval of the local offset may fail.
  • Creation of said iterators via Schedule::iter() or MultiSchedule::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 and IllogicalWeekdayCombination from error enum as the occurrence of duplicates et al. does not prevent correct computation of the next upcoming date.

v0.3.1

15 Jun 12:02
Compare
Choose a tag to compare

Added

  • Check for illogical combinations of weekdays and modifiers, e.g. "on Tuesdays and the 3rd Tuesday"

Changed

  • Updated module description for more clarity regarding expression syntax

v0.3.0

15 Jun 12:02
Compare
Choose a tag to compare

Added

  • Add skip_outdated() method to ScheduleIter to override default behaviour in next(). By default next() 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