Return-Path: X-Original-To: apmail-flex-commits-archive@www.apache.org Delivered-To: apmail-flex-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3840210876 for ; Tue, 15 Oct 2013 23:39:03 +0000 (UTC) Received: (qmail 42695 invoked by uid 500); 15 Oct 2013 23:39:02 -0000 Delivered-To: apmail-flex-commits-archive@flex.apache.org Received: (qmail 42621 invoked by uid 500); 15 Oct 2013 23:39:02 -0000 Mailing-List: contact commits-help@flex.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flex.apache.org Delivered-To: mailing list commits@flex.apache.org Received: (qmail 42389 invoked by uid 99); 15 Oct 2013 23:39:01 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Oct 2013 23:39:01 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id AB7558B56BE; Tue, 15 Oct 2013 23:39:01 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: jmclean@apache.org To: commits@flex.apache.org Date: Tue, 15 Oct 2013 23:39:06 -0000 Message-Id: In-Reply-To: <92480edfd57745ef970f6c101b0f02ca@git.apache.org> References: <92480edfd57745ef970f6c101b0f02ca@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [7/8] git commit: [flex-sdk] [refs/heads/release4.11.0] - FLEX-33823 fixed parsing of month strings in stringToDate FLEX-33823 fixed parsing of month strings in stringToDate Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/ba846c44 Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/ba846c44 Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/ba846c44 Branch: refs/heads/release4.11.0 Commit: ba846c4478d78f131387f9cc7561280c40ef963b Parents: c556895 Author: Justin Mclean Authored: Wed Oct 16 09:50:03 2013 +1100 Committer: Justin Mclean Committed: Wed Oct 16 09:50:03 2013 +1100 ---------------------------------------------------------------------- frameworks/projects/mx/src/mx/controls/DateField.as | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/ba846c44/frameworks/projects/mx/src/mx/controls/DateField.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/mx/src/mx/controls/DateField.as b/frameworks/projects/mx/src/mx/controls/DateField.as index 6318633..6d45041 100644 --- a/frameworks/projects/mx/src/mx/controls/DateField.as +++ b/frameworks/projects/mx/src/mx/controls/DateField.as @@ -475,10 +475,19 @@ public class DateField extends ComboBase if (valueString == null || inputFormat == null) return null; + var monthNames:Array = ResourceManager.getInstance() + .getStringArray("SharedResources", "monthNames"); + + var noMonths:int = monthNames.length; + for (var i:int = 0; i < noMonths; i++) { + valueString = valueString.replace(monthNames[i], (i+1).toString()); + valueString = valueString.replace(monthNames[i].substr(0,3), (i+1).toString()); + } + length = valueString.length; dateParts[part] = ""; - for (var i:int = 0; i < length; i++) + for (i = 0; i < length; i++) { dateChar = valueString.charAt(i);