Closed (fixed)
Project:
Date
Version:
5.x-2.x-dev
Component:
Date Repeat API
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
17 Aug 2008 at 23:14 UTC
Updated:
5 Dec 2008 at 20:32 UTC
If you set a date to repeat until Wednesday, it will actually only repeat until Tuesday.
This creates problems also when people create a weekly event and select the last day, and yet unbeknownst to them the event stops the week before.
If you look at Google Calendar for example and set a repeating date, it repeats through the last day specified.
Comments
Comment #1
karens commentedThis is by design to make the code work the way the ical RRULE standards work, those standards exclude the 'To' date from the results. But I agree this feels odd and non-intuitive. I need to figure out how to make this work intuitively and still have something that matches the standards.
Comment #2
dugh commentedOh ok I understand, thanks for the explanation.
For now I used the string overrides module to replace this string: "Date to stop repeating this item."
with more help about picking the day after the last day of the event.
Comment #3
karens commentedI add some text in the widget to make this more clear. I'll leave this open in case anyone has a better solution.
Comment #4
michaek commenteddo you think storing the day after the selected in the ical RRULE would support the ical standard and provide a better ui? that is, when "sept 1" is selected as the until date, store "sept 2" as the UNTIL. the ui knows that the date stored is always a day later than the last day of the repeat rule (and display "sept 1"), and other standards-observing clients would interpret the ical RRULE correctly. seems like offloading this "make it a day later that the day you intend" process to the user is unneccessary.
Comment #5
karens commentedYes, it would be nice to make this more intuitive, so maybe silently changing the UNTIL date would make sense. But that complicates the code and I don't have time to work on that now. The date validator would have to change the UNTIL date before anything else is done or the processing will not work right. And it must store the 'right' UNTIL date, but always convert it when presented to the user so they see the 'wrong' UNTIL date, so I can see this spiraling into a mess.
So I have mixed feelings.
Comment #6
jesss commentedActually, it appears the Until date *is* included if the frequency is set to every day, which makes the help text a little confusing.
Comment #7
jplarose commentedFrom http://www.kanzaki.com/docs/ical/recur.html
(my emphasis)
This indicates that the UNTIL date is inclusive (like everyone wants), not exclusive (like it's currently implemented).
Comment #8
karens commentedWell I like your answer better because I prefer it to work that way, too, but all the examples I found before worked the other way. I'll try to find the links I was using so we can figure out which is right.
Comment #9
karens commentedOK, I got all my examples, used to do the tests, from http://www.kanzaki.com/docs/ical/rrule.html, and in those examples the UNTIL dates are excluded. However, I now see that in those examples the start dates are all in Eastern time but the UNTIL dates are in UTC and *that's* why the UNTIL dates are excluded.
I'm happy to be wrong about this, I never liked it working that way but thought it was right. I'll make this change and get it committed later today.
Thanks for pursuing this.
Comment #10
karens commentedI've removed language saying that the UNTIL date is not included the results and fixed the logic that kept it out. This should be working right now.
Comment #11
karens commentedBTW, this part of the code is the same in both D5 and D6, so I fixed it in both places.
Comment #12
jplarose commentedThanks KarenS!
Yeah, I found it weird that they require UNTIL's to be in GMT.
Comment #13
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #14
spython commentedTried the latest 5.x dev, does not seem to work for me.
Do I have to change something else to make it work?
Comment #15
spython commentedreopening the issue
Comment #16
robclay commentedSo will this be an easy fix to make it "inclusive" of last day?
Thanks!
Comment #17
karens commentedThis fix is now committed and the 'Until' date will be included in the results.
Comment #18
robclay commentedThanks! (Drupal would not be nearly as effective for me without this module!)
Comment #19
jlevis commentedI am running Date 6.x-2.x-dev (2008-Nov-09) and using the "Text Field with Date Pop-up and Repeat Options" widget to add a date field to a "Program" content type to create program schedules for a community centre web site.
I am finding that the time field for the Repeat Until option isn't autofilling like the others ("Program Schedule From date" and "Program Schedule To date"). If you don't make an effort to click in the box and press an up or down arrow, then it is set to 12:00 AM by default. I found that fact was causing me to miss the last date upon submit. This was because though date was correct, the time ended up being before the last scheduled run time of the program.
Would it be possible to have the time automatically set to 11:59 PM by default?
Comment #20
karens commented#19 is a new and different issue, please file a separate report.
Comment #21
alexjhart commentedI have an event setup. It starts on a Sunday. I have it set to repeat until Sun Dec 14. It seems like I am experiencing the exclusive behavior described above. I say that because on Dec 14th, the event doesn't show up on the calendar. However, it was my understanding from what I read above that this was changed to be inclusive.
Comment #22
karens commentedThis is a fixed 5.2 issue, don't reopen it to report a new 6.2 problem.