You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Sebb (JIRA)" <ji...@apache.org> on 2017/07/04 10:53:00 UTC

[jira] [Updated] (LANG-1344) exclude empty parts in DurationFormatUtils

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

Sebb updated LANG-1344:
-----------------------
    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}}.


  was:
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}}.



> exclude empty parts in DurationFormatUtils
> ------------------------------------------
>
>                 Key: LANG-1344
>                 URL: https://issues.apache.org/jira/browse/LANG-1344
>             Project: Commons Lang
>          Issue Type: Improvement
>          Components: lang.time.*
>    Affects Versions: 3.6
>            Reporter: Gregor B. Rosenauer
>            Priority: Minor
>
> }}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}}.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)