Checks Time

check_time(x, x_name = substitute(x))

Arguments

x

The scalar POSIXct to check.

x_name

A string of the name of x.

Value

Throws an informative error or returns an invisible copy of x.

Examples

try(check_time(Sys.Date()))
#> Error : Sys.Date() must be of class 'POSIXct'