Last active
September 23, 2016 06:55
-
-
Save qinshulei/5c4ffcb610265113d439ece7787c6c8a to your computer and use it in GitHub Desktop.
get all friday by python.
This file contains hidden or 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/python | |
| # -*- coding: utf-8 -*- | |
| from datetime import date, timedelta as td | |
| d1 = date(2015, 1, 2) | |
| d2 = date(2016, 12, 31) | |
| delta = d2 - d1 | |
| for i in range(0, delta.days + 1, 7): | |
| print d1 + td(days=i) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment