Uploaded image for project: 'Commons Lang'
  1. Commons Lang
  2. LANG-383

[PATCH] Adding functionality to DateUtils to allow direct setting of various fields.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.3
    • 2.4
    • None
    • None
    • Apple OSX 10.4.11 java 1.5.0_07

    Description

      I'm submitting a patch for commons-lang's DateUtils to add a few methods that make setting various fields in a Date object a bit cleaner than "normal ways" I've seen it done. The methods behave exactly like the add* methods do, except the calendar that is used is set to non-lenient.

      The patch doesn't contain much, just a few trivial methods I always carried around as an enhancement to commons-lang's DateUtils. Perhaps someone else will find these useful, or not. A patch to the DateUtilsTest is included as well along with output from running the test and the corresponding test suite.

      Attachments

        1. DateUtilsTest.java.patch
          6 kB
          Travis Meisenheimer
        2. DateUtils.java.patch
          5 kB
          Travis Meisenheimer
        3. DateUtils.java.patch
          5 kB
          Travis Meisenheimer

        Activity

          People

            Unassigned Unassigned
            tmeisenh Travis Meisenheimer
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: