Skip to contents

Compute the age of a client at the midpoint of the year - 30-09-YYYY

Usage

compute_mid_year_age(fyyear, dob)

Arguments

fyyear

current financial year

dob

date of birth of the clients

Value

a vector of ages at the financial year midpoint

Examples

dob <- as.Date(c("01-01-1990", "31-10-1997"), format = "%d-%m-%Y")
fyyear <- "1920"
compute_mid_year_age(fyyear, dob)
#> [1] 29 21