rfc2822_date
Converts a date or datetime object into an RFC 2822 formatted string using the email.utils.format_datetime utility.
def rfc2822_date(
date: datetime.date | datetime.datetime
) - > string
Converts a date or datetime object into a string formatted according to the RFC 2822 specification, commonly used in email headers.
Parameters
| Name | Type | Description |
|---|---|---|
| date | `datetime.date | datetime.datetime` |
Returns
| Type | Description |
|---|---|
string | The formatted date string compliant with RFC 2822 standards. |