new_interval() creates an interval object with the specified values.

new_interval(...)

Arguments

...

A list of time units to be included in the interval and their amounts. "year", "quarter", "month", "week", "day", "hour", "minute", "second", "millisecond", "microsecond", "nanosecond", "unit" are supported.

Value

an "interval" class

Examples

new_interval(hour = 1, minute = 30)
#> 1h 30m
new_interval(NULL) # irregular interval
#> !
new_interval() # unknown interval
#> ?