A helper function to calculate dates a year apart, starting from a given date
for a set number of years. Useful for delimiting a specified time
interval into a discrete number of years.
Usage
determine_yearly_endpoints(date, num_years, direction = "forwards")
Arguments
date
Either the starting date of the time interval (when direction is 'forwards')
or the ending date (direction is 'backwards').
num_years
The number of years of the time interval.
direction
A string indicating whether the parameter date represents
the opening or closing interval. Must take values either 'forwards' or 'backwards'.
Value
A vector of dates delineating complete years of registry data.