From 451340d0583c009d2bf0fbdf7c40fc9a01b3b1cd Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Tue, 26 Sep 2017 10:13:34 -0400 Subject: [PATCH] UX: Round up dates --- app/assets/javascripts/discourse/widgets/time-gap.js.es6 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/discourse/widgets/time-gap.js.es6 b/app/assets/javascripts/discourse/widgets/time-gap.js.es6 index 30cfd244830..f3463eb5e3d 100644 --- a/app/assets/javascripts/discourse/widgets/time-gap.js.es6 +++ b/app/assets/javascripts/discourse/widgets/time-gap.js.es6 @@ -8,10 +8,10 @@ function description(attrs) { if (daysSince < 30) { return I18n.t('dates.later.x_days', {count: daysSince}); } else if (daysSince < 365) { - const gapMonths = Math.floor(daysSince / 30); + const gapMonths = Math.ceil(daysSince / 30); return I18n.t('dates.later.x_months', {count: gapMonths}); } else { - const gapYears = Math.floor(daysSince / 365); + const gapYears = Math.ceil(daysSince / 365); return I18n.t('dates.later.x_years', {count: gapYears}); } }