[dev] [cvs] commit: framework/Date/Date Recurrence.php

Gunnar Wrobel wrobel at pardus.de
Mon Jul 7 10:56:30 UTC 2008


Jan Schneider <jan at horde.org> writes:

> Zitat von Gunnar Wrobel <wrobel at pardus.de>:
>
>> Jan Schneider <jan at horde.org> writes:
>>
>>> Zitat von Gunnar Wrobel <p at rdus.de>:
>>>
>>>> wrobel      2008-07-07 00:40:07 EDT
>>>>
>>>>   Modified files:
>>>>     Date/Date            Recurrence.php
>>>>   Log:
>>>>   Add a function to return the next active recurrence.
>>>>
>>>>   Revision  Changes    Path
>>>>   1.15      +26 -1     framework/Date/Date/Recurrence.php
>>>
>>> Why not having nextRecurrence() do this?
>>
>> You mean with an additional flag like "$active = false" in the
>> function call? Sure, should also work. Having the while loop in
>> nextActiveRecurrence() seemed appropriate to me but I'm not
>> particularly attached to solving it like that.
>
> No, I think nextRecurrence() should unconditionally skip any complete
> recurrences, just like it skips exceptions now.

Now I'm confused. You are referring to nextRecurrence() in
framework/Date/Date/Recurrence.php?

I don't see that the code would automatically skip exceptions. We use
structures like

if ($next = $event->recurrence->nextRecurrence($date)) {
    if ($event->recurrence->hasException($next->year, $next->month, $next->mday)) {
...

in several code sections which is the main reason for
nextActiveRecurrence(). Or did I misunderstand something?

Cheers,

Gunnar

>
> Jan.
>
> -- 
> Do you need professional PHP or Horde consulting?
> http://horde.org/consulting/
>
>
> -- 
> Horde developers mailing list - Join the hunt: http://horde.org/bounties/
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: dev-unsubscribe at lists.horde.org

-- 
____ http://www.pardus.de _________________ http://gunnarwrobel.de _

E-mail : p at rdus.de                                 Dr. Gunnar Wrobel
Tel.   : +49 700 6245 0000                         Bundesstrasse 29
Fax    : +49 721 1513 52322                        D-20146 Hamburg
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   >> Mail at ease - Rent a kolab groupware server at p at rdus <<                 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


More information about the dev mailing list