… suck.

The XML Schema “datetime” format can’t be handled by Java’s SimpleFormat (ok, that probably is more Javas fault, of not being able to handle hours:minutes in the timezone specification, anyway, this is mildy annoying).

The XSLT2 parsers are very intolerant about the format of the time specification, too. They could have made more stuff optional such as the specification of seconds; an error here will make the whole XSLT fail with an exception. Some compact form of error handling would be nice… as would be a smart parser which can handle various formats.

The XML Schema “duration” is even worse. First of all, it was completely forgotton when doing XSLT 2; there are no functions to format or disassemble it (except by regular expressions, which could also use a zero-width lookahead).

Secondly, it’s lacking common specifications such as “next week”. While “next week” is computationally equivalent to “in 7 days”, it can have different semantics in some contexts (especially when not being aligned):

If I’m looking for the week February 9th 2007 is in, the result is February 5th two February 11th. If I’m looking at a 7 day interval containing this day, there are infinite possibilities (aligned on milliseconds and below…). So it does make sense to make a difference between 7 days and a week.