Class: Date
- Inherits:
-
Object
- Object
- Date
- Defined in:
- lib/sixarm_ruby_date_time_random/date.rb
Overview
Date extensions
Class Method Summary collapse
-
.random(range = nil) ⇒ Date
This calls ‘DateTime#random`.
Class Method Details
.random(range = nil) ⇒ Date
This calls ‘DateTime#random`.
The default range is +/- 10000 days from now. which is the same as DateTime.random and Time.random.
29 30 31 |
# File 'lib/sixarm_ruby_date_time_random/date.rb', line 29 def self.random(range = nil) DateTime.random(range).to_date end |