Files
general-purpose-bot/core/utils.js
2026-02-03 10:45:24 +01:00

9 lines
263 B
JavaScript

module.exports = {
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}`;
}
}