summaryrefslogtreecommitdiffstats
path: root/src/corelib/time/qdatetime.h
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2019-06-05 10:50:28 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2019-07-01 17:49:09 +0200
commita4f5f25eb05f49474eaef665abdbcaad9203ba48 (patch)
tree7c40ba35dc2f7b67caea8ee3df87e98c8ee6608b /src/corelib/time/qdatetime.h
parent8bfae093ed46935a5f8e67ede92ee65a6a379405 (diff)
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 <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/time/qdatetime.h')
-rw-r--r--src/corelib/time/qdatetime.h4
1 files changed, 4 insertions, 0 deletions
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;