[ https://issues.apache.org/jira/browse/OFBIZ-715?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12558939#action_12558939 ]
Jacques Le Roux commented on OFBIZ-715: --------------------------------------- Hi Adrian, I did a quick review. DO you think that adding a bloc if (calStart.getTimeInMillis() >= targetMillis) { return; } before // compute elapsed years int targetYear = calEnd.get(Calendar.YEAR); while (calStart.get(Calendar.YEAR) != targetYear && calStart.getTimeInMillis() < targetMillis) { calStart.add(Calendar.YEAR, 1); years++; } could solve this issue ? I did not think much about it, it's just that it's present in other cases. BTW how do you test it, have you an existing mean for that ? Thanks > Utils for doing date calculations based on timeUomIds > ----------------------------------------------------- > > Key: OFBIZ-715 > URL: https://issues.apache.org/jira/browse/OFBIZ-715 > Project: OFBiz > Issue Type: Improvement > Components: framework > Reporter: Andrew Sykes > Assignee: Jacques Le Roux > Priority: Minor > Attachments: elapsed_time.patch, UtilDateTime.java.patch, > UtilDateTime.java.patch > > > 6 new methods, > 1/ adjustDateTime (3 methods) adjusts either a Timestamp Date or Calendar by > the given timeUomId and timeUomMultiple > 2/ getTimeUomMultipleDifference (3 methods) gets the timeUomMultiple for two > Timestamp Date or Calendar objects given the timeUomId. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.