Open reikoch opened 4 years ago
This is tricky at the moment. But might be much easier once the parser is out of lubridate and dependency on strptime
is out. For now you can do this by explicitly calling ceiling_date
on those inputs which are shorter. Extra 2 lines of code; not a big deal.
Interesting idea to work-around with ceiling_date! Just the problem remains to first find out what unit to use - month if only day is missing, year if also month is missing:
Would be great if the future date and datetime parser could help.
I would like to see an additional option "pointto" to ymd family of functions that regulates how truncation of partial dates works.
ymd("2019", truncated=2, pointto=xy)
should result in