Learn R Programming

tolBasis (version 1.0)

Ddiff: Date Difference

Description

Date Difference in a Dating

Usage

Ddiff(dte1, dte2, dating=Daily)

Arguments

dte1
a Date or POSIXt object
dte2
a Date or POSIXt object
dating
a Dating object

Value

Returns the difference in dates belonging to the dating between the indicated dates. If the dates do not belong to the dating the floor dates are used instead.

Examples

Run this code
# Obtain how many days until the next new year day.
dt1 <- Sys.Date()
dt2 <- Dsucc(dt1, Yearly, 1)
Ddiff(dt1, dt2, Daily)

Run the code above in your browser using DataLab