I just realized that #RStats parse_date_time() from lubridate can parse into a date-time object even a vector with multiple date/date-time formats just by specifying the formats in orders parameter 👇🥹
1
2
11
Replying to @tmfmnk
`anytime::anydate` has done this for years without requiring a format (which leads its heuristic to reject your second example: if you use eight digits it assumes yyyymmdd). There is also 'rodney dangerfield danger' when mixing mm and dd order but ISO 8601 (+ variants) is safe.

May 16, 2023 · 1:00 PM UTC

1
6
Replying to @eddelbuettel
Exact formats are not required in the function, but I prefer to be specific 🤓 Nevertheless, anytime::anydate() looks also cool, will investigate it!