'Retrieve a date field from a header.
Retrieves a date field from the named header, returning a tuple
compatible with time.mktime().'

def getdate(self, name):

    try:
        data = self[name]
    except KeyError:
        return None
    return parsedate(data)
