Method: Sunspot::Type::TimeType#cast
- Defined in:
- lib/sunspot/type.rb
#cast(string) ⇒ Object
:nodoc:
217 218 219 220 221 222 223 |
# File 'lib/sunspot/type.rb', line 217 def cast(string) #:nodoc: begin Time.xmlschema(string) rescue ArgumentError DateTime.strptime(string, XMLSCHEMA) end end |