I have the following Javascript to display the date on a page, however I wanted to add in the "th", "st" and "rd" suffixes after each date number (ie. "6th").
Is there a way of doing this with the following code I currently have?
<script language="Javascript">
<!--
// Array of day names
var dayNames = new Array("You're working today? It's Sunday","Hello, it's Monday","Hello, it's Tuesday","Hello, it's Wednesday",
"Hello, it's Thursday","Hello, it's Friday","You're working today? It's Saturday");
// Array of month Names
var monthNames = new Array(
"January","February","March","April","May","June","July",
"August","September","October","November","December");
var now = new Date();
document.write (dayNames[now.getDay()] + ", " +
now.getDate() + " " +
monthNames[now.getMonth()] + " " +
now.getFullYear() + ".");
// -->
</script>
Thanks in advance