You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@click.apache.org by "Andrey Rybin (JIRA)" <ji...@apache.org> on 2010/01/17 11:59:54 UTC
[jira] Created: (CLK-610) DateField formatPattern should not be
static string, but static variable
DateField formatPattern should not be static string, but static variable
------------------------------------------------------------------------
Key: CLK-610
URL: https://issues.apache.org/jira/browse/CLK-610
Project: Click
Issue Type: Improvement
Reporter: Andrey Rybin
DateField constructors contain this code:
super(...);
...
setFormatPattern("dd MMM yyyy");
(yes, same code 3 times ;-)
I suggest to replace it with this:
public static String defaultFormatPattern = "dd MMM yyyy";
super(...);
...
setFormatPattern(defaultFormatPattern);
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (CLK-610) DateField formatPattern should not be
static string, but static variable
Posted by "Bob Schellink (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CLK-610?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bob Schellink updated CLK-610:
------------------------------
Fix Version/s: (was: 2.1.0)
2.2.0
> DateField formatPattern should not be static string, but static variable
> ------------------------------------------------------------------------
>
> Key: CLK-610
> URL: https://issues.apache.org/jira/browse/CLK-610
> Project: Click
> Issue Type: Improvement
> Reporter: Andrey Rybin
> Fix For: 2.2.0
>
>
> DateField constructors contain this code:
> super(...);
> ...
> setFormatPattern("dd MMM yyyy");
> (yes, same code 3 times ;-)
> I suggest to replace it with this:
> public static String defaultFormatPattern = "dd MMM yyyy";
> super(...);
> ...
> setFormatPattern(defaultFormatPattern);
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Reopened: (CLK-610) DateField formatPattern should not be
static string, but static variable
Posted by "Malcolm Edgar (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CLK-610?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Malcolm Edgar reopened CLK-610:
-------------------------------
Assignee: (was: Bob Schellink)
> DateField formatPattern should not be static string, but static variable
> ------------------------------------------------------------------------
>
> Key: CLK-610
> URL: https://issues.apache.org/jira/browse/CLK-610
> Project: Click
> Issue Type: Improvement
> Reporter: Andrey Rybin
> Fix For: 2.1.0
>
>
> DateField constructors contain this code:
> super(...);
> ...
> setFormatPattern("dd MMM yyyy");
> (yes, same code 3 times ;-)
> I suggest to replace it with this:
> public static String defaultFormatPattern = "dd MMM yyyy";
> super(...);
> ...
> setFormatPattern(defaultFormatPattern);
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CLK-610) DateField formatPattern should not be
static string, but static variable
Posted by "Malcolm Edgar (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CLK-610?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12801751#action_12801751 ]
Malcolm Edgar commented on CLK-610:
-----------------------------------
While this is an improvement over the previous version which had a magic string value, the default value should probably be loaded from a DateField.properties file, as format patterns are local specific.
regards Malcolm Edgar
> DateField formatPattern should not be static string, but static variable
> ------------------------------------------------------------------------
>
> Key: CLK-610
> URL: https://issues.apache.org/jira/browse/CLK-610
> Project: Click
> Issue Type: Improvement
> Reporter: Andrey Rybin
> Assignee: Bob Schellink
> Fix For: 2.1.0
>
>
> DateField constructors contain this code:
> super(...);
> ...
> setFormatPattern("dd MMM yyyy");
> (yes, same code 3 times ;-)
> I suggest to replace it with this:
> public static String defaultFormatPattern = "dd MMM yyyy";
> super(...);
> ...
> setFormatPattern(defaultFormatPattern);
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (CLK-610) DateField formatPattern should not be
static string, but static variable
Posted by "Bob Schellink (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CLK-610?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bob Schellink resolved CLK-610.
-------------------------------
Resolution: Fixed
Fix Version/s: 2.1.0
Assignee: Bob Schellink
Fixed in trunk.
> DateField formatPattern should not be static string, but static variable
> ------------------------------------------------------------------------
>
> Key: CLK-610
> URL: https://issues.apache.org/jira/browse/CLK-610
> Project: Click
> Issue Type: Improvement
> Reporter: Andrey Rybin
> Assignee: Bob Schellink
> Fix For: 2.1.0
>
>
> DateField constructors contain this code:
> super(...);
> ...
> setFormatPattern("dd MMM yyyy");
> (yes, same code 3 times ;-)
> I suggest to replace it with this:
> public static String defaultFormatPattern = "dd MMM yyyy";
> super(...);
> ...
> setFormatPattern(defaultFormatPattern);
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CLK-610) DateField formatPattern should not be
static string, but static variable
Posted by "Andrey Rybin (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CLK-610?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12801769#action_12801769 ]
Andrey Rybin commented on CLK-610:
----------------------------------
Standard Java has similar feature:
http://java.sun.com/javase/7/docs/api/java/text/DateFormat.html
http://java.sun.com/docs/books/tutorial/i18n/format/dateFormat.html
but I can't find how to extract String pattern from DateFormat object,
but my research wasn't long!
Just don't forget: date format is a matrix:
one axis: language/country
other: format ;-) SHORT-to-FULL and date, time or date&time
> DateField formatPattern should not be static string, but static variable
> ------------------------------------------------------------------------
>
> Key: CLK-610
> URL: https://issues.apache.org/jira/browse/CLK-610
> Project: Click
> Issue Type: Improvement
> Reporter: Andrey Rybin
> Fix For: 2.1.0
>
>
> DateField constructors contain this code:
> super(...);
> ...
> setFormatPattern("dd MMM yyyy");
> (yes, same code 3 times ;-)
> I suggest to replace it with this:
> public static String defaultFormatPattern = "dd MMM yyyy";
> super(...);
> ...
> setFormatPattern(defaultFormatPattern);
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.