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 weekday option in rsvp summary #71

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open

Add weekday option in rsvp summary #71

wants to merge 2 commits into from

Conversation

kracekumar
Copy link

No description provided.

summary_table += '**When**|%s @ %s\n' % (event['date'], event['time'] or '(All day)')
summary_table += '**Day**|%s \n' % (ISOWEEKDAY.get(date.isoweekday()))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another way to accomplish this would be to replace (ISOWEEKDAY.get(date.isoweekday())) with date.strftime("%A")

@@ -14,6 +14,10 @@
from zulip_users import ZulipUsers


ISOWEEKDAY = {1: 'Monday', 2: 'Tuesday', 3: 'Wednesday', 4: 'Thursday',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably don't need this -- python's datetime module knows the days of the week.

@kracekumar
Copy link
Author

@alexandrinaw Thanks for the tip. I didn't know that earlier!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants