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