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

List:       kde-core-devel
Subject:    Re: Replacement for KDateTime
From:       Dāvis Mosāns <davispuh () gmail ! com>
Date:       2015-08-09 16:26:38
Message-ID: CAOE4rSxmfnEDXFHLbqD0smzvvoSCOvD6zupeA6hhtv_yWfXhDA () mail ! gmail ! com
[Download RAW message or body]

2015-08-09 17:54 GMT+03:00 Sergio Martins <iamsergio@gmail.com>:
> On Monday, August 03, 2015 14:59:59 D=C4=81vis Mos=C4=81ns wrote:
>> Sorry for injecting myself, but IMO there's no such thing as Date-only a=
nd
>> 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 e=
vents
> 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 differe=
nt...
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 respec=
tive
format and timezone. Any other way makes it only more complicated.
[prev in list] [next in list] [prev in thread] [next in thread] 

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