lubridate (version 0.2.4)

int_end: Access and change the end date of an interval...

Description

Access and change the end date of an interval

Usage

int_end(x)

Arguments

x
An interval object

Value

  • A POSIXct date object when used as an accessor. Nothing when used as a settor

Details

Changing the end date of an interval does not change the length of the interval. It shifts when the interval occurs.

Examples

Run this code
int <- new_interval(ymd("2001-01-01"), ymd("2002-01-01"))
# 2001-01-01 -- 2002-01-01
int_end(int)
# "2002-01-01 UTC"
int_end(int) <- ymd("2002-06-01")
int
# 2001-06-01 -- 2002-06-01}

Run the code above in your browser using DataCamp Workspace