summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xperc7
1 files changed, 4 insertions, 3 deletions
diff --git a/perc b/perc
index 602625b..cb5b029 100755
--- a/perc
+++ b/perc
@@ -39,7 +39,10 @@
# 3.6:
# - Added a 'count' output option to display a countdown of days until the finish
# - wjoe ruined everything
+# 3.61:
+# - Fixed count output, was failing to count days before
#
+
import copy
import decimal
import json
@@ -410,13 +413,11 @@ class Output(object):
def count(self, ratio, start, finish, delta):
seconds = delta.seconds
- days = int(math.floor(seconds/60/60/24))
- seconds = seconds - (days*60*60*24)
+ days = delta.days
hours = int(math.floor(seconds/60/60))
seconds = seconds - (hours*60*60)
minutes = int(math.floor(seconds/60))
seconds = int(seconds - (minutes*60))
-
print 'Event in ' + str(days) + ' day(s), ' + str(hours) + ' hour(s), ' + str(minutes) + ' minute(s), ' + str(seconds) + ' second(s).'
def output(self, type, ratio, start, finish, count):