Format before and after arguments for API query
seltime_fun(dtin, before = TRUE)
A numeric object as an epoch timestamp
Date object for before
or after
inputs
logical indicattng if input is before
# convert to epoch timestamp
seltime_fun(Sys.Date())
# back to original
as.POSIXct(seltime_fun(Sys.Date(), before = FALSE), tz = Sys.timezone(), origin = '1970-01-01')
Run the code above in your browser using DataLab