Learn R Programming

fHMM (version 1.1.1)

check_date: Check date format

Description

This function checks if the input date has the format "YYYY-MM-DD".

Usage

check_date(date)

Value

as.Date(date) if date has the format "YYYY-MM-DD". Otherwise, the function throws an error.

Arguments

date

A character, specifying a date in format "YYYY-MM-DD".

Examples

Run this code
if (FALSE) {
check_date(date = "2000-01-01")
}

Run the code above in your browser using DataLab