Thread
:
Add ST/ND/RD/TH to DAY in DATE
View Single Post
11-25-2003, 10:47 PM
PM User
|
#
19
jsWalter
New Coder
Join Date: Nov 2003
Location: Chicago, IL
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
no, but this does!
function num_abbrev_str(n)
{
i = n % 100;
return n + (( Math.floor(i/10) == 1) ? "th" : ["th", "st", "nd", "rd", "th", "th", "th", "th", "th", "th"][i%10]);
}
jsWalter
jsWalter
View Public Profile
Visit jsWalter's homepage!
Find More Posts by jsWalter