Commit 0c21d91b by JR Dalrymple

Had to fix the month garbage for December

parent 3442041d
...@@ -299,7 +299,10 @@ for date in interestingPeriodEnds: ...@@ -299,7 +299,10 @@ for date in interestingPeriodEnds:
fileLines[-2] = '**ARCHIVE** ' + fileLines[-2] fileLines[-2] = '**ARCHIVE** ' + fileLines[-2]
startOfBillingPeriod = date startOfBillingPeriod = date
if billingPeriod == 'm': if billingPeriod == 'm':
endOfBillingPeriod = thisPeriodEndDateTime + datetime.timedelta(days=monthDays[str(int(current['month'])+1)]) if current['month'] == '12':
endOfBillingPeriod = thisPeriodEndDateTime + datetime.timedelta(days=monthDays[str(int(current['month'])-11)])
else:
endOfBillingPeriod = thisPeriodEndDateTime + datetime.timedelta(days=monthDays[str(int(current['month'])+1)])
if billingPeriod == 'd': if billingPeriod == 'd':
endOfBillingPeriod = thisPeriodEndDateTime + datetime.timedelta(days=1) endOfBillingPeriod = thisPeriodEndDateTime + datetime.timedelta(days=1)
rotate = True rotate = True
...@@ -308,7 +311,10 @@ for date in interestingPeriodEnds: ...@@ -308,7 +311,10 @@ for date in interestingPeriodEnds:
endOfBillingPeriod = thisPeriodEndDateTime endOfBillingPeriod = thisPeriodEndDateTime
if endOfBillingPeriod < currentDateTime: if endOfBillingPeriod < currentDateTime:
if billingPeriod == 'm': if billingPeriod == 'm':
endOfBillingPeriod = thisPeriodEndDateTime + datetime.timedelta(days=monthDays[str(int(current['month'])+1)]) if current['month'] == '12':
endOfBillingPeriod = thisPeriodEndDateTime + datetime.timedelta(days=monthDays[str(int(current['month'])-11)])
else:
endOfBillingPeriod = thisPeriodEndDateTime + datetime.timedelta(days=monthDays[str(int(current['month'])+1)])
if billingPeriod == 'd': if billingPeriod == 'd':
endOfBillingPeriod = thisPeriodEndDateTime + datetime.timedelta(days=1) endOfBillingPeriod = thisPeriodEndDateTime + datetime.timedelta(days=1)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment