aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/oguri/schedule.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/oguri/schedule.py b/src/oguri/schedule.py
index a900294..32efb8b 100644
--- a/src/oguri/schedule.py
+++ b/src/oguri/schedule.py
@@ -203,11 +203,14 @@ def format_exact_time(date):
def format_future_airing_time(date, now):
delta = date - now
hours, remainder = divmod(int(delta.total_seconds()), 3600)
+ days, hours = divmod(hours, 24)
minutes, _ = divmod(remainder, 60)
time_string = date.strftime("%I:%M %p").replace("AM",
"a.m.").replace("PM", "p.m.")
parts = []
+ if days > 0:
+ parts.append(f"{days}d")
if hours > 0:
parts.append(f"{hours}h")
if minutes > 0: