% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/time_cycle.R
\name{time_cycle}
\alias{time_cycle}
\title{Obtain the cycle of a time object}
\usage{
time_cycle(x, ...)
}
\arguments{
\item{x}{A time object (e.g., \link[base:Date]{base::Date}, \link[base:POSIXct]{base::POSIXct}, \code{\link[=linear_time]{linear_time()}}, etc.)}

\item{...}{Additional arguments for methods.}
}
\value{
A time \code{\link[=duration]{duration()}} object representing the cycle of each value
(e.g. \code{weeks(1L)}), or \code{NA} if the object has no cyclical component.
}
\description{
This S7 generic function extracts the cycle (the cyclical time granule) from
a time object, such as cyclical time representations.
}
\examples{

# Non-cyclical objects return NA
time_cycle(Sys.Date())

# The cycle of a cyclical time object
time_cycle(month_of_year(Sys.Date()))

}
