Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

stri_datetime_fstr

Convert strptime-Style Format Strings


Description

A function to convert strptime/strftime-style format strings to ICU format strings that may be used in stri_datetime_parse and stri_datetime_format functions.

Usage

stri_datetime_fstr(x)

Arguments

x

character vector consisting of date/time format strings

Details

For more details on conversion specifiers please refer to the manual page of strptime. Most of the formatters of the form %x, where x is a letter, are supported. Moreover, each %% is replaced with %.

Warnings are given in case of %x, %X, %u, %w, %g, %G, %c, %U and %W as in such circumstances either ICU does not support the functionality requested using the format-strings API or there are some inconsistencies between base R and ICU.

Value

Returns a character vector.

See Also

Examples

stri_datetime_fstr('%Y-%m-%d %H:%M:%S')

stringi

Character String Processing Facilities

v1.6.1
file LICENSE
Authors
Marek Gagolewski [aut, cre, cph] (<https://orcid.org/0000-0003-0637-6028>), Bartek Tartanus [ctb], and others (stringi source code); IBM, Unicode, Inc. and others (ICU4C source code, Unicode Character Database)
Initial release
2021-05-05

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.