yday

0th

Percentile

Get/set days component of a date-time.

Date-time must be a POSIXct, POSIXlt, Date, chron, yearmon, yearqtr, zoo, zooreg, timeDate, xts, its, ti, jul, timeSeries, and fts objects.

Keywords
manip, methods, utilities, chron
Usage
yday(x)
Arguments
x
a POSIXct, POSIXlt, Date, chron, yearmon, yearqtr, zoo, zooreg, timeDate, xts, its, ti, jul, timeSeries, or fts object.
Value

  • yday returns the day of the year as a decimal number (01-366). mday returns the day of the month as a decimal number (01-31).

See Also

wday

Aliases
  • day
  • day<-
  • mday
  • mday<-
  • yday
  • yday<-
Examples
x <- as.Date("2009-09-02")
yday(x) #245
mday(x) #2
yday(x) <- 1  #"2009-01-01"
yday(x) <- 366 #"2010-01-01"
mday(x) > 3
Documentation reproduced from package lubridate, version 1.2.0, License: GPL

Community examples

tywang918@gmail.com at May 21, 2018 lubridate v1.3.3

yday(as.Date("2012-12-31"))