Also you can replace
with
to get 1st, 2nd, 3rd type days.
Code:
document.write(' ' + myDate.getDate() + ' ');
Code:
var dayofmonth = myDate.getDate();
var datesuffix = 'th';
if ( (dayofmonth < 10) || (dayofmonth > 20) ) suffix = ['th','st','nd','rd'][dayofmonth % 10];
document.write(' ' + dayofmonth + suffix + ' ');
I knew it had to be that line but I didn't know where to start to fix it
Your help is much appreciated. KR D
Comment