tidyverse / lubridate

Make working with dates in R just that little bit easier
https://lubridate.tidyverse.org
GNU General Public License v3.0
731 stars 207 forks source link

ymd_hms() producing wrong answer #1086

Closed shafiul0304034 closed 1 year ago

shafiul0304034 commented 1 year ago

ymd_hms(c("10-09-2011 10:00", "11-09-2011 10:00", "13-09-2011 10:00", "17-09-2011 10:00")) should produce "NA" value. Instead, it produces [1] "2010-09-20 11:10:00 UTC" "2011-09-20 11:10:00 UTC" "2013-09-20 11:10:00 UTC" "2017-09-20 11:10:00 UTC"

vspinu commented 1 year ago

2011 is parsed as day-hour. See #1077 for how this will be tackled in the next release.