Formatting dates in Actionscript

by Daniel Wabyick
Wednesday, October 5th, 2005

As anyone with any programming experience can tell you, formatting and unformatting Date objects into human readable strings can be a repetitive and tedious task, as well as a perfect target for a utility class!

These utility classes exist in the core package of most programming languages, but alas, not Actionscript. Luckily, Matt Kruse at JavaScript Toolbox created a simplified Javascript library based on Java’s elegant SimpleDateFormat class. As Javascript and Actionscript are syntactically compatible, porting this to Actionscript was very straightforward. Check out SimpleDateFormatter, hosted on the osflash website.

Comments are closed.