aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAjay Ramachandran <[email protected]>2021-12-31 16:36:52 -0500
committerGitHub <[email protected]>2021-12-31 16:36:52 -0500
commit894410db98e421a5d1316387a969a191a8ad653e (patch)
tree2ae1aac1a8165e79dd33755e0e28082e3c4e89ab
parentb758cbb25f5a2c7c45a54d9f579d9ccb6e8e799f (diff)
parent0336157673855d86e0c7e4a830d638db4c092ee8 (diff)
downloadSponsorBlock-894410db98e421a5d1316387a969a191a8ad653e.tar.gz
SponsorBlock-894410db98e421a5d1316387a969a191a8ad653e.zip
Merge pull request #1115 from Choromanski/master
Fixed minute to day conversion
-rw-r--r--src/popup.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/popup.ts b/src/popup.ts
index 84607e15..14d22dd8 100644
--- a/src/popup.ts
+++ b/src/popup.ts
@@ -739,7 +739,7 @@ async function runThePopup(messageListener?: MessageListener): Promise<void> {
*/
function getFormattedHours(minutes) {
minutes = Math.round(minutes * 10) / 10;
- const days = Math.floor(minutes / 3600);
+ const days = Math.floor(minutes / 1440);
const hours = Math.floor(minutes / 60) % 24;
return (days > 0 ? days + chrome.i18n.getMessage("dayAbbreviation") + " " : "") + (hours > 0 ? hours + chrome.i18n.getMessage("hourAbbreviation") + " " : "") + (minutes % 60).toFixed(1);
}