summaryrefslogtreecommitdiffstats
path: root/app.py
diff options
context:
space:
mode:
Diffstat (limited to 'app.py')
-rw-r--r--app.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/app.py b/app.py
index 4026960..b437d8e 100644
--- a/app.py
+++ b/app.py
@@ -113,8 +113,9 @@ def get_channel_information(channel_name):
next_milestone = find_next_milestone(current_subscriber_count)
days_until_next_milestone = (next_milestone - model.intercept_) / model.coef_
days_until_next_milestone_scalar = int(days_until_next_milestone[0])
- next_milestone_date = (df.index[0] + pandas.Timedelta(days=days_until_next_milestone_scalar)).date()
- time_until_next_milestone = (next_milestone_date - datetime.datetime.now().date()).days
+ today = datetime.datetime.now().date()
+ next_milestone_date = today + datetime.timedelta(days=days_until_next_milestone_scalar)
+ time_until_next_milestone = (next_milestone_date - today).days
if time_until_next_milestone < 0:
raise OverflowError
channel_data["next_milestone_date"] = str(next_milestone_date)
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage