DateClass = Class.create();

DateClass.prototype = {

	initialize: function () {
		this.setSemana();
		this.minutes = 1000*60
		this.hours = this.minutes*60
		this.days = this.hours*24
		this.years = this.days*365
		this.d = new Date()
		this.t = this.d.getTime()
		this.y = this.t/this.years
//		alert("It's been: " + this.y + " years since 1970/01/01!");
	},
	
	dateFormater: function (unixTime){
		
		unixTime = unixTime * 1000;
		data = new Date(unixTime);
		
		var day = data.getDate();
		day = parseInt(day);
		day = day + 1;
		
		var month = data.getMonth(); 
		month = parseInt(month); 
		month+=1;
		
		var year = data.getFullYear(); 
		year = parseInt(year);
		var fulldate = day+"."+month+"."+year;
		return fulldate; 
	},

	setMes: function () {
		this.week			=new Array(12);
		this.week[0]		="Janeiro";
		this.week[1]		="Fevereiro";
		this.week[2]		="Março";
		this.week[3]		="Abril";
		this.week[4]		="Maio";
		this.week[5]		="Junho";
		this.week[6]		="Julho";
		this.week[7]		="Agosto";
		this.week[8]		="Setembro";
		this.week[9]		="Outubro";
		this.week[10]		="Novembro";
		this.week[11]		="Dezembro";
	},

	setSemana: function () {
		this.week			=new Array(7);
		this.week[0]		="Domingo";
		this.week[1]		="Segunda";
		this.week[2]		="Terça-Feira";
		this.week[3]		="Quarta-Feira";
		this.week[4]		="Quinta-Feira";
		this.week[5]		="Sexta-Feira";
		this.week[6]		="Sábado";
	},

	getSemana: function (index) {
		return week[index];
	},

	getMiniSemana: function (index) {
		return week[index].split("-")[0];
	},

	getData: function () {
		alert(getTime())
	}
};

flipDate = new DateClass;

/*
data.getDay()
			}		
		return mesExt;
	},

	getSemana : function (dia) {
			data = new Date;
			switch((dia) ? dia : data.getDay()){		

		return diaExt;
	},

	getDataExt : function () {
		data = new Date;
		cron = new Cronometro;
		return data.getDate()+" de "+cron.getMes()+" de "+data.getFullYear();		
	},

	getData : function (sep) {
		data = new Date;
		a = data.getYear();
		b = a.toString();
		ano = b.substring(2);
		if(sep)
			return data.getDate()+sep+(data.getMonth() + 1)+sep+ano;
		else
			return data.getDate()+"/"+(data.getMonth() + 1)+"/"+ano;
	},
*/

