Class: Time
- Inherits:
-
Object
- Object
- Time
- Defined in:
- lib/hot_catch/time.rb
Class Method Summary collapse
Class Method Details
.safe_strptime(value, format, default = nil) ⇒ Object
2 3 4 5 6 |
# File 'lib/hot_catch/time.rb', line 2 def self.safe_strptime(value, format, default = nil) Time.strptime(value.to_s, format) rescue ArgumentError default end |