QDate also encodes time of day?
-
I'm wondering if QDate actually stores the time of day
in addition to the date.
QDate appears to be just a container for a 64-bit value.
The QDate header file just points to qdatetime.h.
If it does encode date+time, and it was possibly formerly qdatetime, why does it not provide methods for accessing time of day? -
I'm wondering if QDate actually stores the time of day
in addition to the date.
QDate appears to be just a container for a 64-bit value.
The QDate header file just points to qdatetime.h.
If it does encode date+time, and it was possibly formerly qdatetime, why does it not provide methods for accessing time of day? -
@clarify
Why do you ask or care? It doesn't offer time of say because it's a date, not a datetime. There areQDate::startOfDay()andendOfDay()as the access point to aQDateTime, but nothing in-day. -
@JonB
I'm just a caring person, I suppose.
But I do kind of wonder why it's not implemented as a struct.
It's just a container of 1 value and some methods.
It's a class that doesn't descend from any other class. -
@clarify
If your question is aboutstructversusclassin C++, there is no effective difference between them (other than minor point about public visibility), classes do not have to inherit, so that is not an issue. -
@JonB
There is also the question of adjusting for things like leap minutes added at the end of a year.