You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Sebastian Dietrich (JIRA)" <ji...@apache.org> on 2010/07/06 19:37:50 UTC

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

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.


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

Posted by "Henri Yandell (JIRA)" <ji...@apache.org>.
     [ 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.


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

Posted by "Henri Yandell (JIRA)" <ji...@apache.org>.
     [ 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.