last_day: Find the last day of the month for a given date

View source: R/frequency_analysis.R

last_dayR Documentation

Find the last day of the month for a given date

Description

Find the last day of the month for a given date

Usage

last_day(date)

Arguments

date

a vector of dates

Value

the last day of the month that given dates fall in

Examples

date <- as.Date("2020-12-28")
last_day(date)
last_day("2020-02-15")
last_day("2019-02-15")
last_day(c("2020-12-28", "2020-02-15", "2019-02-15"))

USGS-R/HASP documentation built on July 28, 2024, 7:53 a.m.