Flex DateFormatter bug, missing January 1970 month name

Today, while working on a small piece of code I discovered something that appears to be a DateFormatter bug. I was using following DateFormatter:

[sourcecode lang='as3']
private var formatter:DateFormatter = new DateFormatter();
...
 formatter.formatString = "MMMM";
[/sourcecode]

to display just the month names. I didn’t really care about the year when constructing new Date so I thought I would pick 1970. It appears that for January 1970 the DateFormatter returns an empty string while for 1969, 1971 and any other dates it works fine. Here is the demo.

[SWF]/wp-content/uploads/2009/06/DateFormatterBug.swf, 450, 300[/SWF]

And the source code below.

[sourcecode lang='as3']



 
  

 
  
  
  
 

 


[/sourcecode]

It appears that the bug was logged quite a few times, just one of the tickets I’ve found: https://bugs.adobe.com/jira/browse/SDK-14528. It also appears that it won’t be fixed. According to the comments under the linked story DateFormatter class is not an Adobe code. Interesting…

2 Responses to “Flex DateFormatter bug, missing January 1970 month name”

  1. Gregor Kiddie Says:

    The DateFormatter bug was fixed in the SDK 3.4 release recently.

  2. radekg Says:

    Good to know, thanks for info Gregor!

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>