From bcda4cf0c040047acd85bfe4864e6aead598eb38 Mon Sep 17 00:00:00 2001 From: Iskren Chernev Date: Wed, 7 May 2014 09:18:54 -0700 Subject: [PATCH] Fix bugs in humanize and asYears --- moment.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -- 2.47.2