def date_to_rfc822(y, m, d=1):
    'Converts a date to an RFC 822 formatted string.'
    d = datetime(int(y), month_to_int(m), int(d))
    return email.utils.format_datetime(d)
Converts a date to an RFC 822 formatted string.
def date_to_rfc822(y, m, d=1):
    
    d = datetime(int(y), month_to_int(m), int(d))
    return email.utils.format_datetime(d)