Script Categories

Date & Time >>> Proper Date.

This little script will help you return the "proper" day ending - August 1st, August 2nd, August 3rd, etc.

Add the below code to the <body> section of your page:

<script language="javascript" type="text/javascript">
/* Visit for full source code
and get more free JavaScript, CSS and DHTML scripts! */
<!-- Begin
d = new Array(
m = new Array(

today = new Date();
day = today.getDate();
year = today.getYear();

if (year < 2000)   
= year + 1900;

end = "th";
if (day==1 || day==21 || day==31) end="st";
if (day==2 || day==22) end="nd";
if (day==3 || day==23) end="rd";

document.write("<center><b>Last update:  ");
document.write(d[today.getDay()]+", "+m[today.getMonth()]+" ");
document.write(day+", " + year);
// End -->

JavaScript Editor Get Advanced
JavaScript and Ajax Editor,
Validator and Debugger!

1st JavaScript Editor.

Code was highlighted by 1st JavaScript Editor (The Best JavaScript Editor!).