flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mark goldin <markzolo...@gmail.com>
Subject Re: British date doesn't look like the French one
Date Tue, 07 Nov 2017 10:49:45 GMT
Actually I found the problem. The legacy application has its own local
formater that needed to be updated. As always, debugging one thing helps to
find a problem in another. Thanks to you guys for all the help.

On Tue, Nov 7, 2017 at 3:54 AM mark goldin <markzolotoy@gmail.com> wrote:

> Your sample code is working fine when I am compiling it with compiler
> option - en_GB. However my application is still not working. I am trying
> trouble shooting it. Here is what I have. First of all, the app gets its
> resource file as a parameter that being injected when the app is starting.
> I have built en_GB resource file in FB using Builders/Local resources. I
> then copied en_GB_ResourceModule.swf into the application resources
> location. When I run the app rm.getString("SharedResources", "dateFormat")
> shows "DD/MM/YYYY". The date from your code: Date(2016, 6, 4, 13) is shown
> in the Debugger like this: Tue Nov 7 03:52:35 GMT-0600 2017. Is that
> correct?
>
> Thanks
>
> On Mon, Nov 6, 2017 at 5:32 PM Justin Mclean <justin@classsoftware.com>
> wrote:
>
>> Hi,
>>
>> Try this:
>> <?xml version="1.0" encoding="utf-8"?>
>> <mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
>>                            xmlns:s="library://ns.adobe.com/flex/spark"
>>                            xmlns:mx="library://ns.adobe.com/flex/mx"
>>                            layout="vertical"
>>                            initialize="init(event)">
>>         <fx:Script>
>>                 <![CDATA[
>>                         import mx.events.FlexEvent;
>>                         import mx.resources.IResourceManager;
>>                         import mx.resources.ResourceManager;
>>
>>                         [Bindable]
>>                         public var dateFormat:String;
>>                         [Bindable]
>>                         public var locale:String;
>>
>>                         protected function init(event:FlexEvent):void
>>                         {
>>                                 var rm:IResourceManager =
>> ResourceManager.getInstance();
>>                                 locale = rm.localeChain.toString();
>>                                 dateFormat =
>> rm.getString("SharedResources", "dateFormat");
>>                         }
>>
>>                 ]]>
>>         </fx:Script>
>>         <mx:DateField id="mydate" selectedDate="{new Date(2016, 6, 4,
>> 13)}"/>
>>         <mx:Label text="{locale}" />
>>                 <mx:Label text="{dateFormat}" />
>> </mx:Application>
>>
>> It should display “en_GB” and “DD/MM/YYYY” if you can compiled with the
>> en_GB locale.
>>
>> Thanks,
>> Justin
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message