-
Notifications
You must be signed in to change notification settings - Fork 214
Closed
Labels
bugan unexpected problem or unintended behavioran unexpected problem or unintended behavior
Description
Hi,
I'm trying to parse a very simple date format, which appears as either %d-%b-%Y, %b-%Y or %Y.
parse_date_time() works great for the 1st and 3rd formats, but is unable to parse the second one (though guess_date() successfully guesses the right format).
Examples:
> parse_date_time("May-2010", orders="bY")
[1] NA
Warning message:
All formats failed to parse. No formats found.
> guess_formats("May-2010", orders="bY")
bY
"%b-%Y"
> parse_date_time("May-2010", orders="%b-%Y")
[1] NA
Warning message:
All formats failed to parse. No formats found.
> parse_date_time("May-2010", orders="Y")
[1] "2010-01-01 UTC"
> parse_date_time("01-May-2010", orders="dbY")
[1] "2010-05-01 UTC"
I'm using R 3.3.1, with lubridate 1.6.0, on a Windows machine with "English_Australia.1252" locale.
Metadata
Metadata
Assignees
Labels
bugan unexpected problem or unintended behavioran unexpected problem or unintended behavior