Created
October 15, 2019 16:29
-
-
Save benoitMariaux/92cdf25208b7078b5ef94f91153bd81c 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
# Give me next n sprints for JIRA | |
import datetime | |
# First, edit here | |
first_sprint = 'Sprint 9: 0210-1610' | |
current_sprint_number = 9 | |
current_sprint_start = datetime.datetime(2019, 10, 2) | |
current_sprint_end = datetime.datetime(2019, 10, 16) | |
###################################################### | |
how_many_sprints = int(input("How many sprints do you want from "+first_sprint+"?\n")) | |
print('OK,', how_many_sprints) | |
print('Then...') | |
c = current_sprint_number + 1 | |
next_sprint_number = current_sprint_number + 1 | |
while (c <= (current_sprint_number + how_many_sprints)): | |
next_sprint_start = current_sprint_start + datetime.timedelta(days=14) | |
next_sprint_end = current_sprint_end + datetime.timedelta(days=14) | |
print("Sprint " | |
+str(next_sprint_number) | |
+": " | |
+"{:02d}{:02d}".format(next_sprint_start.day, next_sprint_start.month) | |
+"-" | |
+"{:02d}{:02d}".format(next_sprint_end.day, next_sprint_end.month) | |
) | |
current_sprint_start = next_sprint_start | |
current_sprint_end = next_sprint_end | |
next_sprint_number += 1 | |
c += 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment