bytes_as_date
Converts a byte string representing a date into a Python date object.
def bytes_as_date(
data: bytes
) - > datetime.date
Converts a byte sequence into a date object by decoding the bytes as a UTF-8 string and parsing the resulting ISO 8601 formatted date.
Parameters
| Name | Type | Description |
|---|---|---|
| data | bytes | The raw byte sequence containing an ISO 8601 formatted date string to be converted. |
Returns
| Type | Description |
|---|---|
datetime.date | A date object representing the decoded and parsed calendar date. |