Uploaded image for project: 'OASIS Open Data Protocol (OData) TC'
  1. OASIS Open Data Protocol (OData) TC
  2. ODATA-281

Keep second() as integer, introduce FractionalSeconds

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: V4.0_WD01
    • Fix Version/s: V4.0_WD01
    • Component/s: ABNF, Protocol, URL Conventions
    • Labels:
      None
    • Environment:

      [Proposed]

      Description

      ODATA-215 was originally intended to address the apparent overlap between hour, minute, and second functions for datetimeoffset and duration datatypes, and did so by replacing the not-terribly-useful hour/minute/second functions for duration with a totalseconds function.

      Along the way we also noted that we had no way to represent fractional seconds, and so we changed the return type of the second function for datetimeoffset to return a decimal.

      Upon further reflection, I think this is inconsistent; the second portion is a separate portion from fractional seconds, just as day is separate from hour is separate from minute is separate from second. I would instead like to keep second() an integer, and introduce a fractionalsecond function that returns the fractional seconds as a decimal value <1.

      This is more consistent, for example, with how SQL and many programming languages handle parts of datetime functions.

        Attachments

          Activity

            People

            • Assignee:
              handl Ralf Handl
              Reporter:
              mikep Michael Pizzo (Inactive)
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: