Last active
December 9, 2019 01:38
-
-
Save godber/428e1cc2500fb9fed68fe9919a34f45b to your computer and use it in GitHub Desktop.
DesertPy CI Examples
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from dateutil.rrule import rrule, MONTHLY, WE, SA | |
from datetime import datetime | |
def main(year): | |
saturday_dates = list( | |
rrule( | |
freq=MONTHLY, | |
count=12, | |
byweekday=SA(2), | |
dtstart=datetime(year, 1, 1) | |
) | |
) | |
wednesday_dates = list( | |
rrule( | |
freq=MONTHLY, | |
count=12, | |
byweekday=WE(4), | |
dtstart=datetime(year, 1, 1) | |
) | |
) | |
print("DesertPy 2020 Schedule\n") | |
print("Wednesday Meetings") | |
print('\n'.join([x.strftime("%m/%d/%Y") for x in wednesday_dates])) | |
print("\nSaturday Meetings") | |
print('\n'.join([x.strftime("%m/%d/%Y") for x in saturday_dates])) | |
if __name__ == "__main__": | |
main(2020) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For 2020, prints out ...