Mar 15th 2019, 16:28:13
What time is correct when calculating an attack? Eestats or game. They are off a few minutes.
Mar 16th 2019, 16:23:24
Mar 17th 2019, 2:36:50
Mar 17th 2019, 9:46:11
Mar 18th 2019, 2:41:56
May 23rd 2019, 1:16:18
let timeRemaining = '9.2';
Object.entries(timeRemaining.match(/(?<hours>\d+)?\.(?<minutes>\d+)/).groups)
.map(([unit, quantity]) =>
unit === 'minutes'
? `${quantity || 0 * 6} ${unit}`
: `${quantity || 0} ${unit}`
)
.join(' & ');
// Output: "9 hours & 12 minutes"