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
duration() ignores decimal elements when parsing #519
Comments
I think it is a duplicate and fixed by #465. |
Yes, you are correct. Sorry, I should have checked the dev version first. |
No problem. You will next time :) |
Wait, i'm an idiot. I tested The issue remains.
(lubridate_1.6.0.9009) |
OK I see. library(lubridate)
#>
#> Attachement du package : 'lubridate'
#> The following object is masked from 'package:base':
#>
#> date
duration("1.5 hours")
#> [1] "3600s (~1 hours)"
duration("1 hour 30 min")
#> [1] "5400s (~1.5 hours)"
duration(1.5, "hours")
#> [1] "5400s (~1.5 hours)" behind the scene when lubridate:::parse_period("1.5 hours")
#> [1] "1H 0M 0S" that is converted to duration and returns So,
Not my decision, we should wait for @vspinu advice. |
It's a limitation of the unit parsing mechanism. Fractional units are not recognized yet. It will be fixed on the before the next release. |
The text was updated successfully, but these errors were encountered: