Wednesday, August 05, 2009

JavaScript : Get current year


var today = new Date();
ThisYear = today.getYear()+0;
if(ThisYear <= 1999){
ThisYear = ThisYear - 100 + 2000;
}

No comments: