You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Daniel Dowd (JIRA)" <ji...@apache.org> on 2018/03/17 23:12:00 UTC

[jira] [Commented] (LANG-986) DurationFormatUtils.formatDuration accepts formats with year/month but cannot use them

    [ https://issues.apache.org/jira/browse/LANG-986?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16403783#comment-16403783 ] 

Daniel Dowd commented on LANG-986:
----------------------------------

Is this improvement something that can be worked on? If so I would like to take it on.

> DurationFormatUtils.formatDuration accepts formats with year/month but cannot use them
> --------------------------------------------------------------------------------------
>
>                 Key: LANG-986
>                 URL: https://issues.apache.org/jira/browse/LANG-986
>             Project: Commons Lang
>          Issue Type: Improvement
>          Components: lang.time.*
>            Reporter: Sebb
>            Priority: Major
>             Fix For: Discussion
>
>
> The method DurationFormatUtils.formatDuration does not validate that the format is applicable. The method does not calculate months and years, so these values will be 0 if the format contains y or M.
> Perhaps the method should throw IAE if one of the unused format chars is used?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)