[prev in list] [next in list] [prev in thread] [next in thread]
List: horde-dev
Subject: Re: [dev] [cvs] commit: framework/Date/Date Recurrence.php
From: Michael Rubinsky <mrubinsk () horde ! org>
Date: 2008-10-19 19:16:05
Message-ID: 20081019151605.92156enhyqj6ry4g () portal ! theupstairsroom ! com
[Download RAW message or body]
This message is in MIME format and has been PGP signed.
[Attachment #2 (multipart/signed)]
This message is in MIME format and has been PGP signed.
Quoting Jan Schneider <jan@horde.org>:
> Zitat von Michael Rubinsky <mike@theupstairsroom.com>:
>
>> mrubinsk 2008-10-18 16:40:49 EDT
>>
>> Modified files:
>> Date/Date Recurrence.php
>> Log:
>> Check that the ISO-8601 week number is NOT the first week of the year while
>> we are in month 12. If it IS, then we need to bump the year up one before
>> calculating the after_week value.
>>
>> This fixes an infinite loop with certain recurring events.
>>
>> Revision Changes Path
>> 1.24 +11 -3 framework/Date/Date/Recurrence.php
>>
>> Chora Links:
>>
>> http://cvs.horde.org/diff.php/framework/Date/Date/Recurrence.php?r1=1.23&r2=1.24&ty=u
>>
>> --
>> To unsubscribe, mail: cvs-unsubscribe@lists.horde.org
>>
>
> Shouldn't we increment $after->year directly instead?
No, because $after is used later in the function where it is compared
with $next. Incrementing $after->year would make $after represent the
wrong date in that comparison. We don't want to increase the $after
date by a year, we just want to make sure that when we calculate the
week number of the year and use that value to create a new Horde_Date,
that if we are in that last/first week that spans the year boundary
that we use the correct year in building the new date object.
Thanks,
mike
--
The Horde Project (www.horde.org)
mrubinsk@horde.org
"Time just hates me. That's why it made me an adult." - Josh Joplin
[Attachment #5 (application/pgp-signature)]
--
Horde developers mailing list - Join the hunt: http://horde.org/bounties/
Frequently Asked Questions: http://horde.org/faq/
To unsubscribe, mail: dev-unsubscribe@lists.horde.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic