Repository navigation
4.0.0
Croner 4.0.0 Release Notes
Major Features & New Backends
- Generic
CronDateTimeTrait & Jiff Support: Introduced a backend-agnosticCronDateTimetrait by @ion-elgreco (#48), adding an optional, high-performancejiffdatetime backend alongsidechrono(#49). Thechronobackend is now placed behind an optional feature flag (enabled by default). - LW & 31W Support: Added support for the LW (last weekday) pattern and verified 31W behavior ([#37](#37)).
- OCPS-Compliant Validation: Added OCPS-compliant step syntax validation with an optional
sloppy_rangesmode ([#39](#39)). - Derive Traits: Derived
EqandOrdimplementations forCronby @CardboardTurkey ([#43](#43)).
Improvements, Bug Fixes & Refactoring
- Performance & Hot Paths: Cut redundant work out of the day-matching hot path by @ion-elgreco ([#46](#46)) and refactored day matching to use a weekday value instead of a calendar type ([#47](#47)).
- DST Iteration Fixes: Fixed iteration during DST overlap and Jiff DST handling by @ion-elgreco ([#53](#53)).
- Chrono Feature Reduction: Reduced features of
chronoby @paolobarbolini ([#42](#42)) and isolated it behind a feature flag. - Testing & Documentation: Added test verification for case-insensitivity of aliases and modifiers ([#40](#40)), added a Quartz Compatibility section ([#41](#41)), and updated README and
simple_demoto use the Jiff backend ([#52](#52)).
Breaking Changes & Migration Guide
Version 4.0 introduces architectural upgrades that may require code adjustments. For complete details, consult the official MIGRATION.md guide. Key breaking changes include:
- Optional Chrono Feature:
chronois now an optional feature flag (enabled by default). If your project compiles withdefault-features = false, you must explicitly add"chrono"or"jiff"to yourCargo.toml. - Stricter Step Syntax Validation: Shortcut step syntax (e.g.,
5/5 * * * *) is now rejected by default and requires explicit ranges like5-59/5 * * * *. You can restore the old lenient behavior by building your parser with.sloppy_ranges(true). - Generic Datetime Methods: Methods now bind on the new
CronDateTimetrait instead ofchrono::TimeZone. Return types match the input type. When type inference is ambiguous (e.g., with multiple backends enabled), a turbofish annotation may be needed:
let next = cron
.find_next_occurrence::<chrono::DateTime<chrono::Utc>>(&chrono::Utc::now(), false)
.unwrap();- Removed/Deprecated APIs:
- The internal tuple-returning
find_occurrencemethod has been removed from the public API; usefind_next_occurrenceinstead. - The crate-level
croner::from_naivefunction is deprecated; usechrono::TimeZone::from_local_datetimedirectly. CronIterator<Tz>has been renamed toCronIterator<T>.
New Contributors
- @paolobarbolini made their first contribution in [#42](#42)
- @ion-elgreco made their first contribution in [#46](#46)
Full Changelog: v3.0.1...v4.0.0