arrow icon indicating copy to clipboard operation
arrow copied to clipboard

Investigate support for ISO 8601 Durations/Time Intervals

Open systemcatch opened this issue 5 years ago • 3 comments

ISO 8601 allows durations and time intervals, maybe we should consider supporting this in arrow via a separate class or some other method.

https://en.wikipedia.org/wiki/ISO_8601#Durations

This is quite a bit of work so we'd need to know this would actually be useful and used.

systemcatch avatar Feb 18 '20 11:02 systemcatch

Why not just parse durations into a timedelta?

Though I guess timedeltas would have to be expanded to support years, months and weeks as those are not part of timedeltas though.

jmgurney avatar Feb 25 '20 08:02 jmgurney

That is one option, we could also subclass timedelta to provide better usability and extra methods.

systemcatch avatar Feb 25 '20 15:02 systemcatch

Perhaps https://pypi.org/project/isodate/ provides some ideas on how this could be supported? Both formatting and parsing would be features I would like to see in Arrow if possible.

mdxs avatar Jun 29 '20 13:06 mdxs