diff --git a/ChangeLog b/ChangeLog index b85d56e83e..edf878b224 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Mon Aug 23 00:23:07 2010 Tadayoshi Funaba + + * lib/date.rb, lib/date/format.rb: [ruby-core:31695] + Sun Aug 22 09:08:02 2010 Tanaka Akira * include/ruby/ruby.h (UINT2NUM): fix ifdef condition for LLP64. diff --git a/lib/date.rb b/lib/date.rb index 5295ce9b7f..8b1796201c 100644 --- a/lib/date.rb +++ b/lib/date.rb @@ -1738,11 +1738,6 @@ class DateTime < Date new_by_frags(elem, sg) end - def self.rfc3339(str='-4712-01-01T00:00:00+00:00', sg=ITALY) # :nodoc: - elem = _rfc3339(str) - new_by_frags(elem, sg) - end - def self.xmlschema(str='-4712-01-01T00:00:00+00:00', sg=ITALY) # :nodoc: elem = _xmlschema(str) new_by_frags(elem, sg) diff --git a/lib/date/format.rb b/lib/date/format.rb index 1a420fb398..6894e945e3 100644 --- a/lib/date/format.rb +++ b/lib/date/format.rb @@ -342,7 +342,7 @@ class Date def iso8601() strftime('%F') end - def rfc3339() iso8601 end + def rfc3339() strftime('%FT%T%:z') end def xmlschema() iso8601 end # :nodoc: diff --git a/test/date/test_date_strftime.rb b/test/date/test_date_strftime.rb index 117517256c..e4ab3550b3 100644 --- a/test/date/test_date_strftime.rb +++ b/test/date/test_date_strftime.rb @@ -332,7 +332,6 @@ class TestDateStrftime < Test::Unit::TestCase assert_equal(d.ctime, d.asctime) assert_equal('2001-02-03', d.iso8601) - assert_equal(d.rfc3339, d.iso8601) assert_equal(d.xmlschema, d.iso8601) assert_equal('Sat, 3 Feb 2001 00:00:00 +0000', d.rfc2822) assert_equal(d.rfc822, d.rfc2822)