Skip to content

Instantly share code, notes, and snippets.

@acdha
Created January 9, 2021 22:17
Show Gist options
  • Save acdha/fa28069927cee6dcbb5339f6e5c7d437 to your computer and use it in GitHub Desktop.
Save acdha/fa28069927cee6dcbb5339f6e5c7d437 to your computer and use it in GitHub Desktop.
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