Commit 705ca18e authored by Bryce Johnson's avatar Bryce Johnson

Get PrettyTime tests passing.

parent b05a31d9
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
static stringifyTime(timeObject) { static stringifyTime(timeObject) {
const reducedTime = _.reduce(timeObject, (memo, unitValue, unitName) => { const reducedTime = _.reduce(timeObject, (memo, unitValue, unitName) => {
const isNonZero = !!unitValue; const isNonZero = !!unitValue;
return isNonZero ? `${memo} ${unitValue}${unitName.charAt(0)} ` : memo; return isNonZero ? `${memo} ${unitValue}${unitName.charAt(0)}` : memo;
}, '').trim(); }, '').trim();
return reducedTime.length ? reducedTime : '0m'; return reducedTime.length ? reducedTime : '0m';
} }
......
//= require directives/tooltip_title //= require lib/utils/pretty_time
(() => { (() => {
const PrettyTime = gl.PrettyTime; const PrettyTime = gl.PrettyTime;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment