EVOLUTION-MANAGER
Edit File: timespan.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Description of time span classes in lubridate</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for timespan {lubridate}"><tr><td>timespan {lubridate}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Description of time span classes in lubridate</h2> <h3>Description</h3> <p>A time span can be measured in three ways: as a duration, an interval, or a period. </p> <ul> <li> <p><a href="duration.html">duration</a>s record the exact number of seconds in a time span. They measure the exact passage of time but do not always align with human measurements like hours, months and years. </p> </li> <li> <p><a href="period.html">period</a>s record the change in the clock time between two date-times. They are measured in human units: years, months, days, hours, minutes, and seconds. </p> </li> <li> <p><a href="Interval-class.html">intervals</a> are time spans bound by two real date-times. Intervals can be accurately converted to periods and durations. </p> </li></ul> <h3>Examples</h3> <pre> duration(3690, "seconds") period(3690, "seconds") period(second = 30, minute = 1, hour = 1) interval(ymd_hms("2009-08-09 13:01:30"), ymd_hms("2009-08-09 12:00:00")) date <- ymd_hms("2009-03-08 01:59:59") # DST boundary date + days(1) date + ddays(1) date2 <- ymd_hms("2000-02-29 12:00:00") date2 + years(1) # self corrects to next real day date3 <- ymd_hms("2009-01-31 01:00:00") date3 + c(0:11) * months(1) span <- date2 %--% date #creates interval date <- ymd_hms("2009-01-01 00:00:00") date + years(1) date - days(3) + hours(6) date + 3 * seconds(10) months(6) + days(1) </pre> <hr /><div style="text-align: center;">[Package <em>lubridate</em> version 1.7.9 <a href="00Index.html">Index</a>]</div> </body></html>