Get the start, end or duration of a datey_interval
Source: R/datey_interval.R
interval_properties.RdGet the start, end or duration of a datey_interval using the syntax
$start, $end or $duration respectively.
$duration is the duration of the interval provided it is proper
(i.e. start <= end).
If the interval is improper then $durationis NA_durationy_.
When x is a datey_interval then x$duration is identical to
durationy(x).
Examples
t_1 <- start_day(2001, 1, 1)
t_2 <- start_day(2002, 2, 2)
interval <- datey_interval(t_1, t_2)
interval
#> [1] [2001-01-01.0, 2002-02-02.0)
interval$start
#> [1] 2001-01-01.0
interval$end
#> [1] 2002-02-02.0
interval$duration
#> [1] 1.087671 yr