diff --git a/data/pmcs/202101-ME.xls b/data/pmcs/202101-ME.xls new file mode 100644 index 0000000..2b99e79 --- /dev/null +++ b/data/pmcs/202101-ME.xls @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:50fe351a0ce89e6404bf913c07ef9efccc02b8be9a224b37a68d7d0f2493f6c5 +size 3468288 diff --git a/milestones/burndown.py b/milestones/burndown.py index 8c7411c..441eecf 100644 --- a/milestones/burndown.py +++ b/milestones/burndown.py @@ -50,13 +50,23 @@ def burndown(args, milestones): plt.plot(month_starts, model, label="Baseline") achieved_months = [mnth for mnth in month_starts if mnth <= last_achieved_month] - achieved_months.append( - datetime( - achieved_months[-1].year, - achieved_months[-1].month + 1, - achieved_months[-1].day, + # Need to acount for year wrap + if achieved_months[-1].month == 12: + achieved_months.append( + datetime( + achieved_months[-1].year + 1, + 1, + achieved_months[-1].day, + ) + ) + else: + achieved_months.append( + datetime( + achieved_months[-1].year, + achieved_months[-1].month + 1, + achieved_months[-1].day, + ) ) - ) plt.plot(achieved_months, actual[: len(achieved_months)], label="Achieved") plt.xlabel("Date")