mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-04-29 11:34:04 +00:00
formatTime function refactored
This commit is contained in:
parent
3fa5a87075
commit
3ea7e0ce25
1 changed files with 4 additions and 4 deletions
|
|
@ -86,10 +86,10 @@ class ControlBar extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
formatTime = (time) => {
|
formatTime = (time) => {
|
||||||
const hours = Math.floor((time / (1000 * 60 * 60)) % 24);
|
const hours = ('0' + Math.floor((time / (1000 * 60 * 60)) % 24)).slice(-2);
|
||||||
const minutes = Math.floor((time / (1000 * 60)) % 60);
|
const minutes = ('0' + Math.floor((time / (1000 * 60)) % 60)).slice(-2);
|
||||||
const seconds = Math.floor((time / 1000) % 60);
|
const seconds = ('0' + Math.floor((time / 1000) % 60)).slice(-2);
|
||||||
return `${('0' + hours).slice(-2)}:${('0' + minutes).slice(-2)}:${('0' + seconds).slice(-2)}`;
|
return `${hours}:${minutes}:${seconds}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
renderTimeSlider() {
|
renderTimeSlider() {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue