Description Usage Arguments Value Examples
This is a convenience function that wraps as.POSIXct
to
convert a time represented in seconds after the unit epoch to
a more human interpretable timestamp.
1 | api_to_date(api_date, tz = "")
|
api_date |
A date or vector of dates to be converted |
tz |
The timezone you want the resulting output to be in, defaults to system's timezone when calling this function directly. |
A POSIXct of the input
1 2 3 4 5 6 7 8 | # capture the current time
right_now <- Sys.time()
# convert it to api format (seconds after unit epoch)
right_now_as_api <- date_to_api(right_now)
# and back to current time
api_to_date(right_now_as_api)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.