View Single Post
Old 10-11-2012, 03:09 AM   PM User | #41
AndrewGSW
Senior Coder

 
Join Date: Apr 2011
Location: London, England
Posts: 2,120
Thanks: 15
Thanked 354 Times in 353 Posts
AndrewGSW will become famous soon enough
Code:
XX = "thstndrd".substr((D % 10) * (D < 11 || D > 13) * 2, 2) || "th";
.. works with non-date numbers.
__________________
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
Validate your HTML and CSS
AndrewGSW is offline   Reply With Quote