what_date()
what_date(sep = "/")
what_date(rev = TRUE)
what_date(rev = TRUE, sep = ".")
what_date(rev = TRUE, sep = " ", month_form = "B")
# with "POSIXct" times:
what_date(when = Sys.time())
# with time vector (of "POSIXct" objects):
ts <- c("1969-07-13 13:53 CET", "2020-12-31 23:59:59")
what_date(ts)
what_date(ts, rev = TRUE, sep = ".")
what_date(ts, rev = TRUE, month_form = "b")
# return a "Date" object:
dt <- what_date(as_string = FALSE)
class(dt)
# with time zone:
ts <- ISOdate(2020, 12, 24, c(0, 12)) # midnight and midday UTC
what_date(when = ts, tz = "Pacific/Honolulu", as_string = FALSE)
Run the code above in your browser using DataLab