Return-Path: Delivered-To: apmail-myfaces-dev-archive@www.apache.org Received: (qmail 56570 invoked from network); 16 Dec 2008 20:43:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 16 Dec 2008 20:43:09 -0000 Received: (qmail 54433 invoked by uid 500); 16 Dec 2008 20:43:20 -0000 Delivered-To: apmail-myfaces-dev-archive@myfaces.apache.org Received: (qmail 54381 invoked by uid 500); 16 Dec 2008 20:43:19 -0000 Mailing-List: contact dev-help@myfaces.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "MyFaces Development" Delivered-To: mailing list dev@myfaces.apache.org Received: (qmail 54342 invoked by uid 99); 16 Dec 2008 20:43:19 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Dec 2008 12:43:19 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Dec 2008 20:43:04 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 5087A234C3F2 for ; Tue, 16 Dec 2008 12:42:44 -0800 (PST) Message-ID: <712403797.1229460164328.JavaMail.jira@brutus> Date: Tue, 16 Dec 2008 12:42:44 -0800 (PST) From: "Jeanne Waldman (JIRA)" To: dev@myfaces.apache.org Subject: [jira] Updated: (TRINIDAD-1344) fixed multiple issues with convertDateTime's handling of convenience patterns In-Reply-To: <13659517.1229109584814.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/TRINIDAD-1344?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jeanne Waldman updated TRINIDAD-1344: ------------------------------------- Resolution: Fixed Fix Version/s: 1.2.11-core 1.0.11-core Status: Resolved (was: Patch Available) will be fixed in the next branch - 1.*.11 > fixed multiple issues with convertDateTime's handling of convenience patterns > ------------------------------------------------------------------------------ > > Key: TRINIDAD-1344 > URL: https://issues.apache.org/jira/browse/TRINIDAD-1344 > Project: MyFaces Trinidad > Issue Type: Bug > Components: Components > Affects Versions: 1.2.10-core, 1.0.10-core > Reporter: Cale Scholl > Assignee: Jeanne Waldman > Fix For: 1.0.11-core, 1.2.11-core > > Attachments: 1.2.10.1_convPatterns.patch, trunk12_convPatterns.patch, trunk_convPatterns.patch > > > The provided 1.2.10.1_convPatterns.patch fixes multiple issues with convertDateTime's handling of convenience patterns; convenience patterns are patterns we try to match if the user input doesn't match the default date pattern. > Resolved issues are: > 1. order of convenience patterns is incorrect: 12-10-08 ==> October 12, 2008 > ["MMMM dd, yy", "dd-MMMM-yy", "MMMM/dd/yy"] > should be: > ["MMMM dd, yy", "MMMM/dd/yy", "dd-MMMM-yy"] > (at least for en_US locale, we want to first try matching patterns of order "month day year") > 2. convenience patterns left out of lenience patterns list on server > That is, the convenience patterns ["MMMM dd, yy", "dd-MMMM-yy", "MMMM/dd/yy"] do not show up in the lenience patterns list (only the lenient pattern variants show up). > i.e. "MMMM dd, yy" is not present, but "MMM dd, yy" and "MM dd, yy" are present. > 3. Furthermore, the final pattern list order was: > "MMMM dd, yy", "dd-MMMM-yy", "MMMM/dd/yy"... which is WRONG. The lenience patterns should be inserted after each corresponding convenience pattern. I.e. "MMMM dd, yy", "MMM dd, yy", "MM dd, yy"... This is because the lenience patterns for the default pattern should take precedence (and in general the convenience patterns should be ordered according to precedence). > I.e. Given convenience patterns ["MMMM dd, yy", "MMMM/dd/yy", "dd-MMMM-yy"], then on the server and client, the constructed list of patterns we check is: > "MMMM dd, yy" > "MMM dd, yy" > "MM dd, yy" > "MMMM/dd/yy" > "MMM/dd/yy" > "MM/dd/yy" > "MMMM-dd-yy" > "MMM-dd-yy" > "MM-dd-yy" > "MMMM.dd.yy" > "MMM.dd.yy" > "MM.dd.yy" > "dd-MMMM-yy" > "dd-MMM-yy" > "dd-MM-yy" > "dd/MMMM/yy" > "dd/MMM/yy" > "dd/MM/yy" > "dd.MMMM.yy" > "dd.MMM.yy" > "dd.MM.yy" > 4. There was no "locale"==>"convenience patterns" map on the client. > I added this map to the client, and added comments to both the client and server map stating that these maps MUST be equivalent to one another. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.