6.0.0-beta1
10/18/25

[#6080] Recurring events for 2/29 display on 3/1 on non-leap years
Summary Recurring events for 2/29 display on 3/1 on non-leap years
Queue Kronolith
Queue Version HEAD
Type Bug
State Resolved
Priority 1. Low
Owners mrubinsk (at) horde (dot) org
Requester jens (at) peino (dot) de
Created 01/06/2008 (6495 days ago)
Due
Updated 01/07/2008 (6494 days ago)
Assigned
Resolved 01/07/2008 (6494 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
01/07/2008 01:42:41 AM Michael Rubinsky Comment #10
Assigned to Michael Rubinsky
Summary ⇒ Recurring events for 2/29 display on 3/1 on non-leap years
State ⇒ Resolved
Reply to this comment
fixed in CVS and merging to FW_3 in both Kronolith and Horde_Date
01/06/2008 09:18:03 PM Michael Rubinsky Comment #9 Reply to this comment
Geez. Nevermind. nextRecurrence is *not* returning the correct info. 
It's returning, for example, 2/29/09 when in fact the next recurrence 
should be 2/29/12. The other symptoms were just due to what block of 
time the incorrectly returned date fell in when mktime() was called.

*sigh*
01/06/2008 08:31:54 PM Michael Rubinsky Comment #8 Reply to this comment
To recap discussions on IRC, this issue seems to exist only in certain 
cases for me.



Horde_Date_Recurrance:nextRecurrence() seems to return the proper date 
(2/29/xx) but the date gets displayed on 3/1 in certain cases. It 
seems to have to do with the day of week that 3/1 falls on in non-leap 
years.



Some test cases that work for me:



create an event on 2/29/08 set to recur yearly on the same date.

with 'Monday' selected as the first day of week in prefs, this event 
will appear on 3/1/2009...if 'Sunday' is selected as the first day of 
week, it does not appear.



create an event on 2/29/04, yearly on same date also.

This event will appear on 3/1/05 regardless of the setting of first 
day of week.








01/06/2008 06:45:41 PM Michael Rubinsky Comment #7 Reply to this comment
Are you 100% sure this is in HEAD, and that you did set it to recur 
yearly on the same date and not on the same day of year?



I cannot reproduce this behaviour now that I am looking into it...
01/06/2008 06:29:48 PM Michael Rubinsky Comment #6
State ⇒
Reply to this comment
This makes sense to me now :)



If set to recur yearly on same day of year, this behaviour makes 
sense, not on same date of year.
01/06/2008 04:53:52 PM jens (at) peino (dot) de Comment #5 Reply to this comment
Technically spoken i would say, yes. No birthday in non-leap years.

So i would say: She is 16 years old on her 4th birthday.



To me it would be wrong to treat a date (1st of mar) like another 
(29th of feb)
in this specific case i would expect that the event only occurs if
the date is present.
So she   doesn't have a birthday at all in non-leapyear years?

IMO, this makes even less sense.
01/06/2008 04:48:46 PM Michael Rubinsky Comment #4 Reply to this comment
in this specific case i would expect that the event only occurs if
the date is present.
So she   doesn't have a birthday at all in non-leapyear years?



IMO, this makes even less sense.
01/06/2008 04:11:05 PM jens (at) peino (dot) de Comment #3 Reply to this comment
Hi,



in this specific case i would expect that the event only occurs if the 
date is present.



For the other two types of yearly recurrency its something different.
Personally, I'm not sure I'd consider this a bug.  What would you
expect the recurrence date to be? 2/28?  IMO, 3/1 makes more sense
since it is the same number of days between occurences.
For the specific case of birthdays, I believe the celebrated day
would differ between cultures and personal preference.
01/06/2008 03:40:43 PM Michael Rubinsky Comment #2 Reply to this comment
Personally, I'm not sure I'd consider this a bug.  What would you 
expect the recurrence date to be? 2/28?  IMO, 3/1 makes more sense 
since it is the same number of days between occurences.

For the specific case of birthdays, I believe the celebrated day would 
differ between cultures and personal preference.
01/06/2008 03:12:09 PM jens (at) peino (dot) de Comment #1
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ leap year
Queue ⇒ Kronolith
State ⇒ Unconfirmed
Reply to this comment
Hello,



a friend of mine has birhtday on 29th of february.

I made an event for that day and did:



Recurrence

Yearly: Recurs every 1 year(s) on the same date.



When i look in 2009, that event is on 1st of march, which is imo wrong.

Saved Queries