You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flex.apache.org by "Justin Mclean (JIRA)" <ji...@apache.org> on 2013/08/27 01:16:52 UTC

[jira] [Resolved] (FLEX-33658) Using the mx:DateFormatter in Actionscript no longer produces the same results

     [ https://issues.apache.org/jira/browse/FLEX-33658?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Justin Mclean resolved FLEX-33658.
----------------------------------

    Resolution: Not A Problem

Work around exists, if you still think there as issue here please ask for the issue to be reopened.
                
> Using the mx:DateFormatter in Actionscript no longer produces the same results
> ------------------------------------------------------------------------------
>
>                 Key: FLEX-33658
>                 URL: https://issues.apache.org/jira/browse/FLEX-33658
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: Advanced Data Grid
>    Affects Versions: Apache Flex 4.10.0
>            Reporter: William Page
>
> Here is the code…
> 			var j:int = 0;
> 			for (i=minNum;i<length;i++)  {   
> 				oColumnDef = new AdvancedDataGridColumn();
> 				oColumnDef.headerText = MonthDisplay(modelLocator.aryMonths.getItemAt(i).begDate);
> 				oColumnDef.dataField = "s"+[j+1];
> 				oColumnDef.width = 100;
> 				oColumnDef.labelFunction=dgCurFormat12
> 				oColumnDef.setStyle("textAlign","right")
> 				colArray.push(oColumnDef);
> 				j=j+1;
> 			}
> 			private function MonthDisplay(item:String):String{		
> 				var df:DateFormatter = new DateFormatter()
> 				df.formatString="MMM-YYYY";
> 				return df.format(item);  		
> 			}	
> aryMonths contains dates like these ('07/01/2013', '06/01/2013', '05/01/2013', '04/01/2013', '03/01/2013', etc)
> The header text ends up showing Jan-2013,  Jan-2013,  Jan-2013,  Jan-2013,  Jan-2013 etc)
> It seems that the DateFormatter is reading the date in reverse order Day-Month-Year when applying the format…Versus Month-Day-Year…Is there a way to resolve this without rewriting all my database scripts to reformat dates?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira