[jira] Created: (LANG-632) provide a date2calendar convenience method

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (LANG-632) provide a date2calendar convenience method

ASF GitHub Bot (Jira)
provide a date2calendar convenience method
------------------------------------------

                 Key: LANG-632
                 URL: https://issues.apache.org/jira/browse/LANG-632
             Project: Commons Lang
          Issue Type: Improvement
          Components: lang.time.*
    Affects Versions: 2.5, 2.4, 2.3, 2.2, 2.1, 2.0, 1.0.1, 1.0, 3.0, 3.1, 2.x
            Reporter: Sebastian Dietrich
            Priority: Minor


please provide a date2calendar conversion convenience method like:

        public static Calendar date2Calendar(Date date) {
                Calendar date2Calendar = Calendar.getInstance();
                date2Calendar.setTime(date);
                return date2Calendar;
        }

This is especially useful in constructors where super() must be the first call, or whenever people want to reduce reoccurring code

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (LANG-632) provide a date2calendar convenience method

ASF GitHub Bot (Jira)

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

Henri Yandell updated LANG-632:
-------------------------------

    Affects Version/s:     (was: 2.1)
                           (was: 2.2)
                           (was: 2.0)
                           (was: 3.0)
                           (was: 1.0.1)
                           (was: 1.0)
                           (was: 2.3)
                           (was: 2.4)
                           (was: 3.1)
                           (was: 2.x)

> provide a date2calendar convenience method
> ------------------------------------------
>
>                 Key: LANG-632
>                 URL: https://issues.apache.org/jira/browse/LANG-632
>             Project: Commons Lang
>          Issue Type: Improvement
>          Components: lang.time.*
>    Affects Versions: 2.5
>            Reporter: Sebastian Dietrich
>            Priority: Minor
>
> please provide a date2calendar conversion convenience method like:
> public static Calendar date2Calendar(Date date) {
> Calendar date2Calendar = Calendar.getInstance();
> date2Calendar.setTime(date);
> return date2Calendar;
> }
> This is especially useful in constructors where super() must be the first call, or whenever people want to reduce reoccurring code

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Closed: (LANG-632) provide a date2calendar convenience method

ASF GitHub Bot (Jira)
In reply to this post by ASF GitHub Bot (Jira)

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

Henri Yandell closed LANG-632.
------------------------------

    Fix Version/s: 3.0
       Resolution: Fixed

Added. Thanks for the idea.

svn ci -m "Adding toCalendar method per LANG-632"
Sending        src/main/java/org/apache/commons/lang3/time/DateUtils.java
Sending        src/test/java/org/apache/commons/lang3/time/DateUtilsTest.java
Transmitting file data ..
Committed revision 963601.


> provide a date2calendar convenience method
> ------------------------------------------
>
>                 Key: LANG-632
>                 URL: https://issues.apache.org/jira/browse/LANG-632
>             Project: Commons Lang
>          Issue Type: Improvement
>          Components: lang.time.*
>    Affects Versions: 2.5
>            Reporter: Sebastian Dietrich
>            Priority: Minor
>             Fix For: 3.0
>
>
> please provide a date2calendar conversion convenience method like:
> public static Calendar date2Calendar(Date date) {
> Calendar date2Calendar = Calendar.getInstance();
> date2Calendar.setTime(date);
> return date2Calendar;
> }
> This is especially useful in constructors where super() must be the first call, or whenever people want to reduce reoccurring code

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.