get_interval_duration: The number of days covered

View source: R/get_interval_duration.R

get_interval_durationR Documentation

The number of days covered

Description

Generic utility function for returning the number of days covered by an element of a grates object.

Usage

get_interval_duration(x, ...)

Arguments

x

A grouped date vector.

...

Not currently used.

Value

The number of days covered from the start to end dates for each element in the input.

Examples

# The following should be TRUE
identical(
    get_interval_duration(yearmonth(2020, 1:3)),
    c(31, 29, 31)
)


grates documentation built on March 25, 2026, 5:07 p.m.