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

DPath: Functions year-from-date and year-from-datetime not handling negatives properly

XMLWordPrintableJSON

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • s15
    • s15
    • None
    • None

      xs:date and xs:datetime allow negative integers for the year but the functions fn:year-from-datetime and fn:year-from-date do not process this correctly. With a year of -0001, the functions both return 2 for the year instead of the expected -1.

      See tests:
      test_xfromdatetime_04
      test_xfromdate_03

      In files:
      daffodil-test/src/test/resources/edu/illinois/ncsa/daffodil/section23/dfdl_functions/Functions.tdml
      daffodil-test/src/test/scala-debug/edu/illinois/ncsa/daffodil/section23/dfdl_expressions/TestDFDLExpressionsDebug.scala

              efinnegan Elizabeth Finnegan
              efinnegan Elizabeth Finnegan
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - Not Specified
                  Not Specified
                  Logged:
                  Time Spent - 25 minutes
                  25m