Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
383 B
1
Indexable
Never
        is_may = datetime.datetime.strptime(
            data['date_booked'][:19], "%Y-%m-%dT%H:%M:%S"
        ).month == 5
        date_format = '%a, %b %d at {}' \
            if is_may else '%a, %b. %d at {}'
        data['date_booked'] =  datetime.datetime.strptime(
            data['date_booked'][:19], "%Y-%m-%dT%H:%M:%S"
        ).strftime(date_format)

Tue, Oct. 5 at 7:30pm