[jira] [Closed] (OFBIZ-7562) Enforce noninstantiability to UtilDateTime class

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Closed] (OFBIZ-7562) Enforce noninstantiability to UtilDateTime class

Nicolas Malin (Jira)

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

Arun Patidar closed OFBIZ-7562.
-------------------------------
       Resolution: Fixed
    Fix Version/s: Upcoming Branch

Committed changes in trunk at rev: 1751028.

Thanks [~rishisolankii] and [~rohit.koushal] for your contribution.

> Enforce noninstantiability to UtilDateTime class
> ------------------------------------------------
>
>                 Key: OFBIZ-7562
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-7562
>             Project: OFBiz
>          Issue Type: Sub-task
>          Components: framework
>    Affects Versions: Trunk
>            Reporter: Rishi Solanki
>            Assignee: Arun Patidar
>            Priority: Minor
>             Fix For: Upcoming Branch
>
>         Attachments: OFBIZ-7562.patch
>
>
> - Make class as final.
> - Add a private constructor.
> - Make the following public static variables as private
> {code}
>     public static final String[] months = {
>         "January", "February", "March", "April", "May", "June",
>         "July", "August", "September", "October", "November",
>         "December"
>     };
>     public static final String[] days = {
>         "Monday", "Tuesday", "Wednesday",
>         "Thursday", "Friday", "Saturday", "Sunday"
>     };
>     public static final String[][] timevals = {
>         {"1000", "millisecond"},
>         {"60", "second"},
>         {"60", "minute"},
>         {"24", "hour"},
>         {"168", "week"}
>     };
>     public static final DecimalFormat df = new DecimalFormat("0.00;-0.00");
>     public static final String DATE_FORMAT = "yyyy-MM-dd";
>     public static final String DATE_TIME_FORMAT = "yyyy-MM-dd HH:mm:ss.SSS";
>     public static final String TIME_FORMAT = "HH:mm:ss";
> {code}
> - Add public static methods as getDateFormat(), getDateTimeFormat() and getTimeFormat() methods and use them in following classes;
> {code}
>     DateTimeConverters.java
>     UelFunctions.java
>     CommonWidgetModels.java
>     ModelFormField.java
>     SetCalendar.java
>     EbayStoreAutoPreferences.java
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)