Skip to content

Commit

Permalink
Removed unnecessary datetime parsing.
Browse files Browse the repository at this point in the history
  • Loading branch information
hoxu committed Jan 6, 2010
1 parent fcbe8cd commit 5fd64e6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gitstats
Expand Up @@ -278,7 +278,7 @@ class GitDataCollector(DataCollector):
self.authors[author]['commits'] = 1

# author of the month/year
yymm = datetime.datetime.fromtimestamp(stamp).strftime('%Y-%m')
yymm = date.strftime('%Y-%m')
if yymm in self.author_of_month:
if author in self.author_of_month[yymm]:
self.author_of_month[yymm][author] += 1
Expand All @@ -292,7 +292,7 @@ class GitDataCollector(DataCollector):
else:
self.commits_by_month[yymm] = 1

yy = datetime.datetime.fromtimestamp(stamp).year
yy = date.year
if yy in self.author_of_year:
if author in self.author_of_year[yy]:
self.author_of_year[yy][author] += 1
Expand All @@ -307,7 +307,7 @@ class GitDataCollector(DataCollector):
self.commits_by_year[yy] = 1

# authors: active days
yymmdd = datetime.datetime.fromtimestamp(stamp).strftime('%Y-%m-%d')
yymmdd = date.strftime('%Y-%m-%d')
if 'last_active_day' not in self.authors[author]:
self.authors[author]['last_active_day'] = yymmdd
self.authors[author]['active_days'] = 1
Expand Down

0 comments on commit 5fd64e6

Please sign in to comment.