timespan: Create a timespan duration

View source: R/utils_date_time.R

timespanR Documentation

Create a timespan duration

Description

Create a timespan duration

Usage

timespan(x)

Arguments

x

chr/POSIXt/Date

  • chr One of year, season, quarter, month, week, day, hour

  • POSIXt/Date/Datetime A Date or Datetime vector

Value

Duration See duration

See Also

Other time: duration_print(), excel_date(), month_factor(), season_factor(), time_aggregates, time_difftimes, time_elapsed(), time_factor(), week_factor()

Examples

timespan(seq(Sys.time() - lubridate::dyears(), Sys.time(), by = 1))
timespan("season")

yogat3ch/UU documentation built on May 31, 2024, 10:14 p.m.