Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
eternal-march.py
from datetime import date
ordinal = lambda n: "%d%s" % (n, "tsnrhtdd" [(n // 10 % 10 != 1) * (n % 10 < 4) * n % 10::4])
dom = date.today() - date(year=2020, month=3, day=1)
print(f"Today is March {ordinal(dom.days)}, 2020")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.