]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
Change from round(...) to Math.floor(...) when calculating relative number of months 546/head
authorPeter Marsh <pete@modeltwozero.com>
Tue, 11 Dec 2012 18:08:49 +0000 (18:08 +0000)
committerPeter Marsh <pete@modeltwozero.com>
Tue, 11 Dec 2012 18:08:49 +0000 (18:08 +0000)
moment.js

index 5f8780d0dfc2484402b7d7af55e994fb6430d98e..9e43c3252b127430b632184315152feb4d9164bb 100644 (file)
--- a/moment.js
+++ b/moment.js
                 days === 1 && ['d'] ||
                 days <= 25 && ['dd', days] ||
                 days <= 45 && ['M'] ||
-                days < 345 && ['MM', round(days / 30)] ||
+                days < 345 && ['MM', Math.floor(days / 30)] ||
                 years === 1 && ['y'] || ['yy', years];
         args[2] = withoutSuffix;
         args[3] = milliseconds > 0;