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