int_flip

0th

Percentile

Flip the direction of an interval

Reverses the order of the start date and end date in an interval. The new interval takes place during the same timespan as the original interval, but has the opposite direction.

Usage
int_flip(int)
Arguments
int
An interval object
Value

  • An interval object

See Also

int_shift, int_start, int_end, int_length

Aliases
  • int_flip
Examples
int <- new_interval(ymd("2001-01-01"), ymd("2002-01-01"))
# 2001-01-01 UTC--2002-01-01 UTC
int_flip(int)
# 2002-01-01 UTC--2001-01-01 UTC
Documentation reproduced from package lubridate, version 1.2.0, License: GPL

Community examples

Looks like there are no examples yet.