From a4f5f25eb05f49474eaef665abdbcaad9203ba48 Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Wed, 5 Jun 2019 10:50:28 +0200 Subject: Move YearRange to QDateTime from its Private As planned when adding YearRange: now that it's merged up to dev, move it to QDateTime, since we can add to the API at 5.14.0. This follows up on commit 82ad4be4a2e0c2bccb6cd8ea2440aefee4ec48ec. Change-Id: I81b6c2331121a71e2592514781c02c5756e70c52 Reviewed-by: Thiago Macieira --- src/corelib/time/qdatetime.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/corelib/time/qdatetime.h') diff --git a/src/corelib/time/qdatetime.h b/src/corelib/time/qdatetime.h index 3e3b953b52..89ea4ee24a 100644 --- a/src/corelib/time/qdatetime.h +++ b/src/corelib/time/qdatetime.h @@ -384,6 +384,10 @@ public: NSDate *toNSDate() const Q_DECL_NS_RETURNS_AUTORELEASED; #endif + // (1<<63) ms is 292277024.6 (average Gregorian) years, counted from the start of 1970, so + // Last is floor(1970 + 292277024.6); no year 0, so First is floor(1970 - 1 - 292277024.6) + enum class YearRange : qint32 { First = -292275056, Last = +292278994 }; + private: friend class QDateTimePrivate; -- cgit v1.2.3