-
Type: Improvement
-
Status: Open
-
Priority: Minor
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: Vocabularies
-
Labels:None
-
Environment:
Proposed
-
Proposal:
Next version of OData [protocol |https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html] should support full-fledged duration for Edm.Duration .
The [ABNF|https://docs.oasis-open.org/odata/odata/v4.01/os/abnf/odata-abnf-construction-rules.txt] today states duration value is
[ SIGN ] "P" [ 1*DIGIT "D" ] [ "T" [ 1*DIGIT "H" ] [ 1*DIGIT "M" ] [ 1*DIGIT [ "." 1*DIGIT ] "S" ] ]
i.e. no years or month as defined by W3C's XML dayTimeDuration.
In contrast, ISO 8601-1 2019 5.5.2.2 allows to specify Years and Months.
There are well understood libraries that do support the notion of ISO 8601-1, for example Joda's Period class https://www.joda.org/joda-time/key_period.html
To notion of weeks or month as a duration makes it possible to model calendar recurrence patterns in a less custom way.