yesterday: Reference Dates and Times from Now

Description Usage Arguments Details See Also Examples

View source: R/yesterday.R

Description

yesterday, tomorrow, last month and next month based on the current datetime

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
yesterday(tzone = NULL)

tomorrow(tzone = NULL)

last_month(tzone = NULL)

next_month(tzone = NULL)

last_hour(tzone = NULL)

next_hour(tzone = NULL)

Arguments

tzone

a character vector specifying which time zone you would like the current time in. tzone defaults to your computer's system timezone. You can retrieve the current time in the Universal Coordinated Time (UTC) with now("UTC").

Details

These functions provide commonly used dates relative to the current date and time (now). They give the floor for the specified time period.

See Also

now
floor_date

Examples

1
2
3
4
5
6
7
8
9
  yesterday()
  tomorrow()

  last_month()
  next_month()

  last_hour()
  next_hour()
 #  ( now() - ddays(1) ) > yesterday()

decisionpatterns/lubridate.tools documentation built on July 30, 2020, 4:24 a.m.