powered by
These are Date methods for the getter generics.
get_year() returns the Gregorian year.
get_year()
get_month() returns the month of the year.
get_month()
get_day() returns the day of the month.
get_day()
For more advanced component extraction, convert to the calendar type that you are interested in.
# S3 method for Date get_year(x)# S3 method for Date get_month(x)# S3 method for Date get_day(x)
# S3 method for Date get_month(x)
# S3 method for Date get_day(x)
The component.
[Date]
A Date to get the component from.
x <- as.Date("2019-01-01") + 0:5 get_day(x)
Run the code above in your browser using DataLab