view app/lib/Helpers.js @ 402:60a2812568cb

Fixed converting dates from timestamp to date object to allow empty(NULL) values.
author Raimund Renkert <rrenkert@intevation.de>
date Fri, 06 Sep 2013 12:53:19 +0200
parents 1e1ee8abf91b
children debfcc7713e3
line wrap: on
line source
/**
 * Helper class
 * This class provides some globally used functions.
*/
Ext.define('Lada.lib.Helpers', {
    statics: {
        /**
         * Function to translate a timestamp into a date
         */
        ts2date: function(v, record){
            // Converts a timestamp into a date object.
            if (v === null || v === undefined) {
                return v;
            }
            return new Date(v);
        }
    }
})

http://lada.wald.intevation.org