Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- import calendar
- # Show every month
- for month in range(1, 13):
- # Compute the dates for each week that overlaps the month
- c = calendar.monthcalendar(2014, month)
- first_week = c[0]
- second_week = c[1]
- # Gslug meets on the first Saturday of the month
- if first_week[calendar.SATURDAY]:
- meeting_date = first_week[calendar.SATURDAY]
- else:
- meeting_date = second_week[calendar.SATURDAY]
- print '%3s: %2s' % (calendar.month_abbr[month], meeting_date)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement