@@ -156,16 +156,22 @@ - (NSString *)parseHeader:(NSString *)txt withRefs:(NSString *)badges
156
156
NSString *rol=[line substringToIndex: r_name_i.location];
157
157
NSString *name=[line substringWithRange: NSMakeRange (r_name_i.location,(r_email_i.location-r_name_i.location))];
158
158
NSString *email=[line substringWithRange: NSMakeRange (r_email_i.location+1 ,((r_email_e.location-1 )-r_email_i.location))];
159
- NSString *time=[line substringFromIndex: r_email_e.location+2 ];
160
159
160
+ NSArray *t=[[line substringFromIndex: r_email_e.location+2 ] componentsSeparatedByString: @" " ];
161
+ NSDate *date=[NSDate dateWithTimeIntervalSince1970: [[t objectAtIndex: 0 ] doubleValue ]];
162
+ NSDateFormatter * theDateFormatter = [[NSDateFormatter alloc ] init ];
163
+ [theDateFormatter setDateStyle: NSDateFormatterMediumStyle];
164
+ [theDateFormatter setTimeStyle: NSDateFormatterMediumStyle];
165
+ NSString *dateString=[theDateFormatter stringForObjectValue: date];
166
+
161
167
if (![email isEqualToString: last_mail]){
162
168
[auths appendString: [NSString stringWithFormat: @" <div class='user %@ clearfix'>" ,rol]];
163
169
if ([self isFeatureEnabled: @" gravatar" ]){
164
170
NSString *hash=[self someMethodThatReturnsSomeHashForSomeString: email];
165
171
[auths appendString: [NSString stringWithFormat: @" <img class='avatar' src='http://www.gravatar.com/avatar/%@ ?d=wavatar&s=30'/>" ,hash]];
166
172
}
167
173
[auths appendString: [NSString stringWithFormat: @" <p class='name'>%@ <span class='rol'>(%@ )</span></p>" ,name,rol]];
168
- [auths appendString: [NSString stringWithFormat: @" <p class='time'>%@ </p></div>" ,time ]];
174
+ [auths appendString: [NSString stringWithFormat: @" <p class='time'>%@ </p></div>" ,dateString ]];
169
175
}
170
176
last_mail=email;
171
177
}
0 commit comments