Method: PropCheck::Generators.future_date
- Defined in:
- lib/prop_check/generators.rb
permalink .future_date(epoch: Date.today) ⇒ Object
variant of #date that only generates dates in the future (relative to ‘:epoch`).
>> Generators.future_date(epoch: Date.new(2022, 01, 01)).sample(2, rng: Random.new(42))
=> [Date.new(2022, 01, 06), Date.new(2022, 01, 11)]
743 744 745 |
# File 'lib/prop_check/generators.rb', line 743 def future_date(epoch: Date.today) date_from_offset(positive_integer, epoch: epoch) end |