Skip to content

Commit

Permalink
updated date format
Browse files Browse the repository at this point in the history
  • Loading branch information
kalindudc committed May 27, 2020
1 parent d578de2 commit 04af2ce
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion stats.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,19 @@ Data.getProblems((err, data) => {
// type: validUsers[item.email].type,
// completed: item.complete
// });
var d = new Date(new Date(attempt.createdAt).getTime() - (attempt.elapsedTime*1000));
var dformat = [d.getMonth()+1,
d.getDate(),
d.getFullYear()].join('/')+' '+
[d.getHours(),
d.getMinutes(),
d.getSeconds()].join(':');

var line = item.email + ',' +
'Q' + problems[item.id].index + ':'+ problems[item.id].name + ',' +
j + ',' +
attempt.elapsedTime + ',' +
new Date(new Date(attempt.createdAt).getTime() - (attempt.elapsedTime*1000)) + ',' +
dformat + ',' +
validUsers[item.email].type + ',' +
item.complete + "\n";

Expand Down

0 comments on commit 04af2ce

Please sign in to comment.