]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
Passing tests for calling postformat on duration.humanize
authorTim Wood <washwithcare@gmail.com>
Mon, 29 Oct 2012 16:36:17 +0000 (09:36 -0700)
committerTim Wood <washwithcare@gmail.com>
Mon, 29 Oct 2012 16:36:17 +0000 (09:36 -0700)
moment.js

index 8dbfefda563b03a86547d8706eda5942d87b967c..174f7fff19bed297b14619a8f88b8f25a432c369 100644 (file)
--- a/moment.js
+++ b/moment.js
             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