is_duration: Is 'x' a duration?

View source: R/duration.R

is_durationR Documentation

Is x a duration?

Description

This function determines if the input is a duration object.

Usage

is_duration(x)

Arguments

x

⁠[object]⁠

An object.

Value

TRUE if x inherits from "clock_duration", otherwise FALSE.

Examples

is_duration(1)
is_duration(duration_days(1))

clock documentation built on Sept. 11, 2024, 8:39 p.m.