diff --git a/dashboard_static/js/code.js b/dashboard_static/js/code.js index 3dcf2c8..ea7eb9c 100644 --- a/dashboard_static/js/code.js +++ b/dashboard_static/js/code.js @@ -26,6 +26,13 @@ function showFeeds() { function tweetCell(tweet) { const date = new Date(tweet.created_at); + const minutes = date.getMinutes(); + + if (minutes < 10) { + minutes = "0" + minutes + } + + var cell = document.createElement("div"); cell.innerHTML = `
@@ -36,9 +43,9 @@ function tweetCell(tweet) { ${tweet.user.name} @${tweet.user.screen_name}
- ${date.getHours()}:${date.getMinutes()} + ${date.getHours()}:${minutes} - ${tweet.text} + ${tweet.text}
favorite