ritr = icalrecur_iterator_new(recur, dtstart);
if (!ritr) return;
- lprintf(9, "Recurrence found: %s\n", icalrecurrencetype_as_string(&recur));
-
while (next = icalrecur_iterator_next(ritr), !icaltime_is_null_time(next) ) {
++num_recur;
localtime_r(&thetime, &tm);
while (tm.tm_wday != weekstart) {
thetime = thetime - (time_t)86400; /* go back 24 hours */
- lprintf(9, "Subtracting a day, thetime is now %d - %s", thetime, ctime(&thetime));
localtime_r(&thetime, &tm);
- lprintf(9, "tm.tm_wday is %d, weekstart is %d\n", tm.tm_wday, weekstart);
}
/* Outer table (to get the background color) */
rrule = icalcomponent_get_first_property(vevent, ICAL_RRULE_PROPERTY);
if (rrule) {
recur = icalproperty_get_rrule(rrule);
- wprintf("<tt>%s</tt><br />\n", icalrecurrencetype_as_string(&recur));
+
+ wprintf("<table border=0 width=100%%>\n"); /* same table style as the event tab */
+
+ /* Table row displaying raw RRULE data, FIXME remove when finished */
+ wprintf("<tr><td><b>");
+ wprintf("Raw data");
+ wprintf("</b></td><td>");
+ wprintf("<tt>%s</tt>", icalrecurrencetype_as_string(&recur));
+ wprintf("</td></tr>\n");
+
+ char *frequency_units[] = {
+ _("seconds"),
+ _("minutes"),
+ _("hours"),
+ _("days"),
+ _("weeks"),
+ _("months"),
+ _("years"),
+ _("never")
+ };
+
+ wprintf("<tr><td><b>");
+ wprintf(_("Repeats"));
+ wprintf("</b></td><td>");
+ if ((recur.freq < 0) || (recur.freq > 6)) recur.freq = 4;
+ wprintf("every %d %s", recur.interval, frequency_units[recur.freq]);
+ wprintf("</td></tr>\n");
+
+ wprintf("</table>\n");
}
end_tab(2, 3);