clock_labels {clock}R Documentation

Create or retrieve date related labels

Description

When parsing and formatting dates, you often need to know how weekdays of the week and months are represented as text. These functions allow you to either create your own labels, or look them up from a standard set of language specific labels. The standard list is derived from ICU (https://unicode-org.github.io/icu/) via the stringi package.

Usage

clock_labels(
  month,
  month_abbrev = month,
  weekday,
  weekday_abbrev = weekday,
  am_pm
)

clock_labels_lookup(language)

clock_labels_languages()

Arguments

month, month_abbrev

⁠[character(12)]⁠

Full and abbreviated month names. Starts with January.

weekday, weekday_abbrev

⁠[character(7)]⁠

Full and abbreviated weekday names. Starts with Sunday.

am_pm

⁠[character(2)]⁠

Names used for AM and PM.

language

⁠[character(1)]⁠

A BCP 47 locale, generally constructed from a two or three digit language code. See clock_labels_languages() for a complete list of available locales.

Value

A "clock_labels" object.

Examples

clock_labels_lookup("en")
clock_labels_lookup("ko")
clock_labels_lookup("fr")

[Package clock version 0.7.0 Index]