Project Status: Active – The project has reached a stable, usable state and is being actively developed. Build Status

Time classes for R, w/ time mocking capability via timefuzz

Why? - Some programming languages support monkey patching. However, R does not officially allow this (there’s a way to do it, but it’s a hack). Therefore, the only way that I can think of to “mock time” is to use a different set of time classes/objects. That is, we can’t just mock time using Sys.Date() directly as there’s no way to monkey patch the code behind that function. Some may say it’s good that R doesn’t officially support monkey patching; there’s definitely upsides; but a downside is that mocking things like time becomes difficult.

See the docs to get started: https://docs.ropensci.org/clock

Installation

remotes::install_github("ropensci/clock")

Meta