View source: R/accessors-date.R
| date | R Documentation | 
Date-time must be a POSIXct, POSIXlt, Date, chron, yearmon, yearqtr, zoo, zooreg, timeDate, xts, its, ti, jul, timeSeries, and fts objects.
date(x)
date(x) <- value
x | 
 a date-time object  | 
value | 
 an object for which the   | 
date() does not yet support years before 0 C.E.
Also date() is not defined for Period objects.
the date of x as a Date
date() can be called without any arguments to return a string representing
the current date-time. This provides compatibility with base:date() which
it overrides.
x <- ymd_hms("2012-03-26 23:12:13", tz = "America/New_York")
date(x)
as.Date(x) # by default as.Date assumes you want to know the date in UTC
as.Date(x, tz = "America/New_York")
date(x) <- as.Date("2000-01-02")
x
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.