Thread
:
Add ST/ND/RD/TH to DAY in DATE
View Single Post
10-13-2012, 02:55 AM
PM User
|
#
44
AndrewGSW
Senior Coder
Join Date: Apr 2011
Location: London, England
Posts: 2,120
Thanks: 15
Thanked 354 Times in 353 Posts
I suppose..
Code:
var XX = "thstndrd".substr((D % 10) * (D % 100 < 11 || D % 100 > 13) * 2, 2) || "th";
but my interest was really in working with days (from the OP title).
__________________
"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
View Public Profile
Find More Posts by AndrewGSW