Is the result of test 2 from the reprex below expected behavior of %within%? I understand from lubridate:::.within why it returns FALSE, but I could not find any explanation in ?%within% or ?int_standardize as to why one would consider it to be false.
library(lubridate)
int <- interval(as.Date("2021-01-01"), as.Date("2021-12-31"))
x <- as.Date("2021-06-15")
x %within% int #test 1
int2 <- int_flip(int)
x %within% int2 #test 2
Should one always use int_standardize() for the interval when doing such a comparison?
Cross posted from stackoverflow
Is the result of test 2 from the reprex below expected behavior of
%within%? I understand fromlubridate:::.withinwhy it returns FALSE, but I could not find any explanation in?%within%or?int_standardizeas to why one would consider it to be false.Should one always use
int_standardize()for the interval when doing such a comparison?Cross posted from stackoverflow