Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make as.duration (and others) Accept All ISO8601 Formats #362

Closed
billdenney opened this issue Dec 14, 2015 · 3 comments
Closed

Make as.duration (and others) Accept All ISO8601 Formats #362

billdenney opened this issue Dec 14, 2015 · 3 comments

Comments

@billdenney
Copy link
Contributor

I'd like to be able to use as.duration for durations as specified in ISO8601 like

as.duration("P1Y2M10DT2H30M")

Similarly, it would be nice to be able to define intervals as with all the methods in https://en.wikipedia.org/wiki/ISO_8601#Time_intervals

@vspinu
Copy link
Member

vspinu commented Jan 28, 2018

Period, duration and interval ISO parsing is now in master. See docs and example for period, duration, and interval.

@billdenney
Copy link
Contributor Author

Thank you! Is it too late to ask for as.ISO8601 methods or an extension to as.character formatting? (I could help with a PR with guidance on your implementation preferences.)

@vspinu
Copy link
Member

vspinu commented Jan 29, 2018

It's a good idea. Could you open a new issue for this? PRs are always welcome ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants