Closed cedx closed 2 years ago
Have you considered https://moment.github.io/luxon/api-docs/index.html#duration ?
No 😄 I had used it a long time ago and completely forgotten about it. I just searched for "duration" on NPM and found that your library was the most interesting in terms of APIs. Thank you for reminding me that Luxon exists.
I guess you don't plan to add this feature? Do I close this ticket?
I might consider a Duration.parseISO
, but I won't be working on it anytime soon.
OK, I understand. I prefer to close this ticket then. Thank you for taking the time to respond.
It's quite common nowadays to deal with ISO 8601 durations (cf. https://en.wikipedia.org/wiki/ISO_8601#Durations). Currently we have to convert the format string ourselves before using it with the
Duration
class. It would be cool if theDuration.parse()
method could handle the ISO 8601 format.