| current-date-time | R Documentation |
today returns the current date and now returns the current
date and time (in the system time zone or the time zone provided by the user).
today(tz = NULL)
now(tz = NULL, digits = 0)
tz |
(optional) a character value determining the time zone (the default
|
digits |
an integer value giving the number of decimal places for seconds (0–6, 0 by default). |
today and now return an object of class tind
of length 1 and type "d" (date) and "t" (date-time),
respectively.
today()
now()
# millisecond accuracy
now(digits = 3)
# check current date and time in different time zones
if ("Asia/Tokyo" %in% OlsonNames()) {
now("Asia/Tokyo")
today("Asia/Tokyo")
}
if ("Europe/Warsaw" %in% OlsonNames()) {
now("Europe/Warsaw")
today("Europe/Warsaw")
}
if ("America/New_York" %in% OlsonNames()) {
now("America/New_York")
today("America/New_York")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.