On 2 August 2015 at 19:32, David Jarvie <djar...@kde.org> wrote: > Having a date-only attribute in KDateTime is very useful because it allows > both date-time and date-only values to be encapsulated in a single class. > This avoids having to be able to pass either a QDate or QDateTime or to have > a separate flag everywhere this is used, and it allows date-time values to > be compared to date-only values using class methods. Without this > encapsulation, it would make a significant amount of code more cumbersome. > KAlarm for one will certainly need the equivalent of KDateTime even if it > has to have its own class, but given its use in kcalcore I think it should > be available in a library. Also, do you know that date-only is NOT used > elsewhere (apart from kcalcore and KAlarm)?
lxr tells me it is only KCalCore and KAlarm. KCalCore uses it about 16 times. If we want KCalCore used outside kdepim then I do think they need to try and live without the isDateOnly option and find a nice way of doing it . For KAlarm I don't see a problem with you having your own KADateTime class to do this. John.