add format_expire() utility method

This commit is contained in:
Dietmar Maurer 2017-03-27 09:43:02 +02:00
parent c9441d5f32
commit 2d0153a5ad

View File

@ -79,6 +79,13 @@ Ext.define('Proxmox.Utils', { utilities: {
return value ? Proxmox.Utils.enabledText : Proxmox.Utils.disabledText;
},
format_expire: function(date) {
if (!date) {
return Proxmox.Utils.neverText;
}
return Ext.Date.format(date, "Y-m-d");
},
compute_min_label_width: function(text, width) {
if (width === undefined) { width = 100; }