3 ms·
Interesting, didn't know about that! Do you know of some canonical way of expressing negative offsets in spirit of ISO 8601? I don't seem to see those mentioned
by akavel 6y ago
Interesting, didn't know about that! Do you know of some canonical way of expressing negative offsets in spirit of ISO 8601? I don't seem to see those mentioned in the article...
- grenoire 6y agoUnfortunately not, for the project I'm working on right now I only needed 'forward' durations. There's a W3C extension that proposes a preceding - sign for negative durations, which I think it's fair https://www.w3.org/TR/xmlschema-2/#duration https://www.w3.org/TR/xmlschema-2/#duration. The ISO standard explicitly declares durations to be non-negative, on the other hand. As close to canonical as you can get.
- rswail 6y agoYou can specify an interval as start/duration, start/end, or duration/end. So you could specify a negative offset as a duration and the end time. P2H/2021-02-26T13:30Z is two hours prior or T11:30Z on the same date.