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
.
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"
)
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
)