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

Comments

Projects
None yet
2 participants
@toph-allen

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 label Aug 2, 2016

@vspinu

This comment has been minimized.

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