Skip to content

Commit 1439d32

Browse files
committed
Add sort to time record table
1 parent 39c2292 commit 1439d32

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/output/base.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,14 @@ class base {
122122
});
123123
});
124124

125+
times.sort((a, b) => {
126+
if (a.date.isSame(b.date)) return 0;
127+
128+
return a.date.isBefore(b.date) ? 1 : -1;
129+
});
130+
125131
this.times = times;
132+
126133
this.users = _.mapObject(users, user => this.config.toHumanReadable(user, 'stats'));
127134
this.projects = _.mapObject(projects, project => this.config.toHumanReadable(project, 'stats'));
128135
this.stats = {

0 commit comments

Comments
 (0)