mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-02-02 12:00:10 +08:00
hopefully fixed nan days error
This commit is contained in:
parent
1701315560
commit
1a25822796
1 changed files with 1 additions and 1 deletions
|
@ -270,7 +270,7 @@ firebase.auth().onAuthStateChanged(function (user) {
|
|||
|
||||
let text = "Account created on " + user.metadata.creationTime;
|
||||
|
||||
const date1 = new Date(text);
|
||||
const date1 = new Date(user.metadata.creationTime);
|
||||
const date2 = new Date();
|
||||
const diffTime = Math.abs(date2 - date1);
|
||||
const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24));
|
||||
|
|
Loading…
Reference in a new issue