This is something the XML Schema group is going to have to decide.  

First of all, the client must be able to distinguish an interval of 1M as
distinct from any arbitrary number of days.  Though a set start date of the
duration would allow it to be resolved to a fixed number of days, it may be
used in to represent a repeating duration (you pay your rent on 1 Jan 2000
and then at 1 month intervals) where the number of days is not constant.

The issue for validation is how to do comparisons to allow the min and max
constraints.  I see two options: set a conversion factor for months and
years that allow comparisions between durations where one of both terms
contain fuzzy terms, or state that any comparision mixing years and months
with days, hours, etc fail.

If the first approach is used, I refined the values for months and years to
their average length in a 400 year cycle in seconds in the Schema comment
http://lists.w3.org/Archives/Public/www-xml-schema-comments/2000JanMar/0073.
html  This should be an improvement over 1Y == 360 days.

If the second approach is used then the behavior would mimic the situation
with NaN's in real numbers.  (Also an issue that the Schema WG needs to
directly resolve, though I think the discussion in
http://lists.w3.org/Archives/Public/www-xml-schema-comments/2000JanMar/0025.
html frame the expected behavior fairly well)

Basically, any comparision between durations that involve both precise
(days, hours, etc) and imprecise (months, years) would fail and violate the
facet.  This would result in some unexpected behavior.  For example, PT1S
would not be allowable if the max constraint was P10Y.

Hopefully, you can design the timeDuration support so that either of these
options could be implemented without radical surgery.

Reply via email to