diff options
author | Andrew White <andrew.white@unboxed.co> | 2017-03-03 20:14:22 +0000 |
---|---|---|
committer | Andrew White <andrew.white@unboxed.co> | 2017-03-03 21:53:13 +0000 |
commit | f0aeecda1450ba17701ccba68e5a796ce4ac4c3b (patch) | |
tree | 5577db6b1f3424711bf3b35493ba55cf95ae86b7 /activesupport/lib/active_support/core_ext | |
parent | 08e05d4a49c1ba1327e3e6821eba1f0c93361ab2 (diff) | |
download | rails-f0aeecda1450ba17701ccba68e5a796ce4ac4c3b.tar.gz rails-f0aeecda1450ba17701ccba68e5a796ce4ac4c3b.tar.bz2 rails-f0aeecda1450ba17701ccba68e5a796ce4ac4c3b.zip |
Add `rfc3339` aliases to `xmlschema`
For naming consistency when using the RFC 3339 profile
of ISO 8601 in applications.
Diffstat (limited to 'activesupport/lib/active_support/core_ext')
-rw-r--r-- | activesupport/lib/active_support/core_ext/time/conversions.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/core_ext/time/conversions.rb b/activesupport/lib/active_support/core_ext/time/conversions.rb index f2bbe55aa6..595bda6b4f 100644 --- a/activesupport/lib/active_support/core_ext/time/conversions.rb +++ b/activesupport/lib/active_support/core_ext/time/conversions.rb @@ -64,4 +64,7 @@ class Time def formatted_offset(colon = true, alternate_utc_string = nil) utc? && alternate_utc_string || ActiveSupport::TimeZone.seconds_to_utc_offset(utc_offset, colon) end + + # Aliased to +xmlschema+ for compatibility with +DateTime+ + alias_method :rfc3339, :xmlschema end |