lubridate
lubridate copied to clipboard
Consider passing through date-time objects in parser functions
Beginner R users often pass date-time objects to parsing functions like ymd_hms
. This is very inefficient and can cause unexpected behavior (for example ymd_hm
would not parse a full date). Directly returning an appropriate date-time when passed in a date-time object would avoid such issues.
Probably worth also warning, to help people learn good practice.