Week strings in the timeline module are now zero-padded (Fixes issue 3).

This commit is contained in:
Adam Waldenberg 2013-06-12 14:57:25 +02:00
parent a31ab18ba0
commit 761bc10046
1 changed files with 1 additions and 1 deletions

View File

@ -35,7 +35,7 @@ class TimelineData:
if useweeks:
yearweek = datetime.date(int(i[0][0][0:4]), int(i[0][0][5:7]), int(i[0][0][8:10])).isocalendar()
key = (i[0][1], str(yearweek[0]) + "W" + str(yearweek[1]))
key = (i[0][1], str(yearweek[0]) + "W" + "{0:02d}".format(yearweek[1]))
else:
key = (i[0][1], i[0][0][0:7])