Created
February 25, 2022 16:11
-
-
Save knoxilla/249990f2e5ac7f6148b7c3301975f07f to your computer and use it in GitHub Desktop.
Revisions
-
knoxilla created this gist
Feb 25, 2022 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,21 @@ #!/usr/bin/env python3 """Endless March""" from datetime import datetime import subprocess actual_date = subprocess.run("date",capture_output=True, text=True) actual_date_parts = actual_date.stdout.split() today = datetime.now() then = datetime(day=1, month=3, year=2020) timedelta = today - then actual_date_parts[1] = 'Mar' actual_date_parts[2] = f"{timedelta.days + 1}" actual_date_parts[5] = '2020' tweaked_date = " ".join(actual_date_parts) print(tweaked_date)