flex-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Justin Mclean (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (FLEX-33658) Using the mx:DateFormatter in Actionscript no longer produces the same results
Date Fri, 09 Aug 2013 05:53:47 GMT

    [ https://issues.apache.org/jira/browse/FLEX-33658?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13734423#comment-13734423
] 

Justin Mclean edited comment on FLEX-33658 at 8/9/13 5:52 AM:
--------------------------------------------------------------

Can you raise another JIRA for the millisecond issue - if it is a bug. Changing your code
to this seem to show no issue:

			private function monthDisplay(item:String):String
			{		
				var df:DateFormatter = new DateFormatter()
				df.formatString="EEEE, MMM. D, YYYY at L:NN A";
				return df.format(item);
			}
                
      was (Author: jmclean):
    Can you raise another JIRA for the millisecond issue - I think that is a bug.
                  
> 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

Mime
View raw message