//----------------------------------------------------------------------------------------------------------------
/**
* Formater is an abstract base class.
* The class implements all kinds of dataformations based on time and numbers and text. 
* @class
* @version 1.1
* @author Lasse Storgaard Jacobsen
* @constructor
*/
function Formater(){
}//Formater end


//Adds the functions to the class
Formater.prototype.get_date_formate = get_date_formate;






//----------------------------------------------------------------------------------------------------------------
/**
* This function takes a date as a string and convert it to a readable date string. The functions support the date-formats: [MM-dd-yyyy] , [yyyy MM-dd], [MM/dd/yyyy].
* The return datatype is a string and have allways the format: [dd.mm.yyyy]
* @param {Date} date_str The date as a common convertable date-string
* @returns {String} The date-string converted to a new date format
*/
function get_date_formate(date_str){
	var date_formate_str="";
	
	
		var u_date  = new Date(date_str);
		var u_day   = (u_date.getDate());
		var u_month = (u_date.getMonth())+1; 
		var u_year	= (u_date.getYear()); 
		if (u_day < 10){
			date_formate_str += "0";
		}//end if
		
		date_formate_str += u_day + ".";
		
		if (u_month < 10){
			date_formate_str += "0";
		}//end if
		
		date_formate_str += u_month + "." + u_year;
		
	
	return date_formate_str;
}//get_date_formate end


