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

Adrian Crum updated OFBIZ-715:
------------------------------

    Attachment: elapsed_time.patch

Jacques,

elapsed_time.patch is the solution I came up with. Take a look at it.

I worked on this code back in July. As far as I know, it works accurately 
except when the ending date is Feb 29 and the beginning date is Feb 28. The 
result should be one year. Incrementing the ending date one day (March 1) 
should result in 1 year + 1 day. The current version returns one year for both 
ending dates. I ran out of time trying to come up with a fix.

If anyone wants to continue developing it they are welcome to do so.



> 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
>            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.

Reply via email to