int_standardize {lubridate} | R Documentation |
If an interval is not positive, int_standardize flips it so that it retains its endpoints but becomes positive.
int_standardize(int)
int |
an Interval object |
int <- interval(ymd("2002-01-01"), ymd("2001-01-01")) # 2002-01-01 UTC--2001-01-01 UTC int_standardize(int) # 2001-01-01 UTC--2002-01-01 UTC