]> diplodocus.org Git - nmh/commitdiff
Allow a RRULE in an iCalendar request to not have an INTERVAL on its
authorDavid Levine <levinedl@acm.org>
Thu, 19 Nov 2015 20:27:49 +0000 (15:27 -0500)
committerDavid Levine <levinedl@acm.org>
Thu, 19 Nov 2015 20:37:47 +0000 (15:37 -0500)
yearly FREQ, because INTERVAL defaults to 1.

sbr/datetime.c

index 34287b2331c54ca50f058b99a042719b3ffe64b0..4e155855f1312a33a626bf8ece97ca33ca5f4ce8 100644 (file)
@@ -262,7 +262,8 @@ rrule_clock (const char *rrule, const char *starttime, const char *zone,
              unsigned int year) {
     time_t clock = 0;
 
              unsigned int year) {
     time_t clock = 0;
 
-    if (nmh_strcasestr (rrule, "FREQ=YEARLY;INTERVAL=1")) {
+    if (nmh_strcasestr (rrule, "FREQ=YEARLY;INTERVAL=1")  ||
+        (nmh_strcasestr (rrule, "FREQ=YEARLY")  &&  nmh_strcasestr(rrule, "INTERVAL") == NULL)) {
         struct tws *tws;
         const char *cp;
         int wday = -1, month = -1;
         struct tws *tws;
         const char *cp;
         int wday = -1, month = -1;