[
https://issues.apache.org/jira/browse/OFBIZ-715?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12586135#action_12586135
]
Adrian Crum commented on OFBIZ-715:
-----------------------------------
Valentina,
Leap years and leap seconds are handled by the Java Calendar and TimeZone
classes automatically.
This issue is concerned with elapsed time and how to compute it using the Java
Calendar class. It made sense to me to have it behave in the same but opposite
manner as the date/time calculations performed in the Calendar class. For
example, if a Calendar instance is initialized to March 31, then you set the
month to -1 (subtract one month) the result will be February 28 or 29 -
depending on the year. Conversely, given two Calendar instances, one
initialized to February 28 and the other initialized to March 31, the elapsed
time should be one month. The class I developed performs the calculation pretty
well, but there are exceptions where the elapsed time is not what you would
expect.
> 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.