EVOLUTION-MANAGER
Edit File: Dates.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: Date Class</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 Dates {base}"><tr><td>Dates {base}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Date Class</h2> <h3>Description</h3> <p>Description of the class <code>"Date"</code> representing calendar dates. </p> <h3>Usage</h3> <pre> ## S3 method for class 'Date' summary(object, digits = 12, ...) ## S3 method for class 'Date' print(x, max = NULL, ...) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>object, x</code></td> <td> <p>a <code>Date</code> object to be summarized or printed.</p> </td></tr> <tr valign="top"><td><code>digits</code></td> <td> <p>number of significant digits for the computations.</p> </td></tr> <tr valign="top"><td><code>max</code></td> <td> <p>numeric or <code>NULL</code>, specifying the maximal number of entries to be printed. By default, when <code>NULL</code>, <code><a href="options.html">getOption</a>("max.print")</code> used.</p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>further arguments to be passed from or to other methods.</p> </td></tr> </table> <h3>Details</h3> <p>Dates are represented as the number of days since 1970-01-01, with negative values for earlier dates. They are always printed following the rules of the current Gregorian calendar, even though that calendar was not in use long ago (it was adopted in 1752 in Great Britain and its colonies). </p> <p>It is intended that the date should be an integer, but this is not enforced in the internal representation. Fractional days will be ignored when printing. It is possible to produce fractional days via the <code>mean</code> method or by adding or subtracting (see <code><a href="Ops.Date.html">Ops.Date</a></code>). </p> <p>From the many methods, see <code>methods(class = "Date")</code>, a few are documented separately, see below. </p> <h3>See Also</h3> <p><code><a href="Sys.time.html">Sys.Date</a></code> for the current date. </p> <p><code><a href="weekday.POSIXt.html">weekdays</a></code> for convenience extraction functions. </p> <p>Methods with extra arguments and documentation: </p> <dl> <dt><code><a href="Ops.Date.html">Ops.Date</a></code></dt><dd><p>for operators on <code>"Date"</code> objects.</p> </dd> <dt><code><a href="as.Date.html">format.Date</a></code></dt><dd><p>for conversion to and from character strings.</p> </dd> <dt><code><a href="../../graphics/html/axis.POSIXct.html">axis.Date</a></code></dt><dd><p>and <code><a href="../../graphics/html/hist.POSIXt.html">hist.Date</a></code> for plotting.</p> </dd> <dt><code><a href="seq.Date.html">seq.Date</a></code></dt><dd><p>, <code><a href="cut.POSIXt.html">cut.Date</a></code>, and <code><a href="round.POSIXt.html">round.Date</a></code> for utility operations.</p> </dd> </dl> <p><code><a href="DateTimeClasses.html">DateTimeClasses</a></code> for date-time classes. </p> <h3>Examples</h3> <pre> (today <- Sys.Date()) format(today, "%d %b %Y") # with month as a word (tenweeks <- seq(today, length.out=10, by="1 week")) # next ten weeks weekdays(today) months(tenweeks) (Dls <- as.Date(.leap.seconds)) ## length(<Date>) <- n now works ls <- Dls; length(ls) <- 12 l2 <- Dls; length(l2) <- 5 + length(Dls) stopifnot(exprs = { ## length(.) <- * is compatible to subsetting/indexing: identical(ls, Dls[seq_along(ls)]) identical(l2, Dls[seq_along(l2)]) ## has filled with NA's is.na(l2[(length(Dls)+1):length(l2)]) }) </pre> <hr /><div style="text-align: center;">[Package <em>base</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>