mirror of
https://github.com/matt-fidd/stratos.git
synced 2026-01-01 20:39:28 +00:00
Generalise MySQLDate to lib
This commit is contained in:
@@ -1,15 +0,0 @@
|
||||
'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;
|
||||
@@ -1,7 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
// Import user defined modules
|
||||
const MySQLDate = require('./MySQLDate');
|
||||
const MySQLDate = require('../../lib/MySQLDate');
|
||||
|
||||
// Object storing configurations for the db tables
|
||||
const details = {
|
||||
|
||||
Reference in New Issue
Block a user