seconds_in_year.Rd
Number of seconds in a given year
seconds_in_year(year, leap_year = TRUE, ...)
year | Numeric year (can be a vector) |
---|---|
leap_year | Default = TRUE. If set to FALSE will always return 31536000 |
# NOT RUN { seconds_in_year(2000) # Leap year -- 366 x 24 x 60 x 60 = 31622400 seconds_in_year(2001) # Regular year -- 365 x 24 x 60 x 60 = 31536000 seconds_in_year(2000:2005) # Vectorized over year # }