View Single Post
Old 10-10-2012, 10:38 PM   PM User | #40
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 % 14 > 9) * 2, 2) || "th";
I'm considering dates though (from the title of this post) so haven't gone beyond 31 Added: Yes, works beyond 31.
__________________
"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

Last edited by AndrewGSW; 10-11-2012 at 12:01 AM..
AndrewGSW is online now   Reply With Quote