Skip to content

Commit

Permalink
Fixed for Date.today.xmlschema returning values such as "2012-01-10T0…
Browse files Browse the repository at this point in the history
…0:00:00Z" for Dates.
  • Loading branch information
rposborne committed Jan 10, 2012
1 parent c7fcea5 commit ed943b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/quickbooks/parser/qbxml_base.rb
Expand Up @@ -8,7 +8,7 @@ class Quickbooks::Parser::QbxmlBase

FLOAT_CAST = Proc.new {|d| d ? Float(d) : 0.0}
BOOL_CAST = Proc.new {|d| d ? (d == 'True' ? true : false) : false }
DATE_CAST = Proc.new {|d| d ? Date.parse(d).xmlschema : Date.today.xmlschema }
DATE_CAST = Proc.new {|d| d ? Date.parse(d).strftime("%Y-%m-%d") : Date.today.strftime("%Y-%m-%d") }
TIME_CAST = Proc.new {|d| d ? Time.parse(d).xmlschema : Time.now.xmlschema }
INT_CAST = Proc.new {|d| d ? Integer(d.to_i) : 0 }
STR_CAST = Proc.new {|d| d ? String(d) : ''}
Expand Down

0 comments on commit ed943b8

Please sign in to comment.