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

exclude empty parts in DurationFormatUtils

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 3.6
    • None
    • lang.time.*
    • None

    Description

      DurationFormatUtils only allow to exclude leading or trailing zeroes, but not empty parts alltogether, e.g. when a position is 0 (0 days or hours).

      This would improve readability and look better in most cases where the duration can vary between seconds or days and I don't want to special case, e.g. having it print
      2s instead of 0d 0h 00m 02s.

      Attachments

        Activity

          People

            Unassigned Unassigned
            grexe Gregor B. Rosenauer
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: