Skip to content
New issue

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

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

Already on GitHub? # to your account

Problems with calculating years at leapdays #263

Closed
MansMeg opened this issue Sep 28, 2014 · 1 comment
Closed

Problems with calculating years at leapdays #263

MansMeg opened this issue Sep 28, 2014 · 1 comment

Comments

@MansMeg
Copy link

MansMeg commented Sep 28, 2014

I'm having problems calculating years with leapyears.

library(lubridate)
dates <- ymd("2000-02-29", "2000-02-28")
intervals <- interval(start = dates, end = ymd("2014-09-25"))
try(intervals %/% years(1))
cat(geterrmessage())
## Error in while (any(start + est * per < end)) est[start + est * per <  : 
##   missing value where TRUE/FALSE needed
packageVersion("lubridate")
## [1] '1.3.3'
sessionInfo()
## R version 3.1.1 (2014-07-10)
## Platform: x86_64-apple-darwin13.1.0 (64-bit)
## 
## locale:
## [1] sv_SE.UTF-8/sv_SE.UTF-8/sv_SE.UTF-8/C/sv_SE.UTF-8/sv_SE.UTF-8
## 
## attached base packages:
## [1] stats     graphics  grDevices utils     datasets  methods   base     
## 
## other attached packages:
## [1] lubridate_1.3.3
## 
## loaded via a namespace (and not attached):
##  [1] digest_0.6.4     evaluate_0.5.5   formatR_0.10     htmltools_0.2.4 
##  [5] knitr_1.6        memoise_0.2.1    plyr_1.8.1       Rcpp_0.11.1     
##  [9] rmarkdown_0.2.64 stringr_0.6.2    tools_3.1.1      yaml_2.1.13
@vspinu
Copy link
Member

vspinu commented Dec 13, 2014

Duplicate of #235

@vspinu vspinu closed this as completed Dec 13, 2014
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants