@staticmethod
def _date(date):
    """
        Converts a datetime into an RFC 2822 formatted date.
        Returns None if None is provided as an argument.
        Keyword arguments:
        date -- A datetime object in GMT format.
        """
    if date is None:
        return None
    return '%s, %02d %s %04d %02d:%02d:%02d GMT' % (['Mon', 'Tue', 'Wed',
        'Thu', 'Fri', 'Sat', 'Sun'][date.weekday()], date.day, ['Jan',
        'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct',
        'Nov', 'Dec'][date.month - 1], date.year, date.hour, date.minute,
        date.second)
