Daniel Harfleet

Delivering user-centric applications on the Adobe Flash Platform using Flex and AIR

Translating Force.com Rest API Date to ActionScript Date

leave a comment »

Recently I have been calling the Force.com Rest API from ActionsScript in an AIR project. When translating my entity objects, I found the need to translate the date as it is represented in the Rest API, into an ActionScript date instance and vice versa.

The Rest API uses ISO 8601 Format.

Here is the code:

Convert from Rest API to ActionScript:


Convert from ActionScript to the Rest API:

The full code can be found here

and its unit test


Written by dharfleet

June 12, 2012 at 13:54

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: