Skip to main content
Known Participant
March 24, 2008
Question

Ordering by date in a hash array

  • March 24, 2008
  • 1 reply
  • 642 views
Hello,
I'm trying to find a solution for ordering a hash array by dates.

The dates are coming from a feed and are in this form:

Wed, 01 Nov 2006 13:52:46 GM

Does anyone know of any flash date extensions that can use timestamps?

Thanks,
Clem C
This topic has been closed for replies.

1 reply

March 25, 2008
I don't know of any extension but you can do it yourself easily enough.
March 25, 2008
BTW, this doesn't do anything with time zone. If you have something other than GMT, you will need one more manipulation.
Known Participant
March 25, 2008
It's strange when I change some dates around to this:

dates = ["Thu, 14 Feb 2008 22:48:00 GM", "Fri, 07 Mar 2008 13:08:54 GM","Sat, 11 Oct 2004 09:13:07 GM","Mon, 21 Jan 2008 17:26:33 GM", "Sat, 09 Oct 2004 07:13:09 GM", "Sat, 11 Oct 2004 07:12:07 GM"];

I'm getting this output:
Sat, 09 Oct 2004 07:13:09 GM
Sat, 11 Oct 2004 07:12:07 GM
Sat, 11 Oct 2004 09:13:07 GM
Fri, 07 Mar 2008 13:08:54 GM
Thu, 14 Feb 2008 22:48:00 GM
Mon, 21 Jan 2008 17:26:33 GM

March, February, and January aren't getting sorted correctly.