With the changes this function can now just be written as:
<pre>
    _getTimeDimension: function() {
        var timeDimension = undefined;

        Ext.each(this.dimensions, function(dimension) {
            if (dimension.name == 'time') {
                timeDimension = dimension;
            }
        });

        return timeDimension;
    }
</pre>