Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-4332

Using short format in Datebox results in the wrong year after ZK-4242 in Thai locale

XMLWordPrintable

    • ZK 8.6.3 S1

      Steps to Reproduce

      http://zkfiddle.org/sample/3eq32v6/1-ZK-4242

      1. Open the datebox
      2. Choose 01/01/2443 (AD1900)
      3. Open the datebox again

      Current Result

      It shows "1 ม.ค.2543" (AD2000) in left datebox

      Expected Result

      It shows "1 ม.ค.2443" (AD1900) in both dateboxes

      Debug Information

      https://github.com/zkoss/zk/blob/v8.6.2/zul/src/archive/web/js/zul/db/datefmt.js#L242
      y = 1900, newY = 43, triggers yy to yyyy
      Since ZK stores year in AD internally, it is assumed the year is modified.
      It should take this._localizedSymbols.YDELTA into consideration.

      Workaround

      Use full year format instead (like dd MMM yyyy)

            rudyhuang rudyhuang
            rudyhuang rudyhuang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 4 hours
                4h
                Remaining:
                Time Spent - 2 hours Remaining Estimate - 2 hours
                2h
                Logged:
                Time Spent - 2 hours Remaining Estimate - 2 hours
                2h