Category: AS2

PHP date in ActionScript

Written by Aaron Clinger on December 30th, 2008

When authoring CASA Lib we are often inspired by many other programming languages, frameworks and libraries. One of my favorite utilities in PHP is the date function. It is a great method for quickly formatting dates.

CASA Lib for AS2 and AS3 contain a DateUtil class. This class contains a formatDate method that acts almost identical to PHP’s date. The only change is that you use ^ to escape letters instead of \.

An example:

// Traces something like: "Tuesday the 30th of December 2008 10:24:13 AM"
trace(DateUtil.formatDate(new Date(), "l ^t^h^e dS ^of F Y h:i:s A"));

See DateUtil’s documentation for more information and options:

AS2 Release 1.5.0

Written by Aaron Clinger on December 3rd, 2008

After almost a year we have finally released an update to the AS2 version of CASA Lib. The biggest change is in the name. Going forward CASA Framework will be named CASA Lib. Other changes include minor additions to the API, updated documentation and a few bug fixes.

This release will most likely be the last improvement release for the AS2 branch. We will remain committed to fixing any bugs or documentation errors that may arise, but will be spending the majority of our efforts on the ActionScript 3.0 version of CASA Lib. We feel that CASA Lib ActionScript 2.0 is very mature and in a good solid place.

CASA Framework Renamed

Written by Aaron Clinger on December 3rd, 2008

CASA Framework has been renamed to CASA Lib. We feel that the new name better reflects the content of the code base.

It also saves on typing!