summaryrefslogtreecommitdiff
path: root/src/rrulestr.rs
diff options
context:
space:
mode:
authorFredrik Meringdal <fredrikmeringdal@Fredriks-MacBook-Pro.local>2021-04-07 11:01:19 +0200
committerFredrik Meringdal <fredrikmeringdal@Fredriks-MacBook-Pro.local>2021-04-07 11:01:19 +0200
commit31b079676b4835a7d1a39c58e88fd34cb26f71c3 (patch)
tree1f500e8c4936d73999367a6acf3608c11d23454c /src/rrulestr.rs
parent9c5fa3a95c9c7b40c7b0f28b970de34da4316891 (diff)
downloadrust_rrule-31b079676b4835a7d1a39c58e88fd34cb26f71c3.zip
more tests
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());
+ }
}