| as_date | R Documentation |
New dates can be calculated using new_date() for any calendar. Dates can be
converted from one calendar to another using as_date(). as_date() also works
with the native R Date class and several other classes. When applied to
integers, the conversion is from the RD day number (with day 1 being
01-01-01 on the Gregorian calendar).
as_date(date, calendar)
new_date(..., calendar)
date |
Date vector on some calendar |
calendar |
Target calendar of class "calendar" |
... |
Named arguments denoting the granularities required for |
A date vector of class "rdvec" with the specified calendar.
april2025 <- new_date(year = 2025, month = 4, day = 1:30, calendar = cal_gregorian)
as_date(april2025, calendar = cal_iso)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.