Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Tree: 19d4a64480
Fetching contributors…

Cannot retrieve contributors at this time

36 lines (33 sloc) 0.935 kB
\title{Shift an interval along the timeline}
int_shift(int, by)
\item{int}{An interval object}
\item{by}{A period or duration object}
An interval object
Shifts the start and end dates of an interval up or down
the timeline by a specified amount. Note that this may
change the exact length of the interval if the interval
is shifted by a Period object. Intervals shifted by a
Duration or difftime object will retain their exact
length in seconds.
int <- new_interval(ymd("2001-01-01"), ymd("2002-01-01"))
# 2001-01-01 UTC--2002-01-01 UTC
int_shift(int, new_duration(days = 11))
# 2001-01-12 UTC--2002-01-12 UTC
int_shift(int, new_duration(hours = -1))
# 2000-12-31 23:00:00 UTC--2001-12-31 23:00:00 UTC
\code{\link{int_flip}}, \code{\link{int_start}},
\code{\link{int_end}}, \code{\link{int_length}}
Jump to Line
Something went wrong with that request. Please try again.