Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 | 13x 4x 4x 4x | const padWithZero = (n) => { return n < 10 ? '0' + n : n; } const timestampToDate = (timestamp) => { var date = new Date(timestamp); return (date.getFullYear() + "-" + (padWithZero(date.getMonth()+1)) + "-" + padWithZero(date.getDate())); } export {timestampToDate, padWithZero}; |