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

When passed a year, parse_date_time() returns the last day of the previous year. #448

Closed
toph-allen opened this issue Jul 28, 2016 · 1 comment
Labels
bug an unexpected problem or unintended behavior

Comments

@toph-allen
Copy link

toph-allen commented Jul 28, 2016

When using lubridate 1.5.6, parse_date_time() returns an incorrect value when evaluating a year by itself. For example:

> parse_date_time("2016", orders = "y")
[1] "2015-12-31 UTC"
> parse_date_time("2016", orders = "y") %>% year()
[1] 2015

Reverting to 1.5.0 fixes this.

> parse_date_time("2016", orders = "y")
[1] "2016-01-01 UTC"
> parse_date_time("2016", orders = "y") %>% year()
[1] 2016

This doesn't seem to happen with other orders, e.g. "ymd".

@vspinu vspinu added the bug an unexpected problem or unintended behavior label Aug 2, 2016
@vspinu
Copy link
Member

vspinu commented Aug 3, 2016

I think this was the consequence of #418.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

2 participants