Created
February 17, 2016 01:03
-
-
Save moqada/387b8b96822df05ff2a9 to your computer and use it in GitHub Desktop.
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
# -*- coding: utf-8 -*- | |
import argparse | |
import datetime | |
def main(start, end): | |
start = datetime.datetime.strptime(start, '%Y%m%d') | |
end = datetime.datetime.strptime(end, '%Y%m%d') | |
current = start | |
while current <= end: | |
print(current.strftime('%Y%m%d')) | |
current += datetime.timedelta(days=1) | |
if __name__ == '__main__': | |
parser = argparse.ArgumentParser() | |
parser.add_argument('start') | |
parser.add_argument('end') | |
args = parser.parse_args() | |
main(args.start, args.end) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment