lubridate (version 1.5.6)

int_length: Get the length of an interval in seconds

Description

Get the length of an interval in seconds

Usage

int_length(int)

Arguments

int
An interval object

Value

numeric The length of the interval in seconds. A negative number connotes a negative interval

See Also

int_start, int_shift, int_flip

Examples

Run this code
int <- interval(ymd("2001-01-01"), ymd("2002-01-01"))
# 2001-01-01 UTC--2002-01-01 UTC
int_length(int)
# 31536000

Run the code above in your browser using DataCamp Workspace