Current Date Display:
var now = new Date();
var date = now.getDate();
if (date == 1 || date == 21 || date == 31)
$("#date").append(date + " <sup>st</sup> ");
else if (date == 2 || date == 22)
$("#date").append(date + " <sup>nd</sup> ");
else if (date == 23 || date == 3)
$("#date").append(date + " <sup>rd</sup> ");
else
$("#date").append(date + " <sup>th</sup> ");
var monthNames = ["January", "February", "March", "April", "May", "June",
"July", "August", "September", "Octber", "November", "December"];
/** Append this to the required Label*/
$("#__labelid_").append("" + monthNames[now.getMonth()]);
var now = new Date();
var date = now.getDate();
if (date == 1 || date == 21 || date == 31)
$("#date").append(date + " <sup>st</sup> ");
else if (date == 2 || date == 22)
$("#date").append(date + " <sup>nd</sup> ");
else if (date == 23 || date == 3)
$("#date").append(date + " <sup>rd</sup> ");
else
$("#date").append(date + " <sup>th</sup> ");
var monthNames = ["January", "February", "March", "April", "May", "June",
"July", "August", "September", "Octber", "November", "December"];
/** Append this to the required Label*/
$("#__labelid_").append("" + monthNames[now.getMonth()]);
No comments:
Post a Comment