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

Add DateUtils.ceiling() method

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.4
    • 2.5
    • lang.time.*
    • None

    Description

      It would be nice to have a DateUtils.ceiling methods which would be the opposite of truncate (which is equivalent to floor)

      DateUtils.ceiling(Date d, int field);

      For example, if you had the datetime of 28 Mar 2002 13:45:01.231, if you passed with HOUR, it would return 28 Mar 2002 13:59:59.999. If this was passed with MONTH, it would return 31 Mar 2002 23:59:59.999.

      Attachments

        1. LANG-434-rs.patch
          21 kB
          Robert Scholte

        Issue Links

          Activity

            People

              Unassigned Unassigned
              prophecy Travis Reeder
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: