Uploaded image for project: 'MyFaces Trinidad'
  1. MyFaces Trinidad
  2. TRINIDAD-2224

Client DateTimeConverter _fix2DYear does not handle th_TH locale

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.0.0-core
    • 2.0.2-core
    • Components
    • None

    Description

      The th_TH calendar uses dates that are offset by 543 years from Gregorian calendar (which Javascript uses). The client DateTimeConverter handles this by adding/subtracting from the Gregorian value during formatting/parsing user strings.

      However, when the user enters a 2 digit year string and the parsing code calls _fix2DYear to adjust it to the correct century, it does not account for the offset. The value, specified in trinidad-config.xml as two-digit-year-start, is defaulted to 1950 and the documentation states that it is treated as a Gregorian year. The code should adjust the two-digit to Thai calendar while calculating, otherwise the parsed value would be off.

      Attachments

        1. branch121262_2224_thai2DigitYears.diff
          3 kB
          Yee-Wah Lee
        2. branch121270_2224_thai2DigitYears.diff
          3 kB
          Yee-Wah Lee
        3. trunk_2224_DateFormatThaiTwoDigitYears.diff
          3 kB
          Yee-Wah Lee

        Activity

          People

            gabrielle Gabrielle Crawford
            yeelee Yee-Wah Lee
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: