It was suggested it would be nice to see how long the attendees have been waiting in the queue. The "Join Info" button has a date when they joined but it doesn't show on the main page and needs to be calculated I'm thinking something like this as a mockup but could be changed.
# Calculate the difference
time_difference = time2 - time1
# Extract days, hours, and minutes from the difference
days = time_difference.days
hours, remainder = divmod(time_difference.seconds, 3600)
minutes, _ = divmod(remainder, 60)
# Pluralization logic
def pluralize(value, unit):
return f"{value} {unit}{'s' if value != 1 else ''}"
# Display the difference
days_str = pluralize(days, "day")
hours_str = pluralize(hours, "hour")
minutes_str = pluralize(minutes, "minute")
print(f"{days_str}<br>{hours_str}<br>{minutes_str}")
It was suggested it would be nice to see how long the attendees have been waiting in the queue. The "Join Info" button has a date when they joined but it doesn't show on the main page and needs to be calculated I'm thinking something like this as a mockup but could be changed.