Details
-
Bug
-
Resolution: Duplicate
-
Not Evaluated
-
None
-
6.0.0 Beta2
-
None
Description
QDate::fromString("05.12.20", QLocale::system().dateFormat(QLocale::ShortFormat));
returns 05.12.1920 even we're in the 21st century for some years now. Although this can't be changed for Qt5 I would assume it's fine for Qt6. The affecting code is in qdatetimeparser.cpp / QDateTimeParser::fromString():
QDateTime val(QDate(1900, 1, 1).startOfDay());
Attachments
Issue Links
- duplicates
-
QTBUG-82886 Qt::DefaultLocaleShortDate / QLocale::ShortFormat date parsing doesn't deal with 4-digit years
- Open
-
QTBUG-74323 QDate::from string gives wrong year
- Closed
For Gerrit Dashboard: QTBUG-89147 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
326021,1 | WIP: Add centuryStart parameters to date-time parsing methods | dev | qt/qtbase | Status: NEW | -2 | 0 |