Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Inconsistent recognition of incorrect input, given locale, in ymd and mdy #255
R version 3.1.0 lubridate 1.3.3.
ymd("1989, Hydref 17")
referenced this issue
Aug 24, 2014
Well, lubridate tries to be smart about huge number of formats. In this case it does a good job for your locale because it interprets "121975" as "1975-10-12 UTC". Which is not what you need but it's the only logical answer for
A good way out is to recognize the English months and parse the date correctly irrespective of the current locale. I hope to be able to implement this in the relatively close future.
No criticism intended. Actually I suppose it was the 2075 that caught my intention. Interestingly, your comment above is wrong: "121975" [isn't interpreted] as "1975-10-12 UTC" but, as you show, "2075-12-19 UTC". I wonder whether guessing "2075" when a "1975" is present really is the best choice at this time in the current century (irrespective of locale)?
The code and the comments are correct. This is how it is intended to work. You ask for
There is a small issue in that code though. The 75 is interpreted as 2075 and it should probably be 1975 in order to be consistent with how