Adding Date#xmlschema from ActiveSupport for Ruby < 1.9. Closes #47
This commit is contained in:
parent
150ff1e5e4
commit
09946386b1
|
@ -20,3 +20,11 @@ class Hash
|
|||
target
|
||||
end
|
||||
end
|
||||
|
||||
# Thanks, ActiveSupport!
|
||||
class Date
|
||||
# Converts datetime to an appropriate format for use in XML
|
||||
def xmlschema
|
||||
strftime("%Y-%m-%dT%H:%M:%S%Z")
|
||||
end if RUBY_VERSION < '1.9'
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue