[
https://issues.apache.org/jira/browse/LANG-441?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Gary D. Gregory resolved LANG-441.
----------------------------------
Fix Version/s: 3.21.1
(was: Patch Needed)
Resolution: Fixed
Fix in git master at d97a916dedd5063b1320b34201ba41adb7281572 and snapshot
builds.
> DateUtils Javadoc does not fully define round() behavior
> --------------------------------------------------------
>
> Key: LANG-441
> URL: https://issues.apache.org/jira/browse/LANG-441
> Project: Commons Lang
> Issue Type: Improvement
> Components: lang.time.*
> Affects Versions: 2.4
> Reporter: Sebb
> Priority: Major
> Fix For: 3.21.1
>
>
> The Javadoc for DateUtils.round() does not define the behavior fully.
> For example, what is the result of:
> round(MINUTE) on 28 Mar 2002 13:10:12.499
> round(MINUTE) on 28 Mar 2002 13:10:12.500
> round(MINUTE) on 28 Mar 2002 13:10:12.501
> round(HOUR) on 28 Mar 2002 13:29:59.999
> round(HOUR) on 28 Mar 2002 13:30:00
> round(HOUR) on 28 Mar 2002 13:30:01
> How are MONTHs/YEARs rounded? Is the time taken into account?
> Does the rounding for February depend on whether there is a leap year?
> What does it mean to round to SEMI_MONTH?
--
This message was sent by Atlassian Jira
(v8.20.10#820010)