Learn R Programming

gtfstools (version 2.0.1)

parse_dates: Parse dates given as Dates or strings

Description

Validates a date argument given either as a Date vector or as a character vector of dates in the "YYYYMMDD" or "YYYY-MM-DD" formats (which may be mixed), and converts it to a Date vector.

Usage

parse_dates(date, call = parent.frame(), arg = "date")

Value

A Date vector.

Arguments

date

The date argument to be parsed.

call

The environment of the function whose date argument is parsed, in which errors are reported.

arg

A string. The name of the argument, used in error messages.