From: Tim Wood Date: Mon, 29 Oct 2012 16:36:17 +0000 (-0700) Subject: Passing tests for calling postformat on duration.humanize X-Git-Tag: 2.0.0~49 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d896f73872cb640e10be6349914ddae6c0162156;p=thirdparty%2Fmoment.git Passing tests for calling postformat on duration.humanize --- diff --git a/moment.js b/moment.js index 8dbfefda5..174f7fff1 100644 --- a/moment.js +++ b/moment.js @@ -1220,7 +1220,11 @@ var difference = +this, output = relativeTime(difference, !withSuffix, this.lang()); - return withSuffix ? this.lang().pastFuture(difference, output) : output; + if (withSuffix) { + output = this.lang().pastFuture(difference, output); + } + + return this.lang().postformat(output); }, lang : moment.fn.lang