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

as.period() fails on intervals containing leap day as start day #202

Closed
thomaszumbrunn opened this issue Sep 2, 2013 · 2 comments
Closed

Comments

@thomaszumbrunn
Copy link

as.period() consistently seems to fail on intervals containing a leap day as the start day if the required unit is "year". Example:

as.period(interval(as.POSIXct("2008-02-29"), as.POSIXct("2013-01-31")), unit = "year")

@uhkeller
Copy link

uhkeller commented Jan 8, 2014

I just stumbled across this bug as well. Not pretty.

> (ymd("1996-02-29") %--% ymd("2011-11-20")) %/% years(1)
Error in while (any(start + est * per > end)) est[start + est * per >  : 
  missing value where TRUE/FALSE needed

@vspinu
Copy link
Member

vspinu commented Dec 13, 2014

Fixed in 960a434 [#284].

@vspinu vspinu closed this as completed Dec 13, 2014
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

3 participants