Description Usage Arguments Value Examples
This function converts dates from a human-consumable format (e.g. 2008-12-15) to their equivalent time in seconds since the Unit Epoch (1970-01-01 00:00:00 UTC), which is how Pushshift's API expects dates.
1 | date_to_api(date, tz = "")
|
date |
A date (which can be a string representing a validly formatted date or one of the Date types) to compare to the Unit epoch, granular down to seconds. |
tz |
The timezone of the date to compare, defaults to system's timezone for direct use. |
A string representing a time (in seconds) that the api can use to return results.
1 2 3 4 5 6 7 8 | # convert today
date_to_api(Sys.Date())
# convert a specific date
date_to_api("2018-03-21")
# pass as argument to construct_pushshift_url
construct_pushshift_url(before = date_to_api("2017-01-01"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.