diff options
| author | Jacob McDonnell <jacob@simplelittledream.com> | 2022-12-29 17:12:56 -0500 |
|---|---|---|
| committer | Jacob McDonnell <jacob@simplelittledream.com> | 2022-12-29 17:12:56 -0500 |
| commit | a167f0a5de32d822f20955358315431d2edf6f7e (patch) | |
| tree | cb543c3ea79d8354a276045e8b0cc0eaa3ff6804 /.local/bin/days2finals.py | |
| parent | b8ff930812770cb0a1b76536b34026c991b3cf44 (diff) | |
Added some new scripts
Diffstat (limited to '.local/bin/days2finals.py')
| -rwxr-xr-x | .local/bin/days2finals.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/.local/bin/days2finals.py b/.local/bin/days2finals.py new file mode 100755 index 0000000..0e5a0fe --- /dev/null +++ b/.local/bin/days2finals.py @@ -0,0 +1,19 @@ +import datetime
+now = datetime.datetime.now()
+
+finalsDate = datetime.datetime(2022, 12, 12, 0, 0, 0, 0)
+daysLeft = finalsDate - now
+
+weeks = daysLeft.days // 7
+days = daysLeft.days % 7
+minutes = daysLeft.seconds // 60
+hours = minutes // 60
+minutes %= 60
+seconds = daysLeft.seconds % 60
+
+output = f"{weeks} weeks {days} days {hours} hours {minutes} minutes and {seconds} seconds until finals week"
+
+if (weeks <=0):
+ output = "FINALS WEEK"
+
+print(output)
|
