myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cale Scholl (JIRA)" <...@myfaces.apache.org>
Subject [jira] Updated: (TRINIDAD-1344) fixed multiple issues with convertDateTime's handling of convenience patterns
Date Fri, 12 Dec 2008 19:25:44 GMT

     [ https://issues.apache.org/jira/browse/TRINIDAD-1344?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Cale Scholl updated TRINIDAD-1344:
----------------------------------

    Status: Patch Available  (was: Open)

> 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
>         Attachments: 1.2.10.1_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.


Mime
View raw message