code: def render_date(date):
      
      if not date:
          return None
      assert valid_date(date)
      # Avoid %a and %b, which can change with locale, breaking compliance
      weekday = Definitions.weekday_abbr_list[date.weekday()]
      month = Definitions.month_abbr_list[date.month - 1]
      return date.strftime("{day}, %d {month} %Y %H:%M:%S GMT"
                           ).format(day=weekday, month=month)
docs: Render a date (e.g. an Expires value) per RFCs 6265/2616/1123.
  
      Don't give this localized (timezone-aware) datetimes. If you use them,
      convert them to GMT before passing them to this. There are too many
      conversion corner cases to handle this universally.