Regression test for date format code, by Mike Meyer.
(I tweaked it slightly so examples are allowed to have no date too.)
diff --git a/Lib/test/test_rfc822.py b/Lib/test/test_rfc822.py
index a2b5151..798ae2b 100644
--- a/Lib/test/test_rfc822.py
+++ b/Lib/test/test_rfc822.py
@@ -11,6 +11,7 @@
     fp.seek(0)
     m = rfc822.Message(fp)
     i = 0
+    
     for n, a in m.getaddrlist('to') + m.getaddrlist('cc'):
         if verbose:
             print 'name:', repr(n), 'addr:', repr(a)
@@ -28,6 +29,21 @@
                 print '    [no match]'
             print 'not found:', repr(n), repr(a)
 
+    out = m.getdate('date')
+    if out:
+        if verbose:
+            print 'Date:', m.getheader('date')
+        if out == (1999, 1, 13, 23, 57, 35, 0, 0, 0):
+            if verbose:
+                print '    [matched]'
+        else:
+            if verbose:
+                print '    [no match]'
+            print 'Date conversion failed:', out
+
+# Note: all test cases must have the same date (in various formats),
+# or no date!
+
 test('''Date:    Wed, 13 Jan 1999 23:57:35 -0500
 From:    Guido van Rossum <guido@CNRI.Reston.VA.US>
 To:      "Guido van
@@ -40,6 +56,7 @@
 test('''From: Barry <bwarsaw@python.org
 To: guido@python.org (Guido: the Barbarian)
 Subject: nonsense
+Date: Wednesday, January 13 1999 23:57:35 -0500
 
 test''', [('Guido: the Barbarian', 'guido@python.org'),
           ])
@@ -47,6 +64,7 @@
 test('''From: Barry <bwarsaw@python.org
 To: guido@python.org (Guido: the Barbarian)
 Cc: "Guido: the Madman" <guido@python.org>
+Date:  13-Jan-1999 23:57:35 EST
 
 test''', [('Guido: the Barbarian', 'guido@python.org'),
           ('Guido: the Madman', 'guido@python.org')
@@ -54,6 +72,7 @@
 
 test('''To: "The monster with
      the very long name: Guido" <guido@python.org>
+Date:    Wed, 13 Jan 1999 23:57:35 -0500
 
 test''', [('The monster with\n     the very long name: Guido',
            'guido@python.org')])
@@ -63,6 +82,7 @@
         "'string-sig@python.org'" <string-sig@python.org>
 Cc: fooz@bat.com, bart@toof.com
 Cc: goit@lip.com
+Date:    Wed, 13 Jan 1999 23:57:35 -0500
 
 test''', [('Amit J. Patel', 'amitp@Theory.Stanford.EDU'),
           ('Mike Fletcher', 'mfletch@vrtelecom.com'),
@@ -75,6 +95,7 @@
 # This one is just twisted.  I don't know what the proper result should be,
 # but it shouldn't be to infloop, which is what used to happen!
 test('''To: <[smtp:dd47@mail.xxx.edu]_at_hmhq@hdq-mdm1-imgout.companay.com>
+Date:    Wed, 13 Jan 1999 23:57:35 -0500
 
 test''', [('', ''),
           ('', 'dd47@mail.xxx.edu'),