MCPcopy Create free account
hub / github.com/feiyu563/PrometheusAlert / relativeTime

Function relativeTime

static/plugins/chart.js/Chart.bundle.js:15189–15194  ·  view source on GitHub ↗
(number, withoutSuffix, string, isFuture)

Source from the content-addressed store, hash-verified

15187 };
15188
15189 function relativeTime (number, withoutSuffix, string, isFuture) {
15190 var output = this._relativeTime[string];
15191 return (isFunction(output)) ?
15192 output(number, withoutSuffix, string, isFuture) :
15193 output.replace(/%d/i, number);
15194 }
15195
15196 function pastFuture (diff, output) {
15197 var format = this._relativeTime[diff > 0 ? 'future' : 'past'];

Callers

nothing calls this directly

Calls 1

isFunctionFunction · 0.70

Tested by

no test coverage detected