mirror of
https://gitlab.silvrtree.co.uk/martind2000/nci.git
synced 2025-01-12 04:05:10 +00:00
8 lines
377 B
Plaintext
8 lines
377 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';
|
|
- var title = this.props.title || sec + ' second' + ending;
|
|
span(title= title)= suffix + (min ? min + ' minunte' : sec + ' second') + ending
|