mirror of
https://github.com/captbaritone/webamp.git
synced 2026-01-24 02:36:00 +00:00
16 lines
351 B
JavaScript
16 lines
351 B
JavaScript
const getTimeObj = (time) => {
|
|
var minutes = Math.floor(time / 60);
|
|
var seconds = time % 60;
|
|
|
|
return {
|
|
minutesFirstDigit: Math.floor(minutes / 10),
|
|
minutesSecondDigit: Math.floor(minutes % 10),
|
|
secondsFirstDigit: Math.floor(seconds / 10),
|
|
secondsSecondDigit: Math.floor(seconds % 10)
|
|
};
|
|
};
|
|
|
|
module.exports = {
|
|
getTimeObj
|
|
};
|
|
|