Class: DB::Postgres::Native::Types::Date
- Inherits:
-
Object
- Object
- DB::Postgres::Native::Types::Date
- Defined in:
- lib/db/postgres/native/types.rb
Instance Method Summary collapse
Instance Method Details
#name ⇒ Object
111 112 113 |
# File 'lib/db/postgres/native/types.rb', line 111 def name "DATE" end |
#parse(string) ⇒ Object
115 116 117 118 119 120 121 |
# File 'lib/db/postgres/native/types.rb', line 115 def parse(string) if string parts = string.split(/[\-\s:]/) return Time.utc(*parts) end end |