fmt_cmp: Regexps for date/time format components

View source: R/parse_dttm_fmt.R

fmt_cmpR Documentation

Regexps for date/time format components

Description

fmt_cmp() creates a character vector of patterns to match individual format date/time components.

Usage

fmt_cmp(
  sec = "S+",
  min = "M+",
  hour = "H+",
  mday = "d+",
  mon = "m+",
  year = "y+"
)

Arguments

sec

A string pattern for matching the second format component.

min

A string pattern for matching the minute format component.

hour

A string pattern for matching the hour format component.

mday

A string pattern for matching the month day format component.

mon

A string pattern for matching the month format component.

year

A string pattern for matching the year format component.

Value

A named character vector of date/time format patterns. This a vector of six elements, one for each date/time component.

Examples

# Regexps to parse format components
fmt_cmp()

fmt_cmp(year = "yyyy")


sdtm.oak documentation built on April 3, 2025, 9:37 p.m.