// JavaScript File
// Date: 14/05/08
// dateimprover.js
// This file contains all the extensions to the native Object Date

Date.DAYNAMES = ['Domenica', 'Lunedì', 'Martedì', 'Mercoledì', 'Giovedì', 'Venerdì', 'Sabato'];
Date.MONTHNAMES = ['Gennaio', 'Febbraio', 'Marzo', 'Aprile', 'Maggio', 'Giugno', 'Luglio', 'Agosto', 'Settembre', 'Ottobre', 'Novembre', 'Dicembre'];
Date.prototype.DAYNAMES   = Date.DAYNAMES;
Date.prototype.MONTHNAMES = Date.MONTHNAMES;

Date.prototype.getFullDay = function()
{
	return this.DAYNAMES[this.getDay()];
}

Date.prototype.getAbbrDay = function()
{
	return this.DAYNAMES[this.getDay()].substring(0,3);
}

Date.prototype.getFullMonth = function()
{
	return this.MONTHNAMES[this.getMonth()];
}

Date.prototype.getAbbrMonth = function()
{
	return this.MONTHNAMES[this.getMonth()].substring(0,3);
}

Date.prototype.getTimeDay = function()
{
	return [this.getHours() + ':' + correctMinutes(this.getMinutes())];
}


function correctMinutes(input)
{
	if(input <= 9)
		return '0' + input;
	else
		return input;
}
