From 8aa7c604a4c27bbcde42cbd9c75f677e5fc79544 Mon Sep 17 00:00:00 2001 From: Shane McDonald Date: Tue, 10 May 2016 16:13:47 -0400 Subject: [PATCH] Display correct time remaining on license page --- awx/ui/client/src/license/license.controller.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/awx/ui/client/src/license/license.controller.js b/awx/ui/client/src/license/license.controller.js index 27a826a50f..0a0eeaeb92 100644 --- a/awx/ui/client/src/license/license.controller.js +++ b/awx/ui/client/src/license/license.controller.js @@ -65,7 +65,8 @@ export default }; var calcDaysRemaining = function(seconds){ // calculate the number of days remaining on the license - var duration = moment.duration(seconds, 'seconds').days(); + var duration = moment.duration(seconds, 'seconds').asDays(); + duration = Math.floor(duration); duration = (duration!==1) ? `${duration} Days` : `${duration} Day`; return duration; };