lubridate (version 0.2.5)

int_start: Access and change the start date of an interval...

Description

Access and change the start date of an interval

Usage

int_start(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 start 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_start(int)
# "2001-01-01 UTC"
int_start(int) <- ymd("2001-06-01")
int
# 2001-06-01 -- 2002-06-01}

Run the code above in your browser using DataCamp Workspace