date_utils: Date Utility Functions

date_utilsR Documentation

Date Utility Functions

Description

Date utility helpers for deriving start/end dates.

Usage

end_of_month(date)

beg_of_month(date)

start_of_month(date)

Arguments

date

Character string or Date representing the date to manipulate.

Value

Returns the Start or End Date as a Date.

Examples

# end_of_month ------------------------------------------------------------

# character input
end_of_month("2020-08-13")

# date input
end_of_month(as.Date("2020-08-13"))


# beg_of_month ------------------------------------------------------------

# character input
beg_of_month("2020-08-13")

# date input
beg_of_month(as.Date("2020-08-13"))


# start_of_month ----------------------------------------------------------

# character input
start_of_month("2020-08-13")

# date input
start_of_month(as.Date("2020-08-13"))


jimbrig/lossdevtapp documentation built on Aug. 31, 2024, 8:38 a.m.