def _parse_date_rfc822(dateString):
    '''Parse an RFC822, RFC1123, RFC2822, or asctime-style date'''
    data = dateString.split()
    if data[0][-1] in (',', '.') or data[0].lower() in _daynames:
        del data[0]
    if len(data) == 4:
        s = data[3]
        s = s.split('+', 1)
        if len(s) == 2:
            data[3:] = s
        else:
            data.append('')
        dateString = " ".join(data)
    if len(data) < 5:
        dateString += ' 00:00:00 GMT'
    return email.utils.parsedate_tz(dateString)
def _parse_date_rfc822 ( dateString ) : data = dateString . split ( ) if data [ 0 ] [ - 1 ] in ( ',' , '.' ) or data [ 0 ] . lower ( ) in _daynames : del data [ 0 ] if len ( data ) == 4 : s = data [ 3 ] s = s . split ( '+' , 1 ) if len ( s ) == 2 : data [ 3 : ] = s else : data . append ( '' ) dateString = " " . join ( data ) if len ( data ) < 5 : dateString += ' 00:00:00 GMT' return email . utils . parsedate_tz ( dateString )
Parse an RFC822, RFC1123, RFC2822, or asctime-style date