timehandlers: Consistent ways to get system times and dates

Description Usage Arguments Value See Also

Description

R has Sys.Date() and Sys.time(), an incredible pair of functions. Well, mostly they're incredible because despite being written by the /same group of people/ they're not even consistently cased. What we actually mean is today or now, so let's just call it that. Also, we sometimes want to work out what this time was N days ago, ("Oliver, find me all of X in the last 30 days") so let's include a function that does that.

Usage

1
2
3
4
5
today()

now()

days_ago(days)

Arguments

days

how many days back you want the timestamp to be offset from the current date and time.

Value

a Date or POSIX object

See Also

iftime and ifdate for time-based conditional handlers.


Ironholds/olivr documentation built on May 7, 2019, 6:40 a.m.