function TDateObject(objName){
	this.objName	= objName;
	this.years		= new Array();
}

TDateObject.prototype.getDay = function(year, month, day){
	var _year	= this.getYear(year);
	if(_year == null)	return null;

	var _month	= _year.getMonth(month);
	if(_month == null)	return null;

	var _day	= _month.getDay(day);
	if(_day == null)	return null

	return _day;
}

TDateObject.prototype.getDays = function(year, month){
	var _year	= this.getYear(year);
	if(_year == null)	return null;

	var _month	= _year.getMonth(month);
	if(_month == null)	return null;

	return _month.days;
}

TDateObject.prototype.setDate = function(year, month, day){
	var _year	= this.setYear(year);
	var _month	= _year.setMonth(month);
	var _day	= _month.setDay(day);

	return _day;
}


TDateObject.prototype.getYear = function(year){
	for(var i=0; i<this.years.length; i++){
		if(this.years[i].year == year){
			return this.years[i];
		}
	}

	return null;
}

TDateObject.prototype.setYear = function(year){
	var _year	= null;
	
	_year = this.getYear(year);

	if(_year == null){
		_year = new TYear(year);
		this.years.push(_year);
	}

	return _year;
}

function TYear(year){
	this.year	= year;
	this.months	= new Array();
}

TYear.prototype.getMonth = function(month){
	for(var i=0; i<this.months.length; i++){
		if(this.months[i].month == month){
			return this.months[i];
		}
	}

	return null;
}

TYear.prototype.setMonth = function(month){
	var _month	= null;

	_month = this.getMonth(month);

	if(_month == null){
		_month = new TMonth(month);
		this.months.push(_month);
	}

	return _month;
}

function TMonth(month){
	this.month	= month;
	this.days	= new Array();
}

TMonth.prototype.getDay = function(day){
	for(var i=0; i<this.days.length; i++){
		if(this.days[i].day == day){
			return this.days[i];
		}
	}

	return null;
}

TMonth.prototype.setDay = function(day){
	var _day	= null;
	
	_day = this.getDay(day);

	if(_day == null){
		_day = new TDay(day);
		this.days.push(_day);
	}

	return _day;
}

function TDay(day){
	this.day		= day;
	this.hour		= -1;
	this.minute		= -1;
	this.property	= "";
	this.descript	= "";
}
