MCPcopy Index your code
hub / github.com/feiyu563/PrometheusAlert / from

Function from

static/plugins/chart.js/Chart.bundle.js:18087–18095  ·  view source on GitHub ↗
(time, withoutSuffix)

Source from the content-addressed store, hash-verified

18085 }
18086
18087 function from (time, withoutSuffix) {
18088 if (this.isValid() &&
18089 ((isMoment(time) && time.isValid()) ||
18090 createLocal(time).isValid())) {
18091 return createDuration({to: this, from: time}).locale(this.locale()).humanize(!withoutSuffix);
18092 } else {
18093 return this.localeData().invalidDate();
18094 }
18095 }
18096
18097 function fromNow (withoutSuffix) {
18098 return this.from(createLocal(), withoutSuffix);

Callers 2

linkFunction · 0.70
linkFunction · 0.70

Calls 3

isMomentFunction · 0.85
createLocalFunction · 0.85
createDurationFunction · 0.85

Tested by

no test coverage detected