mirror of
https://github.com/ansible/awx.git
synced 2026-03-06 11:11:07 -03:30
Display correct time remaining on license page
This commit is contained in:
@@ -65,7 +65,8 @@ export default
|
|||||||
};
|
};
|
||||||
var calcDaysRemaining = function(seconds){
|
var calcDaysRemaining = function(seconds){
|
||||||
// calculate the number of days remaining on the license
|
// 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`;
|
duration = (duration!==1) ? `${duration} Days` : `${duration} Day`;
|
||||||
return duration;
|
return duration;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user