EVOLUTION-MANAGER
Edit File: new_date.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, date-time, and duration S3 classes</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 new_date {vctrs}"><tr><td>new_date {vctrs}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Date, date-time, and duration S3 classes</h2> <h3>Description</h3> <ul> <li><p> A <code>date</code> (<a href="../../base/html/Dates.html">Date</a>) is a double vector. Its value represent the number of days since the Unix "epoch", 1970-01-01. It has no attributes. </p> </li> <li><p> A <code>datetime</code> (<a href="../../base/html/DateTimeClasses.html">POSIXct</a> is a double vector. Its value represents the number of seconds since the Unix "Epoch", 1970-01-01. It has a single attribute: the timezone (<code>tzone</code>)) </p> </li> <li><p> A <code>duration</code> (<a href="../../base/html/difftime.html">difftime</a>) </p> </li></ul> <h3>Usage</h3> <pre> new_date(x = double()) new_datetime(x = double(), tzone = "") new_duration(x = double(), units = c("secs", "mins", "hours", "days", "weeks")) ## S3 method for class 'Date' vec_ptype2(x, y, ...) ## S3 method for class 'POSIXct' vec_ptype2(x, y, ...) ## S3 method for class 'POSIXlt' vec_ptype2(x, y, ...) ## S3 method for class 'difftime' vec_ptype2(x, y, ...) ## S3 method for class 'Date' vec_cast(x, to, ...) ## S3 method for class 'POSIXct' vec_cast(x, to, ...) ## S3 method for class 'POSIXlt' vec_cast(x, to, ...) ## S3 method for class 'difftime' vec_cast(x, to, ...) ## S3 method for class 'Date' vec_arith(op, x, y, ...) ## S3 method for class 'POSIXct' vec_arith(op, x, y, ...) ## S3 method for class 'POSIXlt' vec_arith(op, x, y, ...) ## S3 method for class 'difftime' vec_arith(op, x, y, ...) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x</code></td> <td> <p>A double vector representing the number of days since UNIX epoch for <code>new_date()</code>, number of seconds since UNIX epoch for <code>new_datetime()</code>, and number of <code>units</code> for <code>new_duration()</code>.</p> </td></tr> <tr valign="top"><td><code>tzone</code></td> <td> <p>Time zone. A character vector of length 1. Either <code>""</code> for the local time zone, or a value from <code><a href="../../base/html/timezones.html">OlsonNames()</a></code></p> </td></tr> <tr valign="top"><td><code>units</code></td> <td> <p>Units of duration.</p> </td></tr> </table> <h3>Details</h3> <p>These function help the base <code>Date</code>, <code>POSIXct</code>, and <code>difftime</code> classes fit into the vctrs type system by providing constructors, coercion functions, and casting functions. </p> <h3>Examples</h3> <pre> new_date(0) new_datetime(0, tzone = "UTC") new_duration(1, "hours") </pre> <hr /><div style="text-align: center;">[Package <em>vctrs</em> version 0.5.0 <a href="00Index.html">Index</a>]</div> </body></html>