Replacement for KDateTime
djarvie at kde.org
Mon Aug 3 13:26:12 BST 2015
On Monday 03 Aug 2015 12:59:59 you wrote:
> 2015-08-02 21:32 GMT+03:00 David Jarvie <djarvie at kde.org>:
> > Date-only KDateTime instances are not only used for Event start/end
> > timestamps. In KAlarm they are also used among other things for alarm snooze
> > times (independently of whether the event is date-only or not). So usage of
> > the date-only attribute is *not* restricted to Events (even if that is all
> > it is used for in kcalcore).
> Sorry for injecting myself, but IMO there's no such thing as Date-only and
> what you need is something like QDateTimeRange (just made up) where you would
> have start QDateTime, end QDateTime and it could represent any Event/Interval.
> Like whole day, part of day or even multiple days. And could also check whether
> some QDateTime is inside this range.
Date-only extends the current QDateTime concept to allow it to represent a single date (which is intrinsically a time range) or a single date-time, without requiring any extra date-time information to be stored - only a boolean flag is required to indicate whether the time component should be ignored.
A generalised time range on the other hand requires storing distinct start and end times, and cannot (except for special cases) be represented by a single date or date-time.
KAlarm author -- http://www.astrojar.org.uk/kalarm
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the kde-core-devel