Sha256: ef8ad0838bb80860421f3ee673ff7b27a0c0ccda3f9e7785c54deca58c9f0f27

Contents?: true

Size: 302 Bytes

Versions: 30

Compression:

Stored size: 302 Bytes

Contents

module ProductGroupSearch
  class DateField < NumberField
    def coerced_value
      Date.strptime(value.try(:to_s), "%d/%m/%Y")
    end

    def valid_value_data_type?
      begin
        Date.strptime(value.try(:to_s), "%d/%m/%Y")
        true
      rescue
        false
      end
    end
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
nimbleshop_core-0.0.23 lib/nimbleshop/product_group_search/date_field.rb
nimbleshop_core-0.0.21 lib/nimbleshop/product_group_search/date_field.rb
nimbleshop_core-0.0.20 lib/nimbleshop/product_group_search/date_field.rb
nimbleshop_core-0.0.19 lib/nimbleshop/product_group_search/date_field.rb
nimbleshop_core-0.0.17 lib/nimbleshop/product_group_search/date_field.rb
nimbleshop_core-0.0.16 lib/nimbleshop/product_group_search/date_field.rb
nimbleshop_core-0.0.15 lib/nimbleshop/product_group_search/date_field.rb
nimbleshop_core-0.0.14 lib/nimbleshop/product_group_search/date_field.rb
nimbleshop_core-0.0.14.rc2 lib/nimbleshop/product_group_search/date_field.rb
nimbleshop_core-0.0.14.rc1 lib/nimbleshop/product_group_search/date_field.rb
nimbleshop_core-0.0.13 lib/nimbleshop/product_group_search/date_field.rb
nimbleshop_core-0.0.12 lib/nimbleshop/product_group_search/date_field.rb
nimbleshop_core-0.0.11 lib/nimbleshop/product_group_search/date_field.rb
nimbleshop_core-0.0.10 lib/nimbleshop/product_group_search/date_field.rb
nimbleshop_core-0.0.9 lib/nimbleshop/product_group_search/date_field.rb
nimbleshop_core-0.0.8 lib/nimbleshop/product_group_search/date_field.rb
nimbleshop_core-0.0.7 lib/nimbleshop/product_group_search/date_field.rb
nimbleshop_core-0.0.5 lib/nimbleshop/product_group_search/date_field.rb
nimbleshop_core-0.0.4.beta1 lib/nimbleshop/product_group_search/date_field.rb
nimbleshop_core-0.0.4 lib/nimbleshop/product_group_search/date_field.rb