str_english_date_format: Function to format a date in a verbose, English language...

View source: R/str_english_date_format.R

str_english_date_formatR Documentation

Function to format a date in a verbose, English language style character string.

Description

Function to format a date in a verbose, English language style character string.

Usage

str_english_date_format(
  x,
  weekday = TRUE,
  seconds = TRUE,
  time_zone = TRUE,
  date_only = FALSE,
  drop_zeros = TRUE
)

Arguments

x

Date vector.

weekday

Should the weekday be returned?

seconds

Should seconds be printed?

time_zone

Should the time zone string be printed?

date_only

Should only the date pieces be returned?

drop_zeros

Should leading zeros be dropped from the return?

Value

Character vector.

Author(s)

Stuart K. Grange.

Examples


# All information with seconds and time zone
str_english_date_format(lubridate::now())

# No seconds
str_english_date_format(lubridate::now(), seconds = FALSE)

# No seconds or time zone
str_english_date_format(lubridate::now(), seconds = FALSE, time_zone = FALSE)


skgrange/threadr documentation built on May 11, 2024, 12:16 p.m.