path: root/src
diff options
authorTopi Reinio <>2020-04-01 10:39:26 +0200
committerTopi Reinio <>2020-04-03 16:05:27 +0200
commit3f783bfad93b77583de915dc35bc40b0500b9275 (patch)
treeabe8666c6ff59f8822bc94190dbc209a92cb6477 /src
parente0d80167c18b5a71acf4dac59f3e6f37292fa397 (diff)
Doc: Clarify equivalence of two QDate instances
Fixes: QTBUG-83212 Change-Id: I627716522a962a4c90c5833446dd62f6a18d7d86 Reviewed-by: Edward Welbourne <>
Diffstat (limited to 'src')
1 files changed, 9 insertions, 7 deletions
diff --git a/src/corelib/time/qdatetime.cpp b/src/corelib/time/qdatetime.cpp
index a5761055ed..3a564d1b9a 100644
--- a/src/corelib/time/qdatetime.cpp
+++ b/src/corelib/time/qdatetime.cpp
@@ -277,10 +277,11 @@ static int fromOffsetString(QStringView offsetString, bool *valid) noexcept
\brief The QDate class provides date functions.
- A QDate object represents a particular date. This can be expressed as a
- calendar date, i.e. year, month, and day numbers, in the proleptic Gregorian
- calendar.
+ A QDate object represents a particular day, regardless of calendar,
+ locale or other settings used when creating it or supplied by the system.
+ It can report the year, month and day of the month that represent the
+ day with respect to the proleptic Gregorian calendar or any calendar supplied
+ as a QCalendar object.
A QDate object is typically created by giving the year, month, and day
numbers explicitly. Note that QDate interprets year numbers less than 100 as
@@ -1572,9 +1573,8 @@ qint64 QDate::daysTo(const QDate &d) const
\fn bool QDate::operator==(const QDate &d) const
- Returns \c true if this date is equal to \a d; otherwise returns
- false.
+ Returns \c true if this date and \a d represent the same day, otherwise
+ \c false.
@@ -1582,6 +1582,8 @@ qint64 QDate::daysTo(const QDate &d) const
Returns \c true if this date is different from \a d; otherwise
returns \c false.
+ \sa operator==()