Ext.ns('Nexts.data');

Nexts.data.JavaDateConvert = function(jd) {
	var c = null;
	
	if (jd) {
		if (Ext.isDate(jd)) {
			return jd;
		}
		
		switch (typeof(jd)) {
		case 'number':
			c = new Date(jd);
			break;
		case 'string':
			c = Date.parseDate(jd, 'Y/m/d H:i:s');
			break;
		case 'object':
			if (jd.time) {
				c = new Date(jd.time);
			}
			else {
				c = new Date(jd.year, jd.month, jd.date, jd.hours, jd.minutes, jd.seconds);
			}
			break;
		}
	}
	return c;
};
