Replacement for KDateTime

Dāvis Mosāns davispuh at gmail.com
Sun Aug 9 17:26:38 BST 2015


2015-08-09 17:54 GMT+03:00 Sergio Martins <iamsergio at gmail.com>:
> On Monday, August 03, 2015 14:59:59 Dāvis Mosāns wrote:
>> 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.
>
> Hi,
>
> iCalendar RFC (which KCalCore implements) distinguishes between all day events
> and events with time. A time interval going from 00:00:00 to 23:59:59 is not
> equivalent to a date only event, so we can't go that route.
>

Interesting, but I don't really see why would need to consider them different...
to me it seems pointless, also by the way to represent while day range
must be from
00:00:00 (including) to 00:00:00 (excluding) as with 23:59:59 you miss
milli/nano-seconds.
When I implement date/time related things I always use timestamps in
UTC everywhere
and when need to display to user or pass to some API then convert to respective
format and timezone. Any other way makes it only more complicated.




More information about the kde-core-devel mailing list