Check if the object is a moment

is_moment(x)

Arguments

x

An object.

Value

TRUE if the object inherits from the moment class.

Examples

is_moment(Sys.Date())
#> [1] FALSE
is_moment(yearmonth(1))
#> [1] TRUE