|
static QDate | fixedDate (QCalendar::YearMonthDay parts, QCalendar cal) |
|
static QDate | fixedDate (QCalendar::YearMonthDay parts) |
|
static QString | toOffsetString (Qt::DateFormat format, int offset) |
|
static bool | inDateTimeRange (qint64 jd, DaySide side) |
|
static QDateTime | toEarliest (QDate day, const QTimeZone &zone) |
|
static QDateTime | toLatest (QDate day, const QTimeZone &zone) |
|
static qint64 | msecsToJulianDay (qint64 msecs) |
|
static QDate | msecsToDate (qint64 msecs) |
|
static QTime | msecsToTime (qint64 msecs) |
|
static bool | daysAndMillisOverflow (qint64 days, qint64 millisInDay, qint64 *sumMillis) |
|
static qint64 | timeToMSecs (QDate date, QTime time) |
|
static bool | millisInSystemRange (qint64 millis, qint64 slack=0) |
|
static int | systemTimeYearMatching (int year) |
|
static auto | millisToWithinRange (qint64 millis) |
|
static constexpr QDateTimePrivate::TransitionOptions | toTransitionOptions (QDateTime::TransitionResolution res) |
|
static constexpr QDateTimePrivate::TransitionOptions | toTransitionOptions (QDateTimePrivate::DaylightStatus dst) |
|
static QDateTimePrivate::ZoneState | stateAtMillis (const QTimeZone &zone, qint64 millis, QDateTimePrivate::TransitionOptions resolve) |
|
static bool | specCanBeSmall (Qt::TimeSpec spec) |
|
static bool | msecsCanBeSmall (qint64 msecs) |
|
static constexpr QDateTimePrivate::StatusFlags | mergeSpec (QDateTimePrivate::StatusFlags status, Qt::TimeSpec spec) |
|
static constexpr Qt::TimeSpec | extractSpec (QDateTimePrivate::StatusFlags status) |
|
static constexpr QDateTimePrivate::StatusFlags | mergeDaylightStatus (QDateTimePrivate::StatusFlags sf, QDateTimePrivate::DaylightStatus status) |
|
static constexpr QDateTimePrivate::DaylightStatus | extractDaylightStatus (QDateTimePrivate::StatusFlags status) |
|
static qint64 | getMSecs (const QDateTimeData &d) |
|
static QDateTimePrivate::StatusFlags | getStatus (const QDateTimeData &d) |
|
static Qt::TimeSpec | getSpec (const QDateTimeData &d) |
|
static bool | usesSameOffset (const QDateTimeData &a, const QDateTimeData &b) |
|
bool | areFarEnoughApart (qint64 leftMillis, qint64 rightMillis) |
|
static void | refreshZonedDateTime (QDateTimeData &d, const QTimeZone &zone, QDateTimePrivate::TransitionOptions resolve) |
|
static void | refreshSimpleDateTime (QDateTimeData &d) |
|
static void | checkValidDateTime (QDateTimeData &d, QDateTime::TransitionResolution resolve) |
|
static void | reviseTimeZone (QDateTimeData &d, const QTimeZone &zone, QDateTime::TransitionResolution resolve) |
|
static void | setDateTime (QDateTimeData &d, QDate date, QTime time) |
|
static std::pair< QDate, QTime > | getDateTime (const QDateTimeData &d) |
|
static void | massageAdjustedDateTime (QDateTimeData &d, QDate date, QTime time, bool forward) |
|
Qt::weak_ordering | compareThreeWay (const QDateTime &lhs, const QDateTime &rhs) |
|
size_t | qHash (const QDateTime &key, size_t seed) |
| \qhashold{QHash}
|
|
size_t | qHash (QDate key, size_t seed) noexcept |
| \qhashold{QHash}
|
|
size_t | qHash (QTime key, size_t seed) noexcept |
| \qhashold{QHash}
|
|
static bool millisInSystemRange |
( |
qint64 | millis, |
|
|
qint64 | slack = 0 ) |
|
inlinestatic |
Tests whether system functions can handle a given time.
The range of milliseconds for which the time_t-based functions work depends somewhat on platform (see computeSystemMillisRange() for details). This function tests whether the UTC time millis milliseconds from the epoch is in the supported range.
To test a local time, pass an upper bound on the magnitude of time-zone correction potentially needed as slack: in this case the range is extended by this many milliseconds at each end (where applicable). The function then returns true precisely if millis is within this (possibly) widened range. This doesn't guarantee that the time_t functions can handle the time, so check their returns to be sure. Values for which the function returns false should be assumed unrepresentable.
Definition at line 2773 of file qdatetime.cpp.
static int systemTimeYearMatching |
( |
int | year | ) |
|
|
static |
Returns a year, in the system range, with the same day-of-week pattern
Returns the number of a year, in the range supported by system time_t functions, that starts and ends on the same days of the week as year. This implies it is a leap year precisely if year is. If year is before the epoch, a year early in the supported range is used; otherwise, one late in that range. For a leap year, this may be as much as 26 years years from the range's relevant end; for normal years at most a decade from the end.
This ensures that any DST rules based on, e.g., the last Sunday in a particular month will select the same date in the returned year as they would if applied to year. Of course, the zone's rules may be different in year than in the selected year, but it's hard to do better.
Definition at line 2796 of file qdatetime.cpp.