mirror of
https://github.com/matt-fidd/stratos.git
synced 2026-01-01 17:59:25 +00:00
16 lines
295 B
JavaScript
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;
|