1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-02 09:51:09 +03:00

Display correct time remaining on license page

This commit is contained in:
Shane McDonald 2016-05-10 16:13:47 -04:00
parent 9dcdad9923
commit 8aa7c604a4

View File

@ -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;
};