class DBF::ColumnType::Date

Public Instance Methods

type_cast(value) click to toggle source

@param value [String]

# File lib/dbf/column_type.rb, line 76
def type_cast(value)
  value.match?(/\d{8}/) && ::Date.strptime(value, '%Y%m%d')
rescue StandardError
  nil
end