Display the date, like "May 5th", using pythons strftime? - Stack Overflow

PHOTO EMBED

Thu Jan 13 2022 03:44:24 GMT+0000 (Coordinated Universal Time)

Saved by [deleted user] #python

if 4 <= day <= 20 or 24 <= day <= 30:
    suffix = "th"
else:
    suffix = ["st", "nd", "rd"][day % 10 - 1]
content_copyCOPY

https://stackoverflow.com/questions/5891555/display-the-date-like-may-5th-using-pythons-strftime/5891598