date_full: Convert Dates to Full-Length Day, Month, Year

Description Usage Arguments Details Value Author(s)

View source: R/panthr.r

Description

date_full converts date field values in DD-MMM-YY format to long-form, descriptive dates, including full-length years in YYYY format and full-length months, with the option to "cleanly" abbreviate them. The option to convert to the UK date format is also available.

Usage

1
date_full(date, abbreviate = FALSE, uk.notation = FALSE)

Arguments

date

A scalar or vector of length n and class character containing one or more date values in DD-MMM-YY format.

abbreviate

A logical value (i.e. TRUE or FALSE) indicating whether to convert months to an abbreviated, 3-character format, e.g. "Aug." Defaults to FALSE.

uk.notation

A logical value (i.e. TRUE or FALSE) indicating whether to reorder day, month, and year to common UK notation. Defaults to FALSE.

Details

Because the warehouse year format is YY, dates prior to 1930 C.E. will automatically convert to post-2000 C.E.

Values passed to argument date = which are not in DD-MMM-YY format or contain unrecognized month abbreviations are coerced to NA (missing) values and a warning message is thrown.

Value

A scalar or vector of values of class character containing long-form, descriptive dates including the day, full or abbreviated month, and 4-digit year, in either US or UK notation.

Author(s)

Jamison R. Crawford, Institutional Research Associate, Georgia State University


jamisoncrawford/panthr documentation built on March 9, 2020, 6:18 p.m.