Uploaded image for project: 'Apache Flex'
  1. Apache Flex
  2. FLEX-20951

[Localization]: DateFormatter.parseDateString does not support non-latin characters in month and days names

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • Adobe Flex SDK 3.4 (Release)
    • Apache Flex 4.10.0
    • Formatters
    • Affected OS(s): All OS Platforms
      Affected OS(s): All OS Platforms
      Browser: Firefox 3.x
      Language Found: English

    Description

      Steps to reproduce:

      1. Unzip and run the attached application from "Test_Date.zip" file that has applied custom resource bundle filled with localized string resources in French for month and day names.

      2. Defined DateFormatter instance in MXML with the following format - "MMMM D, YYYY JJ:NN" to make sure that string values of month names will be visible.

      3. Apply date formatting by calling "dtFormatter.format" method that receives input unformatted value typed as String, e.g

      dtFormatter.format(new Date(2007,11,10).toString())

      Actual Results:

      Date value that contains "Décembre" month name (December in French) is not parsed correctly by DateFormatter.parseDateString

      Expected Results:

      Date value that contains "Décembre" month name (December in French) is parsed correctly by DateFormatter.parseDateString

      Workaround (if any):

      Never use DateFormatter.parseDateString method for languages other then English or pass input value typed as String to "dtFormatter.format" method, instead rely only on passing input value typed as Date to "dtFormatter.format" method

      The problem lies in lines 137-138 of DateFormatter.as

      // Scan for groups of numbers and letters
      // and match them to Date parameters
      if ("a" <= letter && letter <= "z" ||
      "A" <= letter && letter <= "Z")

      Attachments

        Activity

          People

            Unassigned Unassigned
            adobejira Adobe JIRA
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: