Skip to content

Commit

Permalink
Revert .padStart to .slice since padStart is not supported in Node v6
Browse files Browse the repository at this point in the history
  • Loading branch information
mhxbe committed Oct 17, 2019
1 parent f04ab3e commit 4b58fae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils.js
Expand Up @@ -44,7 +44,7 @@ exports.getCurrentTime = function () {
const year = time.getFullYear();
const month = MONTHS[time.getMonth()];
const day = time.getDate();
const hour = `${time.getHours()}`.padStart(2,0);
const minute = `${time.getMinutes()}`.padStart(2,0);
const hour = `0${time.getHours()}`.slice(-2);
const minute = `0${time.getMinutes()}`.slice(-2);
return `${day} ${month} ${year} at ${hour}:${minute}`;
};

0 comments on commit 4b58fae

Please sign in to comment.