Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Print date and time of next PyCologne meeting in German
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import locale
from dateutil.rrule import rrule, MONTHLY, WE
DATE_FMT = "%A, %d. %B %Y, %H:%M Uhr"
locale.setlocale(locale.LC_ALL, 'de_DE.UTF-8')
meeting_dates = iter(
rrule(MONTHLY, byweekday=WE(+2), byhour=19, byminute=0, count=12))
print("Nächstes PyCologne-Treffen: {}".format(
next(meeting_dates).strftime(DATE_FMT)))
print("\nNachfolgende Termine:\n")
for date in meeting_dates:
print("* {}".format(date.strftime(DATE_FMT)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.