diff options
author | Federico Mena Quintero <federico@helixcode.com> | 2000-11-07 02:39:55 +0800 |
---|---|---|
committer | Federico Mena Quintero <federico@src.gnome.org> | 2000-11-07 02:39:55 +0800 |
commit | 561fed0aa901f9a6286adaa4437cb5c44de86b84 (patch) | |
tree | d8ff13e877c163b6860b1439d14e288139da5af3 /libical | |
parent | 0981458bf8d699550bf4a6950300ba7a79a05845 (diff) | |
download | gsoc2013-evolution-561fed0aa901f9a6286adaa4437cb5c44de86b84.tar gsoc2013-evolution-561fed0aa901f9a6286adaa4437cb5c44de86b84.tar.gz gsoc2013-evolution-561fed0aa901f9a6286adaa4437cb5c44de86b84.tar.bz2 gsoc2013-evolution-561fed0aa901f9a6286adaa4437cb5c44de86b84.tar.lz gsoc2013-evolution-561fed0aa901f9a6286adaa4437cb5c44de86b84.tar.xz gsoc2013-evolution-561fed0aa901f9a6286adaa4437cb5c44de86b84.tar.zst gsoc2013-evolution-561fed0aa901f9a6286adaa4437cb5c44de86b84.zip |
Handle both the position and weekday in the by_day field.
2000-11-06 Federico Mena Quintero <federico@helixcode.com>
* src/libical/icalvalue.c (icalvalue_recur_as_ical_string): Handle
both the position and weekday in the by_day field.
svn path=/trunk/; revision=6416
Diffstat (limited to 'libical')
-rw-r--r-- | libical/ChangeLog | 5 | ||||
-rw-r--r-- | libical/src/libical/icalvalue.c | 9 |
2 files changed, 12 insertions, 2 deletions
diff --git a/libical/ChangeLog b/libical/ChangeLog index 8b902fd4a9..b3fe27e703 100644 --- a/libical/ChangeLog +++ b/libical/ChangeLog @@ -1,3 +1,8 @@ +2000-11-06 Federico Mena Quintero <federico@helixcode.com> + + * src/libical/icalvalue.c (icalvalue_recur_as_ical_string): Handle + both the position and weekday in the by_day field. + 2000-10-20 Jesse Pavel <jpavel@helixcode.com> * src/libical/icalproperty.c: added support for the diff --git a/libical/src/libical/icalvalue.c b/libical/src/libical/icalvalue.c index db0e58efe8..7c988a4d16 100644 --- a/libical/src/libical/icalvalue.c +++ b/libical/src/libical/icalvalue.c @@ -663,11 +663,16 @@ char* icalvalue_recur_as_ical_string(icalvalue* value) for(i=0; i< limit && array[i] != ICAL_RECURRENCE_ARRAY_MAX; i++){ if (j == 3) { /* BYDAY */ + short pos = icalrecurrencetype_day_position(array[i]); short dow = icalrecurrencetype_day_day_of_week(array[i]); char *daystr = icalenum_weekday_to_string(dow); - /* HACK, does not correctly handle the integer value */ - icalmemory_append_string(&str,&str_p,&buf_sz,daystr); + if (pos == 0) + icalmemory_append_string(&str,&str_p,&buf_sz,daystr); + else { + sprintf(temp,"%d%s",pos,daystr); + icalmemory_append_string(&str,&str_p,&buf_sz,temp); + } } else { sprintf(temp,"%d",array[i]); icalmemory_append_string(&str,&str_p,&buf_sz, temp); |