Description Usage Arguments Details Value Examples
Function takes a vector of dates, a start and end date, and returns a list of adjacent date sequences that are not covered by the vector of dates.
1 | get_required_date_ranges(.dates, .since, .until)
|
.dates |
a vector of dates or |
.since |
a date (format '%Y-%m-%d'), specifying the start of the date range to be requested |
.until |
a date (format '%Y-%m-%d'), specifying the end of the date range to be requested |
This function is an internal helper. All dates need to be in YYYY-mm-dd ('%Y-%m-%d') format.
Either of the following two
A list of date range start and end dates in the date range spaned from .since to .until
that is not covered by dates in .dates.
NULL if length of dates is zero,
or the requested time range is convered by the date range spaned from .since to .until.
1 2 3 4 5 6 7 8 9 10 11 12 | dates <- seq(Sys.Date()-30, Sys.Date()-5, by = "day")
since <- Sys.Date() -35
until <- Sys.Date()
# returns list with one date range vector (spanning since - until)
twscrape:::get_required_date_ranges(NULL, since, until)
# returns list with two date range vectors
twscrape:::get_required_date_ranges(Sys.Date()-1, since, until)
# returns list with two date range vectors
twscrape:::get_required_date_ranges(dates, since, until)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.