View Single Post
Old 11-25-2003, 10:23 PM   PM User | #16
RoyW
Regular Coder

 
Join Date: Jun 2002
Location: Atlanta, GA.
Posts: 313
Thanks: 0
Thanked 0 Times in 0 Posts
RoyW is an unknown quantity at this point
Code:
function num_abbrev_str(n)
{
 return n + (( Math.floor(n/10) == 1) ? "th" : ["th", "st", "nd", "rd", "th", "th", "th", "th", "th", "th"][n%10]);
}
RoyW is offline   Reply With Quote