Browse Source

Removed unnecessary datetime parsing.

Heikki Hokkanen 16 years ago
parent
commit
5fd64e6c19
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      gitstats

+ 3
- 3
gitstats View File

278
 				self.authors[author]['commits'] = 1
278
 				self.authors[author]['commits'] = 1
279
 
279
 
280
 			# author of the month/year
280
 			# author of the month/year
281
-			yymm = datetime.datetime.fromtimestamp(stamp).strftime('%Y-%m')
281
+			yymm = date.strftime('%Y-%m')
282
 			if yymm in self.author_of_month:
282
 			if yymm in self.author_of_month:
283
 				if author in self.author_of_month[yymm]:
283
 				if author in self.author_of_month[yymm]:
284
 					self.author_of_month[yymm][author] += 1
284
 					self.author_of_month[yymm][author] += 1
292
 			else:
292
 			else:
293
 				self.commits_by_month[yymm] = 1
293
 				self.commits_by_month[yymm] = 1
294
 
294
 
295
-			yy = datetime.datetime.fromtimestamp(stamp).year
295
+			yy = date.year
296
 			if yy in self.author_of_year:
296
 			if yy in self.author_of_year:
297
 				if author in self.author_of_year[yy]:
297
 				if author in self.author_of_year[yy]:
298
 					self.author_of_year[yy][author] += 1
298
 					self.author_of_year[yy][author] += 1
307
 				self.commits_by_year[yy] = 1
307
 				self.commits_by_year[yy] = 1
308
 
308
 
309
 			# authors: active days
309
 			# authors: active days
310
-			yymmdd = datetime.datetime.fromtimestamp(stamp).strftime('%Y-%m-%d')
310
+			yymmdd = date.strftime('%Y-%m-%d')
311
 			if 'last_active_day' not in self.authors[author]:
311
 			if 'last_active_day' not in self.authors[author]:
312
 				self.authors[author]['last_active_day'] = yymmdd
312
 				self.authors[author]['last_active_day'] = yymmdd
313
 				self.authors[author]['active_days'] = 1
313
 				self.authors[author]['active_days'] = 1