Class: ADT::ColumnType::Date
Instance Method Summary collapse
Instance Method Details
#flag ⇒ Object
83 84 85 |
# File 'lib/adt/column_type.rb', line 83 def flag '?' end |
#type_cast(value, _table) ⇒ Object
76 77 78 79 80 81 |
# File 'lib/adt/column_type.rb', line 76 def type_cast(value, _table) int = value.unpack('L').dig(0).to_i int == 0 ? nil : ::Date.jd(int) rescue StandardError nil end |