[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-pim
Subject:    Re: [Kde-pim] [PATCH] Recurrences
From:       David Jarvie <lists () astrojar ! org ! uk>
Date:       2005-07-20 22:11:35
Message-ID: 200507202211.36188.lists () astrojar ! org ! uk
[Download RAW message or body]

On Tuesday 19 Jul 2005 12:14, Reinhold Kainhofer wrote:
> On Monday 18 July 2005 23:09, David Jarvie wrote:
> > On Friday 15 Jul 2005 18:08, Reinhold Kainhofer wrote:
> > > I now created a new patch for the recurrences:
> > > http://www.fam.tuwien.ac.at/~reinhold/KOrganizer/RecurrenceRule/Recurre
> > >nc es _2005-07-15.patch
>
> > endDateTime(), getNextDateTime() and getPreviousDateTime() assume that
> > the time for mRDates entries is 00:00:00. I'm not convinced that this is
> > wise - I would have thought that the DTSTART time would be a better
> > assumption. Unfortunately, RFC2445 doesn't seem to give any guidance.
>
> Yes, there have been some discussions on ietf-calendar whether an rdate
> (without time) is meant as a whole-day recurrence, even if the original
> event itself had a time associated, of if it's meant to recur at the same
> time.
>
> I just found a page summarizing the discussion, and it really seems I got
> it wrong ;-)
> http://tipi.sourceforge.net/doc/recur/apa.html
> Note that Frank Dawson is one of the authors of rfc 2445, so what he says
> about the intend is quite definitive.
>
> Will change it.

I'm glad you found something reasonably authoritative. Good.

> > The following methods only set or return values for the default RRULE,
> > rather than for all recurrence components combined.  This is not what one
> > would expect, and not what the comments in the header file say.
> >     setEndDate()
> >     setEndDateTime()
> >     duration()
> >     durationTo()
> >     setDuration()
>
> With the same reason as all add set* and add* methods: The methods of the
> Recurrence class are meant as a shortcut only for the simple case where
> only one rrule is involved. If you use more than one RRULE, they will
> typically have different durations/enddates, so you can't use these methods
> anyway. Also, for multiple rrules, you'll have to go the direct way via
> RecurrenceRule anyway, so there's no point in providing methods for that
> case.
> I added a comment locally in the documentation of the Recurrence class to
> make this point clear.

For duration() and durationTo(), I definitely think that the Recurrence class 
should return the number of recurrences taking account of all recurrence 
components. The Recurrence class is the class which encapsulates the overall 
recurrence (incorporating all its components), and it should be capable of 
returning the overall number of occurrences for all components combined. It's 
the sort of code which people don't want to have to reinvent, but which can 
be relatively easily incorporated into an encapsulating class. I also think 
that the combined number of occurrences is the intuitive meaning of these 
methods. If somebody actually wants just the number of occurrences for the 
default RRULE, it's easy to get this via a call to defaultRRule(), etc.

For setEndDate(), setEndDateTime() and setDuration() I can perhaps accept what 
you say, although if duration() and durationTo() return the total duration, 
setDuration() in particular becomes a bit doubtful.

Cheers,
David.

-- 
David Jarvie.
KAlarm author and maintainer.
http://www.astrojar.org.uk/linux/kalarm.html
_______________________________________________
kde-pim mailing list
kde-pim@kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
kde-pim home page at http://pim.kde.org/

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic