Home

Follow Skinkers.

Recieve all the updates from Skinkers via email:

 

Posts Tagged ‘DateFormatter’

1

Extending DateFormatter to add 'st', 'nd', 'rd', 'th' Support.

October 14th, 2009 | AS3, Flex | David Spanton

I recently found myself with the task of configuring a date format for a new client.  The format that was specced looked something like:

Wednesday 14th October, 13:33

It was at this point I realised there is no support for the ‘th’ (or ‘st’, ‘nd’, ‘rd’) part of a date in the Flex DateFormatter.

Rather than mess around with the string after it had been formatted, I had a poke around the DateFormatter’s source code and decided to write an extended date formatter which added support for date suffixes.
Read the rest of this entry »