Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.12.8
-
864f9b79fba25b38a1139d67a7b299b63149c470 (qt/qtdeclarative/dev) beea6c18f0b6050e4d2633fba462f2b9b67ab134 (qt/qtdeclarative/5.15)
Description
Format Locale.ShortFormat returns for "28-04-2020" and and Locale.LongFormat "dinsdag 28 april 2020" when used with "nl_NL" .
The documentation(https://doc.qt.io/qt-5/qml-qtqml-date.html#details) describes following:
Locale.LongFormat | The long version of the string; for example, returning "January" as a month name. |
Locale.ShortFormat | The short version of the string; for example, returning "Jan" as a month name. |
Is the Locale.ShortFormat correct or is the documentation false?
Here is the example QML:
import QtQuick 2.12 import QtQuick.Window 2.12 Window { visible: true width: 640 height: 480 title: qsTr("Hello World") Text { text: "The date is: " + new Date().toLocaleDateString(Qt.locale("nl_NL"),Locale.ShortFormat) } }
Attachments
For Gerrit Dashboard: QTBUG-83841 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
303530,4 | Doc: Improve documentation for Date | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
303533,7 | Doc: Improve documentation for QLocale::FormatType | dev | qt/qtbase | Status: MERGED | +2 | 0 |
303664,2 | Doc: Improve documentation for QLocale::FormatType | 5.15 | qt/qtbase | Status: MERGED | +2 | 0 |
303945,2 | Doc: Improve documentation for Date | 5.15 | qt/qtdeclarative | Status: MERGED | +2 | 0 |