gaborcsardi / parsedate

R package to parse dates given in arbitrary formats
65 stars 7 forks source link

Warning when using parse_iso_8601() on a vector containing YYYY dates as well as other formats. #36

Open Esbilon opened 2 years ago

Esbilon commented 2 years ago

What it says on the tin. parse_iso_8601(c("2020-03", "2020")) yields the following warning: Warning message: In NextMethod(.Generic) : number of items to replace is not a multiple of replacement length

The same does not happen if the vector contains only YYYY dates or no YYYY dates. I've only tried with YYYY, YYYY-mm, YYYY-mm-dd, so presumably others may also cause the same warning.