int_overlaps

0th

Percentile

Test if two intervals overlap

Test if two intervals overlap

Usage
int_overlaps(int1, int2)
Arguments
int1
an Interval object
int2
an Interval object
Value

  • Logical. TRUE if int1 and int2 overlap by at least one second. FALSE otherwise.

Aliases
  • int_overlaps
Examples
int1 <- new_interval(ymd("2001-01-01"), ymd("2002-01-01"))
# 2001-01-01 UTC--2002-01-01 UTC
int2 <- new_interval(ymd("2001-06-01"), ymd("2002-06-01"))
# 2001-06-01 UTC--2002-06-01 UTC
int3 <- new_interval(ymd("2003-01-01"), ymd("2004-01-01"))
# 2003-01-01 UTC--2004-01-01 UTC

int_overlaps(int1, int2) # TRUE
int_overlaps(int1, int3) # FALSE
Documentation reproduced from package lubridate, version 1.2.0, License: GPL

Community examples

Looks like there are no examples yet.