vendor/assets/elfinder_OLD/js/elfinder.full.js
function(format, date) {
		var self = this,
			output, d, dw, m, y, h, g, i, s;
		
		if (! date) {
			date = new Date();
		}
		
		h  = date[self.getHours]();
		g  = h > 12 ? h - 12 : h;
		i  = date[self.getMinutes]();
		s  = date[self.getSeconds]();
		d  = date[self.getDate]();
		dw = date[self.getDay]();
		m  = date[self.getMonth]() + 1;
		y  = date[self.getFullYear]();
		
		output = format.replace(/[a-z]/gi, function(val) {
			switch (val) {
				case 'd': return d > 9 ? d : '0'+d;
				case 'j': return d;
				case 'D': return self.i18n(self.i18.daysShort[dw]);
				case 'l': return self.i18n(self.i18.days[dw]);
				case 'm': return m > 9 ? m : '0'+m;
				case 'n': return m;
				case 'M': return self.i18n(self.i18.monthsShort[m-1]);
				case 'F': return self.i18n(self.i18.months[m-1]);
				case 'Y': return y;
				case 'y': return (''+y).substr(2);
				case 'H': return h > 9 ? h : '0'+h;
				case 'G': return h;
				case 'g': return g;
				case 'h': return g > 9 ? g : '0'+g;
				case 'a': return h >= 12 ? 'pm' : 'am';
				case 'A': return h >= 12 ? 'PM' : 'AM';
				case 'i': return i > 9 ? i : '0'+i;
				case 's': return s > 9 ? s : '0'+s;
			}
			return val;
		});
		
		return output;
	}
function(format, date) {
		var self = this,
			output, d, dw, m, y, h, g, i, s;
		
		if (! date) {
			date = new Date();
		}
		
		h  = date[self.getHours]();
		g  = h > 12 ? h - 12 : h;
		i  = date[self.getMinutes]();
		s  = date[self.getSeconds]();
		d  = date[self.getDate]();
		dw = date[self.getDay]();
		m  = date[self.getMonth]() + 1;
		y  = date[self.getFullYear]();
		
		output = format.replace(/[a-z]/gi, function(val) {
			switch (val) {
				case 'd': return d > 9 ? d : '0'+d;
				case 'j': return d;
				case 'D': return self.i18n(self.i18.daysShort[dw]);
				case 'l': return self.i18n(self.i18.days[dw]);
				case 'm': return m > 9 ? m : '0'+m;
				case 'n': return m;
				case 'M': return self.i18n(self.i18.monthsShort[m-1]);
				case 'F': return self.i18n(self.i18.months[m-1]);
				case 'Y': return y;
				case 'y': return (''+y).substr(2);
				case 'H': return h > 9 ? h : '0'+h;
				case 'G': return h;
				case 'g': return g;
				case 'h': return g > 9 ? g : '0'+g;
				case 'a': return h >= 12 ? 'pm' : 'am';
				case 'A': return h >= 12 ? 'PM' : 'AM';
				case 'i': return i > 9 ? i : '0'+i;
				case 's': return s > 9 ? s : '0'+s;
			}
			return val;
		});
		
		return output;
	}
function ( format , date ) { var self = this , output , d , dw , m , y , h , g , i , s ; if ( ! date ) { date = new Date ( ) ; } h = date [ self . getHours ] ( ) ; g = h > 12 ? h - 12 : h ; i = date [ self . getMinutes ] ( ) ; s = date [ self . getSeconds ] ( ) ; d = date [ self . getDate ] ( ) ; dw = date [ self . getDay ] ( ) ; m = date [ self . getMonth ] ( ) + 1 ; y = date [ self . getFullYear ] ( ) ; output = format . replace ( / [a-z] / gi , function ( val ) { switch ( val ) { case 'd' : return d > 9 ? d : '0' + d ; case 'j' : return d ; case 'D' : return self . i18n ( self . i18 . daysShort [ dw ] ) ; case 'l' : return self . i18n ( self . i18 . days [ dw ] ) ; case 'm' : return m > 9 ? m : '0' + m ; case 'n' : return m ; case 'M' : return self . i18n ( self . i18 . monthsShort [ m - 1 ] ) ; case 'F' : return self . i18n ( self . i18 . months [ m - 1 ] ) ; case 'Y' : return y ; case 'y' : return ( '' + y ) . substr ( 2 ) ; case 'H' : return h > 9 ? h : '0' + h ; case 'G' : return h ; case 'g' : return g ; case 'h' : return g > 9 ? g : '0' + g ; case 'a' : return h >= 12 ? 'pm' : 'am' ; case 'A' : return h >= 12 ? 'PM' : 'AM' ; case 'i' : return i > 9 ? i : '0' + i ; case 's' : return s > 9 ? s : '0' + s ; } return val ; } ) ; return output ; }
Returns a date string formatted according to the given format string

@param  String  format string
@param  Object  Date object
@return String
Returns a date string formatted according to the given format string