All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Fix to respect timezone when serializing
EXDATE
andRDATE
- Generic dependency updates
- Remove lifetime from iterator types
- Fix to render weekdays as valid rrule strings
- Fix to ensure freq is capitalized in the string representation
- MSRV is bumped to
v1.74.0
fromv1.64.0
- Make
ParseError
andValidationError
public EXRULE
s are now correctly added as exrules on theRRuleSet
when parsed from a string, instead of being incorrectly added as an rrule.- Add a
RRuleSet::set_from_string
method to support loading rules without DTSTART. This is useful particularly when working with the Google Calendar API. - Fix to include
RDATE
,EXRULE
andEXDATE
values if used in theDisplay
implementation ofRRuleSet
. - Fix #104 which had invalid occurrences for "every 2 months on the last Monday"
RRuleSet::all
returns anRRuleResult
struct instead of a tuple.- Update
chrono-tz
version to 0.8 - MSRV is bumped to
v1.64.0
fromv1.56.1
- EXRULE functionality is put behind the feature flag
exrule
which is not enabled by default. RRuleSet::all
takes alimit
argument to protect against long-running iteration.- The iterator API does not have any validation limits by default. So
rrule_set.into_iter().map(|dt| format!("{dt}")).collect<Vec<_>>()
could lead to an infinite loop. RRuleSet::all
returns a tuple(Vec<DateTime>, bool)
instead of the previousResult
type. The boolean in the tuple indicates if the iteration was limited or not.- Datetime type returned from iteration is
chrono::DateTime<rrule::Tz>
rather thanchrono::DateTime<chrono_tz::Tz>
. Please use.with_timezone
if you still want to usechrono_tz::Tz
.
no-validation-limits
feature is removed and is replaced by arguments toRRuleSet
.RRuleSet::just_before
was removed to keep the public API leaner. Please use the iterator API directly if you need this use-case.RRuleSet::just_after
was removed to keep the public API leaner. Please use the iterator API directly if you need this use-case.RRuleSet::all_between
was replaced byrrule_set.before(dt).after(dt).all(limit)
.
RRuleSet::after
andRRuleSet::before
was added to configure the boundaries of the recurrences before callingRRuleSet::all
.RRuleSet::all_unchecked
was added to allow for iterating without any validation limits.RRule<Unvalidated>
implementsFromStr
andDeserialize
rrule::Tz
"replaced"chrono_tz::Tz
by wrapping it and adding support for thechrono::Local
timezone.
- Removed a
println
that accidentally was part of the previous release.
- Fixed typos in security docs
- Fixed an infinite loop issue in the iteration phase where the counter date increment method didn't increment the counter date, and it was unable to make progress. This was solved by using a custom date time implementation for the counter date.
- Fixes issue where iterations that passed a daylight saving time had incorrect hour.
- MSRV is bumped to
v1.57.0
fromv1.56.1
- Internal
Time
type has been replaced bychrono::NaiveTime
- Iterator module has been refactored
- The
parser
module has been rewritten from scratch to be more Rust idiomatic and use terminology more consistent with the RFC. The end result of theparser
phase is now aGrammar
. - Added
cargo clippy -- -D warnings
back to the CI
RRule
no longer implementsFromStr
orDeserialize
. UseRRuleSet
for these use-cases.
- The
DTSTART
andUNTIL
values weren't synced before this release. They're now synced according to the RFC. - Fix #61 where
collect_with_error
would not return an error in the case whereRRuleSet
iteration had an error.
RRule
represents only RRULE in the iCalendar specification. AndRRuleSet
is for the whole iCalendar string.RRule
has two stages,Unvalidated
andValidated
. When you initialize it, it isUnvalidated
and by calling thevalidate
method, it will change toValidated
.- All fields of
RRule
andRRuleSet
are private, instead there are a set of new methods to get and set values of fields on both structs. It's been done to have a safer API. tz
is removed from all structs. It was a duplicated copy of the timezone inside thedt_start
. Instead, you can control it by having a proper timezone for [RRuleSet::dt_start
].
- Removed
dt_start
anddt_end
fromRRule
. - There is no
Default
forRRuleSet
, instead usenew(UTC.ymd(1970, 1, 1).and_hms(0, 0, 0))
method to have the same behavior. - Removed
RRuleProperties
, instead you can useRRule<Unvalidated>
. DateFilter
trait has been removed, since now we can only iterate overRRuleSet
and the methods are insideRRuleSet
itself.- The iterator over
RRule
is not public anymore.
- There is a new
serde
feature to enable serialization and deserialization onRRuleProperties
andRRule
. RRuleProperties
andRRule
structs now implementDisplay
andFromStr
to convert from and to strings.
dt_start
andtz
moved fromRRuleProperties
toRRule
- Fix #33
- Fix #34
- Many tests were ignored because they were either invalid or the test didn't pass. Most ignored tests are now deleted, or the code is fixed so that they pass.
- Better error handling
Internal refactorings:
- Added
ParseError
andValidationError
which contains more specific errors during the parsing and validation phase respectively.
- Fix #48
- Added
forbid(unsafe_code)
into repo. We don't ever need unsafe code. - Added additional testing crates:
rrule-debugger
andrrule-afl-fuzz
. (only used internally and for debugging) - Added
examples
folder and moved some code from documentation into examples. - New and improved error handling consolidated into one object,
RRuleError
. - Added new trait
DateFilter
for implementing methods like:all_with_error
,all_before_with_error
,all_after_with_error
andall_between_with_error
and moved/added methods likeall
,just_before
, etc. - Added arbitrary limits for safety reasons. See ReadMe for more info.
- Improved
rrule
command line tool. - New
WithError
trait, implemented forRRuleIter
andRRuleSetIter
.
- License change, from MIT to (MIT or Apache 2.0). (#27)
- Massive code restructuring. Split into
core
,iter
,parser
andvalidator
. - Renamed
Frequenzy
toFrequency
. - Add limit to
all()
, prevent infinite loops. ParsedOptions
andOptions
are merged together intoRRuleProperties
. (#22)Options
functions changed, for examplebyminute
->by_minute
.by_easter
is now opt-in with feature flagby-easter
. (#26)RRule
can only be crated usingnew
function with a validRRuleProperties
.RRule.option
is no longer public, but can be read by usingget_properties()
.RRuleIter
andRRuleSetIter
are now part of the public API.NWeekday
has totally changed but serves the same purpose.- Updated
chrono-tz
from0.5.3
to0.6.0
. - Function
all
was moved toDateFilter
and returns aResult
now.
RRuleSet::new()
replaced withRRuleSet::default()
.ParsedOptions
andOptions
are now combined asRRuleProperties
. (#22)NWeekdayIdentifier
replaced with new ofNWeekday
.by_n_weekday
field removed fromParsedOptions
, combined intoby_weekday
.concat
andbuild
inOptions
are removed, no longer needed.- Removed
serde
dependency. (#21) - Removed function
between
, useDateFilter::all_between
instead. - Removed function
after
, useDateFilter::just_after
instead. - Removed function
before
, useDateFilter::just_before
instead.
- Replaced panic on incorrect datetime with error.
- Fix timezone conversions when
TZID
andZ
is present. - Stabilized
RRule
parsing from string. Fixed a lot of possible panics.
- Added security notice to README.md.
- The validation of
RRule
improved the stability of the crate a lot.
All changes before 2021-07-02 where not documented. This is everything before and including fa8308944a4d2ead0a6ccfa6ee53b76b399e045f