1
0
mirror of https://github.com/matt-fidd/stratos.git synced 2026-01-01 22:39:26 +00:00
Files
stratos/utility/db/MySQLDate.js

16 lines
295 B
JavaScript

'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;