Module: Mail::Jdec::CommonDateFieldPatch
- Defined in:
- lib/mail/jdec/fields/common_date_field_patch.rb
Instance Method Summary collapse
Instance Method Details
#date_time ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/mail/jdec/fields/common_date_field_patch.rb', line 17 def date_time if Jdec.enabled? if element begin ::DateTime.parse("#{element.date_string} #{element.time_string}") rescue ArgumentError => e require 'time' begin Time.parse(value).to_datetime rescue ArgumentError => e nil end end else nil end else super end end |