month = new Array(12);
month[0] = "Jan";
month[1] = "Feb";
month[2] = "Mar";
month[3] = "Apr";
month[4] = "May";
month[5] = "Jun";
month[6] = "Jul";
month[7] = "Aug";
month[8] = "Sep";
month[9] = "Oct";
month[10] = "Nov";
month[11] = "Dec";
	
now = new Date();
dd = Right("0" + now.getDate(),2);
mm = now.getMonth();
yy = now.getYear();

if ( yy < 2000 ) {
	yy = yy + 1900;
}
// if ( yy > 2000) {
// 	yy = yy - 2000;
// } else if ( yy < 2000 ) {
// 	yy = yy - 100;
// }

mmm = month[mm];
document.write(dd + "-" + mmm + "-" + yy);


function Right(str, n){
    if (n <= 0)
       return "";
    else if (n > String(str).length)
       return str;
    else {
       var iLen = String(str).length;
       return String(str).substring(iLen, iLen - n);
    }
}
