1
0
mirror of https://github.com/matt-fidd/stratos.git synced 2026-01-02 12:19:28 +00:00

Split db utility modules down into individual parts

This commit is contained in:
2022-02-27 01:12:55 +00:00
parent e1b5b3261e
commit 59467b8bde
6 changed files with 167 additions and 140 deletions

15
utility/db/MySQLDate.js Normal file
View File

@@ -0,0 +1,15 @@
'use strict';
// Class for easy insertion of test dates into the database
class MySQLDate extends Date {
toString() {
return this.toISOString().slice(0, 19).replace('T', ' ');
}
alterDays(amount) {
this.setDate(this.getDate() + amount);
return this;
}
}
module.exports = MySQLDate;