Date.prototype.getFullDate = function(){
	return this.getDate().toPaddedString(2);
};
Date.prototype.getFullMonth = function(){
	return (1 + this.getMonth()).toPaddedString(2);
};
Date.prototype.isLeapYear = function(){
	var year = this.getFullYear();
	return ((year % 4 === 0 && year % 100 !== 0) || year % 400 === 0);
};
Date.prototype.getDayInMonth = function(){
	var feb = (this.isLeapYear() ? 29 : 28);
	var days = [31, feb, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
	return days[this.getMonth()];
};
Date.prototype.setNextYear = function(){
	this.setFullYear(1 + this.getFullYear());
};
Date.prototype.setNextMonth = function(){
	if(this.getMonth() >= 11){
		this.setFullYear(1 + this.getFullYear());
		this.setMonth(0);
	}else{
		this.setMonth(this.getMonth()+1);
	}
};
Date.prototype.setNextDay = function(){
	if(this.getDate() >= this.getDayInMonth()){
		if(this.getMonth() >= 11){
			this.setFullYear(1 + this.getFullYear());
			this.setMonth(0);
		}else{
			this.setMonth(1 + this.getMonth());
		}
		this.setDate(0);
	}else{
		this.setDate(- + this.date());
	}
};
Date.prototype.setPreviousYear = function(){
	if(this.getFullYear() > 0){
		this.setFullYear(-1 + this.getFullYear());
	}
};
Date.prototype.setPreviousMonth = function(){
	if(this.getMonth() <= 0){
		this.setFullYear(-1 + this.getFullYear());
		this.setMonth(11);
	}else{
		this.setMonth(-1 + this.getMonth());
	}
};
Date.prototype.setPreviousDay = function(){
	if(this.getDate() <= 0){
		this.setPreviousMonth();
		var day = this.getDayInMonth();
		this.setDate(day);
	}else{
		this.setDate(this.getDate() -1);
	}
};
Date.prototype.isValid = function(){
	if(this.getMonth() < 0 || this.getMonth() > 11){
		return false;
	}
	if(this.getDate() < 0 || this.getDate > this.getDayInMonth()){
		return false;
	}
	return this.getFullYear >= 0;
};
Date.prototype.now = function(){
	var now = new Date();
	this.setFullYear(now.getFullYear());
	this.setMonth(now.getMonth());
	this.setDate(now.getDate());
	this.setHours(
		now.getHours(),
		now.getMinutes(), 
		now.getSeconds(), 
		now.getMilliseconds()
	);
};