Start working on Movie itempage #26

This commit is contained in:
prayag17 committed 2023-04-08 14:57:02 +05:30
1 parent 88474b494b
commit 909aead056
6 files changed
+708 -568

No files matched your search

+15
View File
@@ -22,3 +22,18 @@ export const getRuntime = (ticks) => {
}
return formatedTime;
};
export const getRuntimeFull = (ticks) => {
let time = ticksToMs(ticks);
let formatedTime = "";
let timeSec = Math.round(time / 1000);
let timeMin = Math.round(timeSec / 60);
if (timeMin > 60) {
let timeHr = Math.floor(timeMin / 60);
timeMin -= timeHr * 60;
formatedTime = `${timeHr}hour ${timeMin}minutes`;
} else {
formatedTime = `${timeMin}minutes`;
}
return formatedTime;
};