Class: InCSV::Types::Date

Inherits:
ColumnType show all
Defined in:
lib/incsv/types/date.rb

Overview

Represents an ISO 8601-format date without any timestamp element, e.g. 2016-01-01.

Instance Method Summary collapse

Methods inherited from ColumnType

clean_value, #clean_value, for_database, #initialize, name

Constructor Details

This class inherits a constructor from InCSV::ColumnType

Instance Method Details

#match?Boolean

Returns:

  • (Boolean)

6
7
8
# File 'lib/incsv/types/date.rb', line 6

def match?
  value.strip.match(/\A[0-9]{4}-[0-9]{2}-[0-9]{2}\z/)
end