 
function formatDate(dateObject){
  month = dateObject.getMonth() + 1;
  return dateObject.getFullYear() + "-"
	+ month + "-"
	+ dateObject.getDate() + " ";
}

function createDate(strDate){
    arrStrDate = strDate.split("-");
    strYear=arrStrDate[0];
    strMonth=arrStrDate[1];
    strDay=arrStrDate[2];
    strDate=strYear+"/"+strMonth+"/"+strDay;
    return new Date(strDate);
}

function getAfterDate(date, number){
    MILLSECS = 60 * 60 * 1000 * 24 * number;
    dateMilliseconds = date.getTime();
    return new Date(dateMilliseconds + MILLSECS);
}