Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a new column to display how long user was in queue for #532

Open
jonespm opened this issue Aug 12, 2024 · 0 comments
Open

Add a new column to display how long user was in queue for #532

jonespm opened this issue Aug 12, 2024 · 0 comments
Assignees

Comments

@jonespm
Copy link
Member

jonespm commented Aug 12, 2024

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.

image

# 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}")
@zqian zqian self-assigned this Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: To Do
Development

No branches or pull requests

2 participants