Skip to contents

Find the last full year in a character vector representing successive dates.

Usage

lastFullYear(dateTxt, leap = FALSE, out = c("character", "logical"))

Arguments

dateTxt

A character vector giving a date in POSIX format.

leap

Logical if TRUE, the last full leap year will be returned.

out

Character. When given the value "character", a character vector extracted from dataeTxt is returned. When the value logical is given, a logical vector is returned, indicating the elements in dateTxt.

Value

A logical vector that can be used to subset.

Details

By "full" year, we mean a year with at least 365 days.