mikechambers / as3corelib

An ActionScript 3 Library that contains a number of classes and utilities for working with ActionScript? 3. These include classes for MD5 and SHA 1 hashing, Image encoders, and JSON serialization as well as general String, Number and Date APIs.
1.5k stars 451 forks source link

French locale parseRFC822 #163

Open astronaute77 opened 13 years ago

astronaute77 commented 13 years ago

If locale is set to "fr_FR" parseRFC822 fails.

For exemple :

trace(DateUtil.parseRFC822("Mon, 02 May 2011 08:53:37 +0200"));

outputs:

"Thu Dec 2 07:53:37 GMT+0100 2010"

astronaute77 commented 13 years ago

I think the problem is in DateUtil.getShortMonthIndex, it is locale dependent so it fails if non english locale is set. Maybe it shouldn't be local dependent as it is intended for loading RSS feeds where the date is always in english ?

I created a fork where the locale is ignored (always english) for DateUtil.getShortMonthIndex if that can help someone: https://github.com/astronaute/as3corelib