hour

0th

Percentile

Get/set hours component of a date-time.

Get/set hours component of a date-time.

Keywords
manip, methods, utilities, chron
Usage
hour(x)
Arguments
x
a date-time 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

  • the hours element of x as a decimal number

Aliases
  • hour.default
  • hour.zoo
  • hour.its
  • hour.ti
  • hour.timeseries
  • hour.fts
  • hour.irts
  • hour
  • hour<-
  • hour<-.default
  • hour<-.chron
  • hour<-.zoo
  • hour<-.its
  • hour<-.ti
  • hour<-.timeDate
  • hour<-.jul
  • hour<-.timeSeries
  • hour<-.fts
  • hour<-.irts
Examples
x <- now()
hour(x)
hour(x) <- 1
hour(x) <- 61 
hour(x) > 2
Documentation reproduced from package lubridate, version 0.1, License: GPL

Community examples

Looks like there are no examples yet.