parse_http_date_safe
Same as parse_http_date, but return None if the input is invalid.
def parse_http_date_safe(
date: string
) - > datetime | null
Same as parse_http_date, but return None if the input is invalid.
Parameters
| Name | Type | Description |
|---|---|---|
| date | string | The HTTP-formatted date string (e.g., RFC 1123, RFC 850, or asctime) to be parsed |
Returns
| Type | Description |
|---|---|
| `datetime | null` |