Uploaded image for project: 'Daffodil'
  1. Daffodil
  2. DAFFODIL-2670

dfdx additional date, time, and dateTime constructors

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 3.3.0
    • None
    • Back End, Front End
    • None

    Description

      These functions are needed for enabling convenient conversion of binary date/time data into xs:date, xs:time, or xs:dateTime types.

       

      dfdlx:date($year as AnyAtomicType, $month as AnyAtomicType, $day as AnyAtomicType): xs:date
      dfdlx:time($hour as AnyAtomicType, $minute as AnyAtomicType, $second as AnyAtomicType): xs:time
      

       

       

      Variations of the time constructor that also allow for timezone information, fractional seconds are possibly needed, but the above, along with the two arg fn:dateTime constructor (see DAFFODIL-2669) already defined by DFDL, enable constructing an xs:dateTime type from a bunch of binary components giving each part of the dateTime.

       

      fn:dateTime($arg1 as xs:date, $arg2 as xs:time) as xs:dateTime

       

      The alternative is you have to clumsily create a string that looks like an iso dateTime, and then feed that to xs:dateTime constructor. 

      Attachments

        Activity

          People

            Unassigned Unassigned
            mbeckerle Mike Beckerle
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: