From bdda32dd6fdc38d552cccc5fa66e915db4742fd0 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Fri, 11 Jul 2025 09:31:37 -0700 Subject: feat(schedule): Use day part for future airing times --- src/oguri/schedule.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') 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: -- cgit v1.2.3