//-----------------------------------------------------------------------------------------------------------
/* JSRegularExp constructor */
function JSRegularExp(){
	this.date_pattern			= /^(19[789]|2\d{2})\d-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])$/;
	this.time_pattern			= /^([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$/;
	this.datetime_pattern	= /^(19[789]|2\d{2})\d-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])( )([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$/;
	this.timestamp_pattern	= /^(0|[123456789]\d*)$/;
}
/* set prototype */
JSRegularExpPrototype = JSRegularExp.prototype;
//-----------------------------------------------------------------------------------------------------------
JSRegularExpPrototype.isDate = function(value) {
	return (String(value).search(this.date_pattern) != -1);
}

JSRegularExpPrototype.isDateTime = function(value) {
	return (String(value).search(this.datetime_pattern) != -1);
}

JSRegularExpPrototype.isTime = function(value) {
	return (String(value).search(this.time_pattern) != -1);
}

JSRegularExpPrototype.isTimestamp = function(value) {
	return (String(value).search(this.timestamp_pattern) != -1);
}	
//-----------------------------------------------------------------------------------------------------------