From: David F. <da...@d2...> - 2005-05-09 19:04:11
|
I just committed code to fix SF Bug #1023229. The long explanation is I changed how the weekly recurrence rendering was working to be more accurate (basically the same fix I did for the yearly rendering - obviously, I'll take a look at the monthly rendering next). The way the weekly recurrence rendering was working (and this applied to all the rendering, was starting w/ the begin date, and until the end/until date, it would render from the sunday before the begin date to the sat after the begin date (the week of the begin date), the skip forward $interval weeks and render out that week, until it reached the end date. The problem was when begin_date was a later day in the week than until (and there was a Byday that mattered for the until) - the "rendering window" would miss the last day, since it didn't match the actual date range. So, the code would do this: for a weekly event, every tuesday & thursday, from 05/05 (thurs) until 05/17 (tues) - start on TH (05/05), render out from SU (05/01) - SA (05/07). This gave you 05/03 and 05/05 - incorrect, but the extra date got thrown out at a later check, so it wasn't a big deal. Skip ahead a week, and render the next week - TH, 05/12. This rendered from SU - SA, 05/08-05/14, and added 05/10 and 05/12. Check, what we wanted. Skip ahead a week and stop rendering, 05/19 is past our end date of 05/17. And thus, the last day was lost. I fixed this by having the rendering window be from begin_date to begin_date + interval weeks, i.e., in the above example, 05/05 - 05/11, TH - WE for the first week. The other rendering bug I fixed earlier was the same issue for years (it had the rendering window as 01/01-12/31, instead of begin_date - begin_date + 1 year, so the same problem where things were dropped occurred. The short answer is while I know this fixes the problem, and seems to be fine with all the calendars I tested, the weekly recurrence may not be 100% correct yet because there may be edge cases I missed. Please try out CVS, let me know. Once we've worked through all the outstanding bugs/patches, I'd recommend a 2.0 beta 2, to make sure everything's still okay. dave |