Mercurial > public > src > rhodecode
comparison pylons_app/controllers/summary.py @ 478:728fbb693183
fixed bug in summary graph
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Mon, 30 Aug 2010 17:38:38 +0200 |
parents | 01cf2c9bd7ee |
children | 3fc3ce53659b |
comparison
equal
deleted
inserted
replaced
476:0d4fceb91c9c | 478:728fbb693183 |
---|---|
72 def __get_commit_stats(self, repo): | 72 def __get_commit_stats(self, repo): |
73 aggregate = OrderedDict() | 73 aggregate = OrderedDict() |
74 | 74 |
75 #graph range | 75 #graph range |
76 td = datetime.today() + timedelta(days=1) | 76 td = datetime.today() + timedelta(days=1) |
77 y = td.year | 77 y, m, d = td.year, td.month, td.day |
78 m = td.month | 78 c.ts_min = mktime((y, (td - timedelta(days=calendar.mdays[m])).month, |
79 d = td.day | |
80 c.ts_min = mktime((y, (td - timedelta(days=calendar.mdays[m] - 1)).month, | |
81 d, 0, 0, 0, 0, 0, 0,)) | 79 d, 0, 0, 0, 0, 0, 0,)) |
82 c.ts_max = mktime((y, m, d, 0, 0, 0, 0, 0, 0,)) | 80 c.ts_max = mktime((y, m, d, 0, 0, 0, 0, 0, 0,)) |
83 | |
84 | 81 |
85 def author_key_cleaner(k): | 82 def author_key_cleaner(k): |
86 k = person(k) | 83 k = person(k) |
87 k = k.replace('"', "'") #for js data compatibilty | 84 k = k.replace('"', "'") #for js data compatibilty |
88 return k | 85 return k |