dateCheck: Checks date format.

dateCheckR Documentation

Checks date format.

Description

Checks that the character form of a vector of dates conforms to YYYYMMDDHH or YYYYMMDD.

Usage

  dateCheck(YYYYMMDDHH)

Arguments

YYYYMMDDHH

A character vector (or its factor equivalent) of dates which should be in the form YYYYMMDDHH or YYYYMMDD, in which YYYY specifies the year, MM the month, DD the day, and (optionally) HH the hour.

Details

If both YYYYMMDDHH and YYYYMMDD are present, the YYYYMMDD dates are assumed to be in error even if HH == 00 for all of the longer dates.
Requires the chron library.

Value

A logical vector indicating whether or not each element of YYYYMMDDHH has the correct format.

See Also

ymdhTOjul,julTOymdh

Examples

   dateCheck(c("2008043000", "20080431", "20080501"))

ensembleBMA documentation built on Sept. 2, 2022, 9:05 a.m.