Return-Path: X-Original-To: apmail-flex-users-archive@www.apache.org Delivered-To: apmail-flex-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C5A3410F68 for ; Sat, 1 Feb 2014 16:50:06 +0000 (UTC) Received: (qmail 81514 invoked by uid 500); 1 Feb 2014 16:50:06 -0000 Delivered-To: apmail-flex-users-archive@flex.apache.org Received: (qmail 81426 invoked by uid 500); 1 Feb 2014 16:50:06 -0000 Mailing-List: contact users-help@flex.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@flex.apache.org Delivered-To: mailing list users@flex.apache.org Received: (qmail 81418 invoked by uid 99); 1 Feb 2014 16:50:05 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 01 Feb 2014 16:50:05 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of hemadri.info@gmail.com designates 209.85.214.44 as permitted sender) Received: from [209.85.214.44] (HELO mail-bk0-f44.google.com) (209.85.214.44) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 01 Feb 2014 16:50:00 +0000 Received: by mail-bk0-f44.google.com with SMTP id mz12so2446320bkb.17 for ; Sat, 01 Feb 2014 08:49:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=CHo4umhHipPUUQMVYwhJdO0O78rBd/jLiqbmooEgw84=; b=mginGEnKHecvDtZqltzXcpTN9/VHaTu76lHOLsxDjv8YgiLtpqhLpVJJpJ1Lu6Sfze z73HDUaH56VQg+tk5ayfrTY7mEnqGRNqQOjUPtCoe/EqYuc+Du1vRH+sfC8cPlYtroci A4Z7ZIQ8BHWe4nK3fLZqltJl3SEmr1p9RJdP5KouvrTnCQ+HOAtGGuqxkrUAXlmCiw4C 4SGayCGhBmwoWkJqdivd0BnaiiqkIKjwQZa8OAHTwXiqNOyVwWzlOmICRHlP86lUfMXE asbjsHl56DKGgZC83mpu3MFUzkJEYWvWZOkaeW91UAg6PpS9pRO+CvuwIPUufQd76BXB EAxA== X-Received: by 10.204.229.204 with SMTP id jj12mr916385bkb.4.1391273379725; Sat, 01 Feb 2014 08:49:39 -0800 (PST) MIME-Version: 1.0 Received: by 10.205.104.135 with HTTP; Sat, 1 Feb 2014 08:49:19 -0800 (PST) In-Reply-To: References: From: Hemadri Seelamsetty Date: Sat, 1 Feb 2014 19:49:19 +0300 Message-ID: Subject: Re: Simple way to parse I18N dates? To: users@flex.apache.org Content-Type: multipart/alternative; boundary=485b395e72b795a9d004f15b139c X-Virus-Checked: Checked by ClamAV on apache.org --485b395e72b795a9d004f15b139c Content-Type: text/plain; charset=ISO-8859-1 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 On Sat, Feb 1, 2014 at 7:17 PM, Christofer Dutz 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 > --485b395e72b795a9d004f15b139c--