Travis build: 1738 [custom]

This commit is contained in:
30secondsofcode
2018-02-26 10:20:51 +00:00
parent 8c42f47d59
commit 7a457af1f9
4 changed files with 29 additions and 6 deletions

View File

@ -1,8 +1,9 @@
const tomorrow = () => {
const tomorrow = (long = false) => {
let t = new Date();
t.setDate(t.getDate() + 1);
return `${String(t.getMonth() + 1).padStart(2, '0')}-${String(
const ret = `${t.getFullYear()}-${String(t.getMonth() + 1).padStart(2, '0')}-${String(
t.getDate()
).padStart(2, '0')}-${t.getFullYear()}`;
).padStart(2, '0')}`;
return !long ? ret : `${ret}T00:00:00`;
};
module.exports = tomorrow;