# NOT RUN {
sample_date()
sort(sample_date(size = 10))
sort(sample_date(from = "2020-02-28", to = "2020-03-01",
size = 10, replace = TRUE)) # 2020 is a leap year
# Note: Oddity with sample():
sort(sample_date(from = "2020-01-01", to = "2020-01-01", size = 10, replace = TRUE)) # range of 0!
# see sample(9:9, size = 10, replace = TRUE)
# }
Run the code above in your browser using DataLab