Adobe Dreamweaver Forums



Last 10 THreads :         Browser (Last Post : michel_v - Replies : 1 - Views : 2 )           »          certificate (Last Post : jkhgdkhgslkj - Replies : 2 - Views : 3 )           »          Flex with JSP (Last Post : JB2622 - Replies : 5 - Views : 6 )           »          Is there a way to extract a subset of an arraycollection (Last Post : Amy Blankenship - Replies : 4 - Views : 5 )           »          Getting Tree Item Editor to show on an Event other thanitemClick (Last Post : ericbelair - Replies : 2 - Views : 7 )           »          mxmlc - "Unable to resolve resource bundle "rpc" forlocale "en_US" (Last Post : ugrowemweschickm - Replies : 2 - Views : 6 )           »          export hidden layers error (Last Post : gelon - Replies : 0 - Views : 1 )           »          Dynamic dropdown (Last Post : idesdema - Replies : 0 - Views : 1 )           »          Re: Dynamic dropdown (Last Post : Ian Skinner - Replies : 0 - Views : 1 )           »          perform action "on save"? (Last Post : AXEmonster - Replies : 1 - Views : 6 )           »         


Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
User Info Statistics
Go Back   Adobe Dreamweaver Forums > Other Macromedia/Adobe Products > Flex
 
Tags:

Reply
  #1 (permalink)  
Old 07-24-2008, 05:59 PM
Jihaes
 
Posts: n/a
Diggs:
Default Different date format

I wasnt able to find a whole lot of discussions on different date format.
Is there a built in function that can read date format by locale setting?
There are dates that are formatted like
"YYYY-MM-DD", "DD-MM-YYYY" and it seems like these with "-" aren't liked by
parseFunction.

Would I just have to figure out what locale system setting is and try to
figure out the format to parse it in the "/" format?

Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-24-2008, 07:03 PM
Jihaes
 
Posts: n/a
Diggs:
Default Re: Different date format

var formatterateFormatter = new DateFormatter();
formatter.formatString = "MM/DD/YYYY";
dateinString = formatter.format("2008-7-10");

This seem to work great.
But what happens with locale settings where it's DD-MM-YYYY
will it recognize if it is 10-12-2008 (will it know it's 10 for day and 12 for
month?)

just curious

Reply With Quote
  #3 (permalink)  
Old 07-24-2008, 07:03 PM
Greg Lafrance
 
Posts: n/a
Diggs:
Default Re: Different date format

If I am not mistaken, when you develop your app you need to know the format of
any data that will be accessed, and then brought into the application UI.

Then in your UI code you can use the formatters to format the data based on
the current locale.

If you cannot reliably know the meaning of the data accessed by the app
"MM/DD/YYYY" or "DD/MM/YYYY", then you cannot hope to reliably display it
accurately in various locales in the UI.

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 03:04 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Inactive Reminders By Mished.co.uk