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