parse_date_ymd: Parse date string without century

View source: R/converters.R

parse_date_ymdR Documentation

Parse date string without century

Description

Helper function to convert dates stored as strings containing six digits in a yymmdd format using lubridate::ymd().

Usage

parse_date_ymd(x, cutoff_2000 = 30L)

Arguments

x

A character vector of dates to parse.

cutoff_2000

integer. For y format, two-digit numbers smaller or equal to cutoff_2000 are parsed as though starting with 20, otherwise parsed as though starting with 19. Available only for functions relying on lubridates internal parser.

Details

cutoff_2000 defaults to 30 which is a convenient value for my work.

Value

A vector of class base::Date()


svraka/asmisc documentation built on June 12, 2025, 12:04 p.m.