From: Iskren Chernev Date: Wed, 7 May 2014 16:18:54 +0000 (-0700) Subject: Fix bugs in humanize and asYears X-Git-Tag: 2.8.0~29^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bcda4cf0c040047acd85bfe4864e6aead598eb38;p=thirdparty%2Fmoment.git Fix bugs in humanize and asYears --- diff --git a/moment.js b/moment.js index 257efc0b8..8959f76bb 100644 --- a/moment.js +++ b/moment.js @@ -1619,7 +1619,7 @@ years === 1 && ['y'] || ['yy', years]; args[2] = withoutSuffix; - args[3] = +msOrDuration > 0; + args[3] = +posNegDuration > 0; args[4] = lang; return substituteTimeAgo.apply({}, args); } @@ -2638,7 +2638,7 @@ moment.duration.fn.asDays = function () { return this.as('d'); }; moment.duration.fn.asWeeks = function () { return this.as('weeks'); }; moment.duration.fn.asMonths = function () { return this.as('M'); }; - moment.duration.fn.asYears = function () { return this.as('Y'); }; + moment.duration.fn.asYears = function () { return this.as('y'); }; /************************************ Default Lang