mirror of
https://gitlab.silvrtree.co.uk/martind2000/nci.git
synced 2025-01-12 13:55:09 +00:00
7 lines
336 B
Plaintext
7 lines
336 B
Plaintext
- var sec = this.props.value / 1000;
|
|
- sec = sec >= 1 ? Math.round(sec) : Number(sec.toFixed(2));
|
|
- var min = sec >= 60 ? Math.round(sec / 60) : 0;
|
|
- var suffix = this.props.withSuffix ? 'in ' : '';
|
|
- var ending = min === 1 ? '' : 's';
|
|
span(title= sec + ' second' + ending)= suffix + (min ? min + ' minunte' : sec + ' second') + ending
|