I just looked at DateField.stringToDate().

It looks like it only supports "M", "D" and "Y". That means it does not support 
weekdays or any time formatters.

I guess I'm going to have to roll my own function…

On Feb 1, 2014, at 8:10 PM, Christofer Dutz wrote:

> Hi Hemadri,
> 
> Thanks for that pointer. Seems to be what I've been looking for.
> 
> How about integrating this functionality into the DateFormat class ... for me 
> this seems to be the most natural place to have it?
> 
> Chris
> 
> -----UrsprĂĽngliche Nachricht-----
> Von: Hemadri Seelamsetty [mailto:[email protected]] 
> Gesendet: Samstag, 1. Februar 2014 17:49
> An: [email protected]
> Betreff: Re: Simple way to parse I18N dates?
> 
> Chris,
> 
> You can also use the static methods of mx.controls.DateField Class.
> 
> Below are the signatures of the static methods
> 
> DateField.dateToString(value:Date, outputFormat:String):String 
> DateField.stringToDate(valueString:String, inputFormat:String):Date
> 
> Example: var dob:Date = DateField.stringToDate("02/01/2014", "MM/DD/YYYY");
> 
> It can contain "M","D","Y", and delimiter and punctuation characters
> 
> 
> --
> Hemadri <http://hemadri.com>
> 
> 
> 
> On Sat, Feb 1, 2014 at 7:17 PM, Christofer Dutz
> <[email protected]>wrote:
> 
>> Hi,
>> 
>> I am currently sort of stuck with implementing some functionality.
>> 
>> I know I can use a DateFormatter to define a formatted string from a 
>> given date, but I couldn't actually find something for the other way around.
>> The Java equivalent usually has a "parse" and a "format" method 
>> allowing to read a date from a string and to return a date and a 
>> format to serialize a date to a desired output format. It seems the 
>> Flex version is missing the parse part ... What do I have to use for this?
>> 
>> Chris
>> 

Reply via email to