lubridate (version 0.1)

add_period_to_date: Addition for the duration (i...

Description

Addition for the duration (i.e, difftime), period, and interval classes.

Usage

add_period_to_date(date, period)

Arguments

date
a duration(i.e. difftime), period, interval, POSIXt, or Date object
period
a duration(i.e. difftime), period, interval, POSIXt, or Date object

Value

  • a new duration(i.e. difftime), period, interval, POSIXt, or Date object, depending on e1 and e2

Examples

Run this code
x <- new_duration(day = 1)
x + now()
today() + x
x + difftime(now() + 3600, now())
x + x

Run the code above in your browser using DataCamp Workspace