Mastodon Feed: Post

Mastodon Feed

Boosted by glyph ("Glyph"):
nedbat@hachyderm.io ("Ned Batchelder") wrote:

Today it's been exactly as many days from Python 0.9.1 (Feb 20, 1991) to Python 3.0.0 (Dec 3, 2008) as there have been from Python 3.0.0 to now!

import datetime as dt

when_091 = dt.date(1991, 2, 20)
when_300 = dt.date(2008, 12, 3)
today = dt.date(2026, 9, 16)

days_091_300 = (when_300 - when_091).days
days_300_now = (today - when_300).days

print(f"{days_091_300} days from 0.9.1 to 3.0.0")
print(f"{days_300_now} days from 3.0.0 to now")

6496 days from 0.9.1 to 3.0.0
6496 days from 3.0.0 to now