joemfb / ml-search-ng

angular module for MarkLogic search applications
https://joemfb.github.io/ml-search-ng/
9 stars 10 forks source link

remove weeks from ml-duration #70

Closed joemfb closed 9 years ago

joemfb commented 9 years ago

While wikipedia discusses weeks as valid ISO duration values, xs:duration includes nothing about weeks. I have been unable to create a valid xs:duration including a week in XQuery.

Therefore, weeks should be removed from the ml-duration directive and duration filter

re #30, #53

grtjn commented 9 years ago

A search among the fn function yields:

fn:days-from-duration
fn:hours-from-duration
fn:minutes-from-duration
fn:months-from-duration
fn:seconds-from-duration
fn:subtract-dateTimes-yielding-dayTimeDuration
fn:subtract-dateTimes-yielding-yearMonthDuration
fn:years-from-duration

E.g. no weeks..

joemfb commented 9 years ago

So, invalid in XML, but potentially valid in other environments. Appears to be valid ISO 8601 ...

Probably safe to leave it.