Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-11589

No way to use Standalone Month Name in QML

    XMLWordPrintable

Details

    Description

      There's currently no way to use the StandaloneFormat [1] of longMonthName [2]. Qt object's only date functions - formatDate and formatDateTime [3] use QDate::toString() which assumes that DateFormat [1] should be used. In Polish language this results in it being impossible to format a date without day-of-month, like:

      June 2010

      which instead of

      Czerwiec 2010

      becomes

      czerwca 2010

      that can be compared to

      of July 2010

      in English

      My proposal is to add an additional format "MMMMM" (5 Ms) that would use longMonthName with QDate::StandaloneFormat as the second argument, returning a singular, basic format of the month name.

      I can provide a patch with that behavior if it's deemed an acceptable solution.

      [1] http://doc.qt.nokia.com/4.7-snapshot/qdate.html#MonthNameType-enum
      [2] http://doc.qt.nokia.com/4.7-snapshot/qdate.html#longMonthName
      [3] http://doc.trolltech.com/main-snapshot/qml-qt.html#formatDate-method
      [4] http://qt.gitorious.org/qt/qt/blobs/4.7/src/corelib/tools/qdatetime.cpp#line3829
      [5] http://doc.qt.nokia.com/4.7-snapshot/qdate.html#longMonthName-2

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            laknoll Lars Knoll
            saviq MichaƂ Sawicz
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes