Date Parse format, can’t get ordinal suffix


#1

I’m trying to get a date.parse to show May 4th.

I can get it to show May 4 but seems the “dS” is not working. Is there any way of doing it with date.js or would I need to create an if (eg if 1 = st, 2=nd, etc)?

Thanks!
Andre


#2

Doesn’t seem to work using the version of Date.js that Drafts has, for some reason. I just used a function to ordinalise a given number. You can find them readily on StackOverflow.


#3

Thanks @mattgemmell! I’ve seen that function, but was wondering whether I was doing something wrong with datejs…