View source: R/inside_interval.R
inside_interval | R Documentation |
Determine if a YYYY-MM string is inside a interval
inside_interval(start, end, reference_time)
start |
starting interval time |
end |
ending interval time |
reference_time |
time we are comparing to - YYYY-MM string |
Logical indicating whether or not the reference time is inside the interval. We need this when working with downloaded NEON data which usually comes in a YYYY-MM string
John Zobitz zobitz@augsburg.edu
# Define starting and ending dates:
start_date <- as.POSIXct("2021-06-01 09:30:00",tz="UTC")
end_date <- as.POSIXct("2023-06-01 20:00:00",tz="UTC")
# Test, should return TRUE
inside_interval(start_date,end_date,"2022-06")
# Test, should return FALSE
inside_interval(start_date,end_date,"2020-06")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.