% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cal_gregorian.R
\name{calendar_gregorian}
\alias{calendar_gregorian}
\alias{cal_gregorian}
\title{Gregorian time unit classes}
\format{
A civil-based calendar containing Gregorian time units.
}
\usage{
cal_gregorian
}
\value{
An S3 list of class \code{c("cal_gregorian", "mt_calendar")} containing
the named time unit classes of the Gregorian calendar. Each unit is
accessible via \code{$} notation and calling it with a step size produces a
time granule (e.g., 1 month granule as \code{cal_gregorian$month(1L)}).
}
\description{
Time unit constructors for the Gregorian calendar system. These units can be
used with \code{\link[=linear_time]{linear_time()}} to create custom time representations.
}
\details{
The following time units are available in the Gregorian calendar (\verb{cal_gregorian$}).
\itemize{
\item \code{year()}: Year unit
\item \code{quarter()}: Quarter (3-month period) unit
\item \code{month()}: Month unit
\item \code{day()}: Day unit
\item \code{hour()}: Hour unit
\item \code{minute()}: Minute unit
\item \code{second()}: Second unit
\item \code{millisecond()}: Millisecond unit
}

These units form a hierarchy where conversions between adjacent units follow
the Gregorian calendar rules. For units that don't have a fixed relationship
(e.g., months to days), the conversion requires a time context.
}
\examples{
# Create a custom time representation using Gregorian units
linear_time(
  Sys.time(),
  chronon = hour(1L)
)

}
\seealso{
\code{\link[=linear_time]{linear_time()}} for creating linear time points.
}
