Flowdock
method

test_rfc2616

Importance_0
v1_9_1_378 - Show latest stable - 0 notes - Class: TimeExtentionTest
test_rfc2616() public

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/time.rb, line 553
    def test_rfc2616
      t = Time.utc(1994, 11, 6, 8, 49, 37)
      assert_equal(t, Time.httpdate("Sun, 06 Nov 1994 08:49:37 GMT"))
      assert_equal(t, Time.httpdate("Sunday, 06-Nov-94 08:49:37 GMT"))
      assert_equal(t, Time.httpdate("Sun Nov  6 08:49:37 1994"))
      assert_equal(Time.utc(1995, 11, 15, 6, 25, 24),
                   Time.httpdate("Wed, 15 Nov 1995 06:25:24 GMT"))
      assert_equal(Time.utc(1995, 11, 15, 4, 58, 8),
                   Time.httpdate("Wed, 15 Nov 1995 04:58:08 GMT"))
      assert_equal(Time.utc(1994, 11, 15, 8, 12, 31),
                   Time.httpdate("Tue, 15 Nov 1994 08:12:31 GMT"))
      assert_equal(Time.utc(1994, 12, 1, 16, 0, 0),
                   Time.httpdate("Thu, 01 Dec 1994 16:00:00 GMT"))
      assert_equal(Time.utc(1994, 10, 29, 19, 43, 31),
                   Time.httpdate("Sat, 29 Oct 1994 19:43:31 GMT"))
      assert_equal(Time.utc(1994, 11, 15, 12, 45, 26),
                   Time.httpdate("Tue, 15 Nov 1994 12:45:26 GMT"))
      assert_equal(Time.utc(1999, 12, 31, 23, 59, 59),
                   Time.httpdate("Fri, 31 Dec 1999 23:59:59 GMT"))

      assert_equal(Time.utc(2007, 12, 23, 11, 22, 33),
                   Time.httpdate('Sunday, 23-Dec-07 11:22:33 GMT'))
    end
Register or log in to add new notes.