Class: Date

Inherits:
Object
  • Object
show all
Defined in:
lib/ext/date.rb

Class Method Summary collapse

Class Method Details

.parse_safely(raw_date_time) ⇒ Object


2
3
4
5
6
7
8
9
10
# File 'lib/ext/date.rb', line 2

def self.parse_safely(raw_date_time)
  begin
    self.parse raw_date_time
  rescue ArgumentError
    nil
  rescue TypeError
    nil
  end
end