Learn R Programming

splusTimeDate (version 1.5.0-72)

timeCeiling: Rounding Functions for timeDate Objects

Description

Rounds a time to the nearest day.

Usage

timeCeiling(x)
timeFloor(x)
timeTrunc(x)

Arguments

x
an object of class positionsCalendar

Value

  • returns a positionsCalendar object rounded to current or next day.
  • timeFloor and timeTruncround a positionsCalendar object to the beginning of the day.
  • timeCeilingrounds a time to the beginning of the next day.

See Also

ceiling, floor, trunc, positionsCalendar-class

Examples

Run this code
x <- timeDate(date(), in.format="%w %m %d %H:%M:%S %Y")
timeCeiling(x)
timeFloor(x)

Run the code above in your browser using DataLab