diff options
author | John Layt <jlayt@kde.org> | 2013-07-26 22:40:14 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-06 01:53:06 +0200 |
commit | 8b02a62685953ad1b1e35750187e3e857d9d3ccd (patch) | |
tree | 64016c9bcd91ef2dfdb669559f4af9d8dcf37034 | |
parent | 35af88b37ea7d0120c86ad721f695b4dcbd8ba3e (diff) |
QDateTime - Remove incorrect year range check
The limit on formatting a year outside the range 0 to 9999 only applies
to Qt::ISODate formatting, not to general date formatting.
Change-Id: Ifc971961412c190d721f23627982283e13d526b6
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
-rw-r--r-- | src/corelib/tools/qdatetime.cpp | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/src/corelib/tools/qdatetime.cpp b/src/corelib/tools/qdatetime.cpp index 481a4b3123..114f97c2e0 100644 --- a/src/corelib/tools/qdatetime.cpp +++ b/src/corelib/tools/qdatetime.cpp @@ -960,17 +960,11 @@ QString QDate::toString(Qt::DateFormat f) const If the datetime is invalid, an empty string will be returned. - \warning The Qt::ISODate format is only valid for years in the - range 0 to 9999. This restriction may apply to locale-aware - formats as well, depending on the locale settings. - \sa QDateTime::toString(), QTime::toString(), QLocale::toString() */ QString QDate::toString(const QString& format) const { - if (year() > 9999) - return QString(); return QLocale::system().toString(*this, format); } #endif //QT_NO_DATESTRING |