function formatDate(date) { var myyear = date.getFullYear(); var mymonth = date.getMonth()+1; var mywee