flex_t12_lst {bigD} | R Documentation |
A list of all 12-hour flexible time types
Description
The flex_t12_lst
object is a list of the 12-hour flexible time types which
are widely supported. Flexible time types are classes of time formatting
which can be translated across locales. There are 12
flexible time types of the 12-hour variety in flex_t12_lst
.
Usage
flex_t12_lst
Format
An object of class list
of length 12.
Value
A list where each element corresponds to a classifier for a 12-hour flexible time type.
Examples
The flex_t12_lst
object can be incredibly useful when you need to get a
format for 12-hour time formatting that works across all locales. You can
avoid typing errors by using this list and every flexible time type from this
list is guaranteed to work across all supported locales. In this example,
we'll use the "Ehms"
flexible time type by accessing it from the
flex_t12_lst
object.
fdt( input = "2018-07-04 22:05", format = flex_t12_lst$Bhms, locale = "en" )
#> [1] "10:05:00 at night"
If we wanted this in a different locale, the locale-specific format
pattern
behind the flexible date identifier would ensure consistency while moving to
that locale. Let's use the fdt_locales_lst
object in the same spirit to
specify the German (Austria) locale.
fdt( input = "2018-07-04 22:05", format = flex_t12_lst$Bhms, locale = fdt_locales_lst$de_AT )
#> [1] "10:05:00 abends"