make_date_str: Make a date character string given a date.

View source: R/make_date_str.R

make_date_strR Documentation

Make a date character string given a date.

Description

This function takes a date and arguments about how to represent months to form a character string that forms a date.

Usage

make_date_str(.date, label = TRUE, abbr = TRUE)

Arguments

.date

a POSIXct or Date object to be translated

label

(from ?lubridate:::month) logical. TRUE will display the month as a character string such as "January." FALSE will display the month as a number.

abbr

(from ?lubridate:::month) logical. FALSE will display the month as a character string #' label, such as #' "January". TRUE will display an abbreviated version of the label, such as "Jan". abbr is #' disregarded if label = FALSE.

Examples

library(stringi, quietly = TRUE)
library(lubridate, quietly = TRUE)
make_date_str(ymd("2010/3/21", quiet = TRUE))
make_date_str(ymd("2010/3/21", quiet = TRUE), abbr = TRUE)

rmsharp/rmsutilityr documentation built on Feb. 13, 2024, 6:01 p.m.