Helper function to get last day of month

last_day(date)

Arguments

date

in format as.Date()

Value

vector with last day of month(s)