6.0.0-beta1
7/5/25

[#8510] Export of recurring event with Nth WeekDay is wrong
Summary Export of recurring event with Nth WeekDay is wrong
Queue Kronolith
Queue Version 2.3.1
Type Bug
State Resolved
Priority 1. Low
Owners jan (at) horde (dot) org
Requester lst_hoe02 (at) kwsoft (dot) de
Created 08/20/2009 (5798 days ago)
Due
Updated 08/21/2009 (5797 days ago)
Assigned 08/20/2009 (5798 days ago)
Resolved 08/21/2009 (5797 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch Yes

History
08/21/2009 03:38:25 PM Jan Schneider Comment #6
Assigned to Jan Schneider
State ⇒ Resolved
Reply to this comment
Committed, thanks. Nice work!
08/21/2009 03:33:51 PM Jan Schneider Deleted Original Message
 
08/21/2009 11:16:03 AM lst_hoe02 (at) kwsoft (dot) de Comment #5
New Attachment: kronolith-patch2.zip Download
Reply to this comment
The attached path fixes the issue for iCal and vCal output and rename 
the variable $p to the more explaining $nth_weekday.

As far as i can see vCal has no expression for the 
HORDE_DATE_RECUR_YEARLY_WEEKDAY so this can be omitted for the 
"toRRule10" function?
08/21/2009 09:01:59 AM lst_hoe02 (at) kwsoft Comment #4 Reply to this comment
The used calculation is only wrong for the last 7 days of the month 
excluding the same weekday as the first monthday is. If one change the 
line 99 in kronolith/lib/tests/recurrence.phpt to use "2009-03-27 
10:00:00" the error should be detectable. The 27.03.2009 is the 4th 
friday in March but the result would be BYDAY=5FR.

The Basic Problem is, that the calculation is based on the weeknumber 
and the result should be the nth weekday which is off for weeks 
continue in the next month.
08/20/2009 08:32:44 PM lst_hoe02 (at) kwsoft (dot) de Comment #3 Reply to this comment
To reproduce simply create a event : today,recurs every 1 year on the 
same weekday and month of the year. This will lead to



RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=4TH;BYMONTH=8



at export, which should be



RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=3TH;BYMONTH=8



because today is the 3th Thursday this month and not the 4th as far as 
i can tell.



Could you explain where to find the unit test for this??



Thanks


08/20/2009 04:17:49 PM Jan Schneider Comment #2
State ⇒ Feedback
Reply to this comment
Can you provide a patch for the recurrence unit test that demonstrates 
the bug? The existing tests don't show any problem.
08/20/2009 02:58:28 PM lst_hoe02 (at) kwsoft (dot) de Comment #1
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ Export of recurring event with Nth WeekDay is wrong
Queue ⇒ Kronolith
Milestone ⇒
Patch ⇒ Yes
New Attachment: kronolith-patch.zip
State ⇒ Unconfirmed
Reply to this comment
When using recurring events with Nth WeekDay of Month the export of 
the event is Nth+1 WeekDay eg. for 4th TU of AUG every Year the export 
result is 5th TU of AUG every Year. For Monthly schedules only the 
exception for dates at the end of month are sometimes wrong. The patch 
correct this for iCal export, it seams for vCalendar the same problem 
exists but i have to check with vCalendar doku first.

Saved Queries