Add convertDateToISOString.js

Also make getCreationDate.js and getJoinDate.js use this function
This commit is contained in:
SileNce5k 2021-06-28 17:54:22 +02:00
parent 8a47c78b44
commit a1986c12a2
No known key found for this signature in database
GPG key ID: C507260E7F2583AD
3 changed files with 7 additions and 2 deletions

View file

@ -0,0 +1,3 @@
module.exports = function (date){
return date.getUTCFullYear() + '-' + ('0' + (date.getUTCMonth()+1)).slice(-2) + '-' + ('0' + date.getUTCDate()).slice(-2)+" "+date.getUTCHours()+":"+date.getUTCMinutes()+":"+date.getUTCSeconds();
}