convert months from 1-12 to 0-11. Fixes bug #19235.
2002-02-06 Damon Chaplin <damon@ximian.com> * cal-util/cal-recur.c (cal_recur_from_icalproperty): convert months from 1-12 to 0-11. Fixes bug #19235. svn path=/trunk/; revision=15584
This commit is contained in:

committed by
Damon Chaplin

parent
d64e7cf12f
commit
9112abc02f
@ -1,3 +1,8 @@
|
|||||||
|
2002-02-06 Damon Chaplin <damon@ximian.com>
|
||||||
|
|
||||||
|
* cal-util/cal-recur.c (cal_recur_from_icalproperty): convert months
|
||||||
|
from 1-12 to 0-11. Fixes bug #19235.
|
||||||
|
|
||||||
2002-02-04 JP Rosevear <jpr@ximian.com>
|
2002-02-04 JP Rosevear <jpr@ximian.com>
|
||||||
|
|
||||||
* conduits/todo/todo-conduit.c (e_todo_gui_new): new gui routines
|
* conduits/todo/todo-conduit.c (e_todo_gui_new): new gui routines
|
||||||
|
@ -904,6 +904,7 @@ cal_recur_from_icalproperty (icalproperty *prop, gboolean exception,
|
|||||||
struct icalrecurrencetype ir;
|
struct icalrecurrencetype ir;
|
||||||
CalRecurrence *r;
|
CalRecurrence *r;
|
||||||
gint max_elements, i;
|
gint max_elements, i;
|
||||||
|
GList *elem;
|
||||||
|
|
||||||
g_return_val_if_fail (prop != NULL, NULL);
|
g_return_val_if_fail (prop != NULL, NULL);
|
||||||
|
|
||||||
@ -956,6 +957,11 @@ cal_recur_from_icalproperty (icalproperty *prop, gboolean exception,
|
|||||||
|
|
||||||
r->bymonth = array_to_list (ir.by_month,
|
r->bymonth = array_to_list (ir.by_month,
|
||||||
sizeof (ir.by_month) / sizeof (ir.by_month[0]));
|
sizeof (ir.by_month) / sizeof (ir.by_month[0]));
|
||||||
|
for (elem = r->bymonth; elem; elem = elem->next) {
|
||||||
|
/* We need to convert from 1-12 to 0-11, i.e. subtract 1. */
|
||||||
|
int month = GPOINTER_TO_INT (elem->data) - 1;
|
||||||
|
elem->data = GINT_TO_POINTER (month);
|
||||||
|
}
|
||||||
|
|
||||||
r->byweekno = array_to_list (ir.by_week_no,
|
r->byweekno = array_to_list (ir.by_week_no,
|
||||||
sizeof (ir.by_week_no) / sizeof (ir.by_week_no[0]));
|
sizeof (ir.by_week_no) / sizeof (ir.by_week_no[0]));
|
||||||
|
Reference in New Issue
Block a user