mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-03-16 09:16:29 +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) => {
|
||||
const hours = Math.floor((time / (1000 * 60 * 60)) % 24);
|
||||
const minutes = Math.floor((time / (1000 * 60)) % 60);
|
||||
const seconds = Math.floor((time / 1000) % 60);
|
||||
return `${('0' + hours).slice(-2)}:${('0' + minutes).slice(-2)}:${('0' + seconds).slice(-2)}`;
|
||||
const hours = ('0' + Math.floor((time / (1000 * 60 * 60)) % 24)).slice(-2);
|
||||
const minutes = ('0' + Math.floor((time / (1000 * 60)) % 60)).slice(-2);
|
||||
const seconds = ('0' + Math.floor((time / 1000) % 60)).slice(-2);
|
||||
return `${hours}:${minutes}:${seconds}`;
|
||||
}
|
||||
|
||||
renderTimeSlider() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue