]> git.proxmox.com Git - proxmox-widget-toolkit.git/commitdiff
add format_expire() utility method
authorDietmar Maurer <dietmar@proxmox.com>
Mon, 27 Mar 2017 07:43:02 +0000 (09:43 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Mon, 27 Mar 2017 09:04:46 +0000 (11:04 +0200)
Utils.js

index 1aff39f64f33fde078a62c8463fea8cfee5b6888..de6e305278dcbe8e0a600c42817c19ec313a5f6d 100644 (file)
--- a/Utils.js
+++ b/Utils.js
@@ -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; }