% 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)
}
