summaryrefslogtreecommitdiffstats
path: root/test/data
diff options
context:
space:
mode:
authorLars Henriksen <LarsHenriksen@get2net.dk>2020-05-07 21:39:23 +0200
committerLukas Fleischer <lfleischer@calcurse.org>2020-05-12 09:24:11 -0400
commitbd238bfd7c443fd974f5b7edd6c1abc0349bfa78 (patch)
tree46ee867794426eee0eae031d65ffd86b98026693 /test/data
parentfabacecd16eb62ff94dfa8955862852a410e3524 (diff)
downloadcalcurse-bd238bfd7c443fd974f5b7edd6c1abc0349bfa78.tar.gz
calcurse-bd238bfd7c443fd974f5b7edd6c1abc0349bfa78.zip
Fix recurrence rule expansion with ordered weekday
When the order of a weekday in BYDAY rule expansion (like -5SA or 5SU for monthly or 55WE for yearly) exceeds the number of available weekdays in the period (month or year), rule expansion with negative order could result in a floating point exception. The reason: the modified frequency might become zero. Solution. Check order against number of available weekdays and terminate expansion early whenever possible (also for positive orders). Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
Diffstat (limited to 'test/data')
-rw-r--r--test/data/rfc55451
1 files changed, 1 insertions, 0 deletions
diff --git a/test/data/rfc5545 b/test/data/rfc5545
index 421dd53..d9863ce 100644
--- a/test/data/rfc5545
+++ b/test/data/rfc5545
@@ -25,3 +25,4 @@
12/25/1997 [1] {3Y w-11} Last Thursday of the year every third year, forever (FREQ=YEARLY;INTERVAL=3;BYDAY=-1TH)
06/22/1997 [1] {2Y w0 w1} Every Sunday and Monday, every other year (FREQ=YEARLY;INTERVAL=2;BYDAY=SU,MO)
02/01/1997 [1] {1Y -> 01/31/2005 d1 d29 m2} Every year on February 1 and 29 for eight years (RRULE:FREQ=YEARLY;UNTIL=20050131T000000Z;BYMONTH=2;BYMONTHDAY=1,29)
+08/01/2020 @ 08:41 -> 08/01/2020 @ 10:11 {1M w-41} |negative ordered weekday may not exist