Rev 25360 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
\name{weekdays}\alias{weekdays}\alias{weekdays.POSIXt}\alias{months}\alias{months.POSIXt}\alias{quarters}\alias{quarters.POSIXt}\alias{julian}\alias{julian.POSIXt}\title{Extract Parts of a POSIXt Object}\description{Extract the weekday, month or quarter, or the Julian time(days since some origin). These are generic functions: the methodsfor the internal date-time classes are documented here.}\usage{weekdays(x, abbreviate)\method{weekdays}{POSIXt}(x, abbreviate = FALSE)months(x, abbreviate)\method{months}{POSIXt}(x, abbreviate = FALSE)quarters(x, abbreviate)\method{quarters}{POSIXt}(x, \dots)julian(x, \dots)\method{julian}{POSIXt}(x, origin = as.POSIXct("1970-01-01", tz="GMT"), \dots)}\arguments{\item{x}{an object inheriting from class \code{"POSIXt"}.}\item{abbreviate}{logical. Should the names be abbreviated?}\item{origin}{an length-one object inheriting from class \code{"POSIXt"}.}\item{\dots}{arguments for other methods.}}\value{\code{weekdays} and \code{months} return a charactervector of names in the locale in use.\code{quarters} returns a character vector of \code{"Q1"} to\code{"Q4"}.\code{julian} returns the number of days (possibly fractional)since the origin, with the origin as a \code{"origin"} attribute.}\note{Other components such as the day of the month or the year arevery easy to compute: just use \code{\link{as.POSIXlt}} and extract therelevant component.}\seealso{\code{\link{DateTimeClasses}}}\examples{weekdays(.leap.seconds)months(.leap.seconds)quarters(.leap.seconds)}\keyword{chron}