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

Adding small durations together and converting them to larger durations? #276

peterhurford opened this issue Nov 14, 2014 · 2 comments


Copy link

> minutes(10) + seconds(50) + seconds(11)
[1] "10M 61S"

Is there a way to get it to equal 11M 01S instead? Or a function to apply to 10M 61S to convert it to 11M 01S?

I've spent a fair bit of time looking through the documentation, other issues, and some source code, but I may still be missing something obvious.

@vspinu vspinu closed this as completed in c9d832b Dec 13, 2014
Copy link

vspinu commented Dec 13, 2014

With the most recent dev version you can do:

> as.period(minutes(1000) + seconds(50) + seconds(11), unit = "hours")
[1] "16H 41M 1S"
> as.period(minutes(1000) + seconds(50) + seconds(11), unit = "minute")
[1] "1001M 1S"

Copy link

Works for me. Thanks!

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

No branches or pull requests

2 participants