Files
30-seconds-of-code/test/tomorrow/tomorrow.js
2018-01-23 20:11:51 +00:00

8 lines
218 B
JavaScript

const tomorrow = () => {
let t = new Date();
t.setDate(t.getDate() + 1);
return `${t.getFullYear()}-${String(t.getMonth() + 1).padStart(2, '0')}-${String(
t.getDate()
).padStart(2, '0')}`;
};
module.exports = tomorrow