1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/date.R
\name{Date-getters}
\alias{Date-getters}
\alias{get_year.Date}
\alias{get_month.Date}
\alias{get_day.Date}
\title{Getters: date}
\usage{
\method{get_year}{Date}(x)
\method{get_month}{Date}(x)
\method{get_day}{Date}(x)
}
\arguments{
\item{x}{\verb{[Date]}
A Date to get the component from.}
}
\value{
The component.
}
\description{
These are Date methods for the \link[=clock-getters]{getter generics}.
\itemize{
\item \code{get_year()} returns the Gregorian year.
\item \code{get_month()} returns the month of the year.
\item \code{get_day()} returns the day of the month.
}
For more advanced component extraction, convert to the calendar type
that you are interested in.
}
\examples{
x <- as.Date("2019-01-01") + 0:5
get_day(x)
}
|