mirror of https://github.com/jitsi/jitsi-meet
Because timeUtil.js computes hours, minutes, and seconds out of a single time/duration using three separate functions, I wouldn't recommend using it, especially reusing it. That's why I'm even making the functions private to their current use location.pull/1503/head
parent
8e6f043586
commit
a8b3177e20
@ -1,29 +0,0 @@ |
||||
/** |
||||
* Counts how many whole hours are included in the given time total. |
||||
* |
||||
* @param {number} milliseconds - The millisecond total to get hours from. |
||||
* @returns {number} |
||||
*/ |
||||
export function getHoursCount(milliseconds) { |
||||
return Math.floor(milliseconds / (60 * 60 * 1000)); |
||||
} |
||||
|
||||
/** |
||||
* Counts how many whole minutes are included in the given time total. |
||||
* |
||||
* @param {number} milliseconds - The millisecond total to get minutes from. |
||||
* @returns {number} |
||||
*/ |
||||
export function getMinutesCount(milliseconds) { |
||||
return Math.floor(milliseconds / (60 * 1000) % 60); |
||||
} |
||||
|
||||
/** |
||||
* Counts how many whole seconds are included in the given time total. |
||||
* |
||||
* @param {number} milliseconds - The millisecond total to get seconds from. |
||||
* @returns {number} |
||||
*/ |
||||
export function getSecondsCount(milliseconds) { |
||||
return Math.floor(milliseconds / 1000 % 60); |
||||
} |
Loading…
Reference in new issue