yday

0th

Percentile

Get/set days component of a date-time.

Get/set days component of a date-time.

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.
Details

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

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
  • yday.default
  • yday.zoo
  • yday.its
  • yday.ti
  • yday.timeseries
  • yday.fts
  • yday.irts
  • mday.default
  • mday.zoo
  • mday.its
  • day
  • mday.ti
  • mday.timeseries
  • mday.fts
  • mday.irts
  • yday
  • mday
  • day<-
  • yday<-.default
  • yday<-.Date
  • yday<-.chron
  • yday<-.zoo
  • yday<-.its
  • yday<-.ti
  • yday<-.timeDate
  • yday<-.jul
  • yday<-.timeSeries
  • yday<-
  • yday<-.fts
  • yday<-.irts
  • mday<-.default
  • mday<-.Date
  • mday<-.chron
  • mday<-.zoo
  • mday<-.its
  • mday<-.ti
  • mday<-.timeDate
  • mday<-.jul
  • mday<-.timeSeries
  • mday<-.fts
  • mday<-.irts
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 0.1, License: GPL

Community examples

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

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