commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <j...@apache.org>
Subject [jira] Commented: (LANG-441) DateUtils Javadoc does not fully define round() behaviour
Date Mon, 11 May 2009 12:37:45 GMT

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

Sebb commented on LANG-441:
---------------------------

And if it is 12 noon on the 15th of the month, does it round up or down?
Or does it do banker's rounding?

> DateUtils Javadoc does not fully define round() behaviour
> ---------------------------------------------------------
>
>                 Key: LANG-441
>                 URL: https://issues.apache.org/jira/browse/LANG-441
>             Project: Commons Lang
>          Issue Type: Bug
>    Affects Versions: 2.4
>            Reporter: Sebb
>             Fix For: 3.0
>
>
> 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 is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message