Skip to content

Instantly share code, notes, and snippets.

@pydanny
Last active December 30, 2020 01:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pydanny/044563c5d7808c1a1059b475fd9c7008 to your computer and use it in GitHub Desktop.
Save pydanny/044563c5d7808c1a1059b475fd9c7008 to your computer and use it in GitHub Desktop.
More Married
"""
Audrey and I met on February 18, 2020. We were married on December 27th, 2020.
This programs calculates how much more we've been married than not married.
1. On November 4, 2017 our time married was now half the time we had been together.
2. On September 9, 2021 our time married will be twice as much as we knew each other.
3. On July 21, 2025, we
"""
from datetime import datetime
met = datetime(2010, 2, 18)
married = datetime(2013, 12, 27)
premarried = married - met
for i in range(2, 10):
duration = i*premarried
print(met + duration)
2017-11-04
2021-09-12
2025-07-21
2029-05-29
2033-04-06
2037-02-12
2040-12-21
2044-10-29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment