random_datetime: Get random datetime

Description Usage Arguments Examples

View source: R/basic_types.R

Description

Get random datetime

Usage

1
2
3
4
5
6
7
8
9
random_datetime(
  min_date,
  max_date,
  date_format = NULL,
  min_time = "00:00:00",
  max_time = "23:59:59",
  time_resolution = "seconds",
  tz = "UTC"
)

Arguments

min_date

character or date, beginning of the dates interval to sample from

max_date

character or date, ending of the dates interval to sample from

date_format

character, check strptime for details

min_time

character, beginning of the time interval to sample from

max_time

character, ending of the time interval to sample from

time_resolution

character, one of "seconds", "minutes", "hours", time resolution

tz

character, time zone to use

Examples

1
random_datetime("2012-12-04", "2020-10-31", min_time = "7:00:00", max_time = "17:00:00")

jakubnowicki/fixtuRes documentation built on Feb. 20, 2022, 6:14 a.m.