ymd: Convert 'YMD' format integer or string to Date

Description Usage Arguments Value Examples

View source: R/extendr-wrappers.R

Description

Transform integer or strings vectors in 'YMD' format to Date objects. It intends to only support limited formats (no separator or one of '.', ' ', '-' and '/' separators). See the possible formats in examples.

Usage

1
ymd(x)

Arguments

x

An integer or string vector in 'YMD' format. Double values without the decimal part are allowed.

Value

A Date object. When the parse fails for certain input, the value returned would be NA, silently.

Examples

1
2
ymd(c(210326, 19981225))
ymd(c("2020/1/8", "20 1 7", "1998.7.1", "1990-02-03"))

ymd documentation built on Jan. 6, 2022, 5:06 p.m.

Related to ymd in ymd...