OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

odata message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: [OASIS Issue Tracker] Updated: (ODATA-215) Remove hour(), minute() and second() query functions and add corresponding overloads to the hours(), minutes(), and seconds() functions


     [ http://tools.oasis-open.org/issues/browse/ODATA-215?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Pizzo updated ODATA-215:
--------------------------------

    Proposal: 
See summary

Additionally change return type of seconds from Int32 to Decimal(14,12) to capture the fractional picoseconds.

Alternate Proposal:
Fix the definition of days() hours() minutes() and seconds():
-rename to total_days(), total_hours(), total_minutes() and total_seconds(), to avoid confusion
-the values should be doubles returning the total value of the duration in days, hours, minutes, or seconds

  was:
See summary

Additionally change return type of seconds from Int32 to Decimal(14,12) to capture the fractional picoseconds.


I think the problem is the fact that the definition of days() hours() minutes() seconds() for duration is wrong. 

For duration what is interesting is the total duration in days, hours, minutes, or seconds. It's not interesting to find out the day component, hour component, etc., especially if we don't define some normalization, as 48 hours could have any number of representations, such as: PT2D or PT48H or PT1D24H or...

Note that, given this definition, the value of hours should (of course) NOT be restricted to 23, nor minutes/seconds to 60.

> Remove hour(), minute() and second() query functions and add corresponding overloads to the hours(), minutes(), and seconds() functions
> ---------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: ODATA-215
>                 URL: http://tools.oasis-open.org/issues/browse/ODATA-215
>             Project: OASIS Open Data Protocol (OData) TC
>          Issue Type: Improvement
>          Components: OData ABNF Construction Rules v1.0, OData URL Conventions v1.0
>    Affects Versions: WD01
>         Environment: [Proposed]
>            Reporter: Ralf Handl
>            Priority: Minor
>             Fix For: WD01
>
>
> Both the hour() and hours() function returns an integer, and as the values returned are in the range of 0..23, the plural form of the name is more appropriate.
> Same reasoning for minute() and minutes(), second() and seconds().
> Btw., why do second() and seconds() return integers? We allow fractional seconds for DateTimeOffset, Duration, and TimeOfDay.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://tools.oasis-open.org/issues/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]