diff options
author | Ben Sima <ben@bsima.me> | 2021-03-16 11:00:44 -0400 |
---|---|---|
committer | Ben Sima <ben@bsima.me> | 2021-03-16 11:00:44 -0400 |
commit | eef8ff71d1e72fdd4bece81a2237e3171464a2ef (patch) | |
tree | e1cbc4ebeb31a537d1e9fe93428bcb8c440c1e21 | |
parent | 39f88320df5ae0ae9ceaad33a47d713dbd9c74a2 (diff) |
minor fixes to progress.py
-rwxr-xr-x | progress.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/progress.py b/progress.py index 17fefd2..db5648c 100755 --- a/progress.py +++ b/progress.py @@ -8,8 +8,7 @@ class Progress(): """Displays the time left in the day/workweek/month/year as a percentage. Inspired by https://twitter.com/year_progress - Days are workdays (8am-5pm), and weeks are workweeks (Mon-Fri). As such, - this is a 4HL script to it's core. + Days are workdays (8am-5pm). """ @@ -30,7 +29,6 @@ class Progress(): # day ends at hour 17 (5pm), and since it's 9 hours long, it starts # at 8am "day": datetime(self.now.year, self.now.month, self.now.day, hour=17), - # a week is really a workweek "week": datetime(self.now.year, self.now.month, self.now.day) + weekdays_left, "month": datetime(self.now.year, self.now.month, month_max), @@ -48,7 +46,7 @@ class Progress(): emacs minibuffer. """ - return "d: {d:.1%} | w: {w:.1%} | m: {m:.1%} | y: {y:.1%}".format( + return "d: {d:.0%} | w: {w:.0%} | m: {m:.0%} | y: {y:.0%}".format( d=self.calc("day"), w=self.calc("week"), m=self.calc("month"), |