Core utils: Format date
This commit is contained in:
@@ -10,13 +10,6 @@ module.exports = {
|
||||
async tick(client, timer) {
|
||||
|
||||
//format date because isostring is utc duh
|
||||
const formatDate = (date) => {
|
||||
const year = date.getFullYear();
|
||||
const month = String(date.getMonth() + 1).padStart(2, '0');
|
||||
const day = String(date.getDate()).padStart(2, '0');
|
||||
return `${year}-${month}-${day}`;
|
||||
};
|
||||
|
||||
try {
|
||||
const today = new Date();
|
||||
const lastMonday = new Date(today);
|
||||
|
||||
Reference in New Issue
Block a user