move date to polyfill
This commit is contained in:
parent
5f835e9d55
commit
e678dcb872
3 changed files with 7 additions and 8 deletions
|
@ -1,6 +1,5 @@
|
|||
'use strict';
|
||||
|
||||
require('./util/date.js');
|
||||
const cookies = require('js-cookie');
|
||||
const request = require('superagent');
|
||||
const config = require('./config.js');
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
Date.prototype.addDays = function(days) {
|
||||
let dat = new Date(this.valueOf());
|
||||
dat.setDate(dat.getDate() + days);
|
||||
return dat;
|
||||
};
|
|
@ -59,3 +59,10 @@ Number.prototype.between = function(a, b, inclusive) {
|
|||
|
||||
// non standard
|
||||
Promise.prototype.abort = () => {};
|
||||
|
||||
// non standard
|
||||
Date.prototype.addDays = function(days) {
|
||||
let dat = new Date(this.valueOf());
|
||||
dat.setDate(dat.getDate() + days);
|
||||
return dat;
|
||||
};
|
||||
|
|
Reference in a new issue