summaryrefslogtreecommitdiff
path: root/src/rrulestr.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/rrulestr.rs')
-rw-r--r--src/rrulestr.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/rrulestr.rs b/src/rrulestr.rs
index 51a3f24..a2544c6 100644
--- a/src/rrulestr.rs
+++ b/src/rrulestr.rs
@@ -778,4 +778,13 @@ mod test {
let res = "DTSTART;VALUE=DATE:20201230T130000\nRRULE:FREQ=MONTHLY;UNTIL=20210825T120000Z;INTERVAL=1;BYDAY=-1WE".parse::<RRuleSet>().unwrap().all();
println!("Res {:?}", res);
}
+
+ #[test]
+ fn rrule_generates_final_event_on_8_3_2021() {
+ let dates = "DTSTART;TZID=Europe/Paris:20201214T093000\nRRULE:FREQ=WEEKLY;UNTIL=20210308T083000Z;INTERVAL=2;BYDAY=MO;WKST=MO\nEXDATE;TZID=Europe/Paris:20201228T093000,20210125T093000,20210208T093000".parse::<RRuleSet>().unwrap().all();
+ // the following outputs 2021-02-22 09:30:00 UTC
+ assert_eq!(8, dates[dates.len() - 1].day());
+ assert_eq!(3, dates[dates.len() - 1].month());
+ assert_eq!(2021, dates[dates.len() - 1].year());
+ }
}