Uploaded image for project: 'Daffodil'
  1. Daffodil
  2. DFDL-488

Odd Behavior with 'YYYY' year formatting

    XMLWordPrintableJSON

    Details

    • Type: Wish
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: never
    • Component/s: Back End, ICU
    • Labels:
      None

      Description

      I've noticed that if you use 'YYYY' instead of 'yyyy', the year is parsed as one less than the specified year, and the other values are not parsed correctly.

      Response from Steve:
      Regarding the odd output of YYYY: I'm not exactly sure why this doesn't work, but I'm not surprised. From what I can tell, YYYY is the year part of the ISO Week Date. This uses a modified gregorian calendar, so I'm not surprised you're getting odd results. However, I've tried creating a pattern that uses the ISO Week Date formatting symbols ("YYYY-'W'ww-e") and try to parse the examples from the wiki page. I get dates similar to the examples, but they are usually off by a few days. So I'm not sure what's wrong. I don't think this is a blocker for Spin 7, so please create a new bug for the YYYY issue, and we'll fix it as we find time.

      See test datePattern01b in daffodil-test/src/test/resources/daffodil/section05/simple_types/SimpleTypes.tdml

        Gliffy Diagrams

          Attachments

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              jchab Jessie Chab
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:

                  Tasks