Skip to content

Commit

Permalink
Allow date fields to handle Ranges. Take 2.
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Jackson committed Aug 22, 2012
1 parent 80f4088 commit f1941cd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/hippo/field.rb
Expand Up @@ -121,8 +121,9 @@ def parse_date(value)
end end


case value.class.to_s case value.class.to_s
when "Date" then value when "Range" then value
when "Time" then value.to_date when "Date" then value
when "Time" then value.to_date
when "String" when "String"
format = case value format = case value
when /\A\d{6}\z/ then '%y%m%d' when /\A\d{6}\z/ then '%y%m%d'
Expand Down

0 comments on commit f1941cd

Please sign in to comment.