We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4c803a2 + 228e954 commit 4704db7Copy full SHA for 4704db7
activesupport/lib/active_support/xml_mini.rb
@@ -62,11 +62,10 @@ def content_type
62
"yaml" => Proc.new { |yaml| yaml.to_yaml }
63
} unless defined?(FORMATTING)
64
65
- # TODO use regexp instead of Date.parse
66
unless defined?(PARSING)
67
PARSING = {
68
"symbol" => Proc.new { |symbol| symbol.to_s.to_sym },
69
- "date" => Proc.new { |date| ::Date.parse(date) },
+ "date" => Proc.new { |date| ::Date.strptime(date, "%Y-%m-%d") },
70
"datetime" => Proc.new { |time| Time.xmlschema(time).utc rescue ::DateTime.parse(time).utc },
71
"duration" => Proc.new { |duration| Duration.parse(duration) },
72
"integer" => Proc.new { |integer| integer.to_i },
0 commit comments