| anniversary {ThomasJeffersonUniv} | R Documentation |
Number of Anniversaries Between Two Dates
Description
Number of anniversaries between two dates.
Usage
anniversary(to, from)
Arguments
to |
an R object convertible to POSIXlt, end date/time |
from |
an R object convertible to POSIXlt, start date/time |
Details
-
Year difference between
fromandtodates are calculated -
In either situation below, subtract one (1) year from the year difference obtained in Step 1.
-
Month of
fromis later than month ofto; -
Months of
fromandtoare the same, but day offromis later than day ofto.
In either of such situations, the anniversary of the current year has not been reached.
-
-
If any element from Step 2 is negative, stop.
Value
Function anniversary returns an integer scalar or vector.
[Package ThomasJeffersonUniv version 0.1.3 Index]