Build a systematic test suite. Based on xsd:date xsd:dateTime xsd:dateTimeStamp to start with. Maybe time:numericPosition. General case is not possible. Also see #1236