Fog Creek Software
Discussion Board




Knowledge Base
Documentation
Terry's Tips
Darren's Tips

Date Formatting - th rd and st.

Is there any way to get the dates in CityDesk to include the wordy-bit of month days:

12th
31st
3rd

I have started generating all my news using CityDesk, but it's a bit irritating to read the dates without these extra characters (for my english liking, anyway).

thanks.

Simon Steele
Tuesday, November 11, 2003

can't think of a way to do it in CD.  How about a little javascript?  I am guessing that the dates are created by citydesk using {$.filedDate $}?

Each place you need to append those bits add a variable {$.OrdinalEnding$}

have this variable contain javascript code that takes the number as an argument and returns the appropriate ending

Joel Goldstick
Tuesday, November 11, 2003

Thanks, that's a good idea. I'll try it.

Simon Steele
Wednesday, November 12, 2003

I'm not very proficient at javascript, so I thought this was something I could handle.  Feel free to copy, or likely improve!

http://columbuswebmakers.com/Workbench/TestOrdEnd.html

Joel Goldstick
Wednesday, November 12, 2003

*  Recent Topics

*  Fog Creek Home