Célio Cidral Junior wrote: > Nevermind. I think the most sensible way to do that is: > > LocalTime start = ...; > LocalTime end = ...; > > Duration duration = new Period(start, end).toDurationFrom(new Instant(0)); > > Anyway, would it make sense to have a more straightforward way to get > a duration from two partials? Something like: > > Duration duration = new Duration(partial1, partial2);
The problem with this suggestion is that the duration between the start and end time is not fully known. For example, the duration between 00:00 and 03:00 is normally 3 hours, but could be 2 or 4 depending on DST cutover. Writing a method as you suggest, would be making an assumption in exactly the same way that you make the assumption by adding new Instant(0). Stephen ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Joda-interest mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/joda-interest
