Skip to contents

Find the first day of the month for a given date

Usage

first_day(date)

Arguments

date

a vector of dates

Value

the first day of the month that given dates fall in

Examples

date <- as.Date("2020-12-28")
first_day(date)
#> [1] "2020-12-01"