You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
246 B
11 lines
246 B
import prettyMs from 'pretty-ms';
|
|
|
|
const formatSeconds = seconds => {
|
|
const ms = seconds * 1000;
|
|
const pretty = prettyMs(ms);
|
|
|
|
// Only return first two periods
|
|
return pretty.split(' ').slice(0, 2).join(' ');
|
|
};
|
|
|
|
export default formatSeconds;
|
|
|