| cur_date | R Documentation |
cur_date provides a relaxed version of
Sys.time() that is sufficient for most purposes.
cur_date(rev = FALSE, as_string = TRUE, sep = "-")
rev |
Boolean: Reverse from "yyyy-mm-dd" to "dd-mm-yyyy" format?
Default: |
as_string |
Boolean: Return as character string?
Default: |
sep |
Character: Separator to use.
Default: |
By default, cur_date returns Sys.Date
as a character string (using current system settings and
sep for formatting).
If as_string = FALSE, a "Date" object is returned.
Alternatively, consider using Sys.Date
or Sys.time() to obtain the "
format according to the ISO 8601 standard.
For more options, see the documentations of the
date and Sys.Date functions of base R
and the formatting options for Sys.time().
A character string or object of class "Date".
what_date() function to print dates with more options;
date() and today() functions of the lubridate package;
date(), Sys.Date(), and Sys.time() functions of base R.
Other date and time functions:
change_time(),
change_tz(),
cur_time(),
days_in_month(),
diff_dates(),
diff_times(),
diff_tz(),
is_leap_year(),
what_date(),
what_month(),
what_time(),
what_wday(),
what_week(),
what_year(),
zodiac()
cur_date()
cur_date(sep = "/")
cur_date(rev = TRUE)
cur_date(rev = TRUE, sep = ".")
# return a "Date" object:
from <- cur_date(as_string = FALSE)
class(from)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.