EVOLUTION-MANAGER
Edit File: year.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: Get/set years component of a date-time</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 year {lubridate}"><tr><td>year {lubridate}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Get/set years component of a date-time</h2> <h3>Description</h3> <p>Date-time must be a POSIXct, POSIXlt, Date, Period, chron, yearmon, yearqtr, zoo, zooreg, timeDate, xts, its, ti, jul, timeSeries, and fts objects. </p> <p><code>isoyear()</code> returns years according to the ISO 8601 week calendar. </p> <p><code>epiyear()</code> returns years according to the epidemilogical week calendars. </p> <h3>Usage</h3> <pre> year(x) year(x) <- value isoyear(x) epiyear(x) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x</code></td> <td> <p>a date-time object</p> </td></tr> <tr valign="top"><td><code>value</code></td> <td> <p>a numeric object</p> </td></tr> </table> <h3>Details</h3> <p>year does not yet support years before 0 C.E. </p> <h3>Value</h3> <p>the years element of x as a decimal number </p> <h3>References</h3> <p><a href="https://en.wikipedia.org/wiki/ISO_week_date">https://en.wikipedia.org/wiki/ISO_week_date</a> <a href="https://www.cmmcp.org/sites/cmmcp/files/uploads/spring_skeeter_06.pdf">https://www.cmmcp.org/sites/cmmcp/files/uploads/spring_skeeter_06.pdf</a> </p> <h3>Examples</h3> <pre> x <- ymd("2012-03-26") year(x) year(x) <- 2001 year(x) > 1995 </pre> <hr /><div style="text-align: center;">[Package <em>lubridate</em> version 1.7.9 <a href="00Index.html">Index</a>]</div> </body></html>