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);

What do you think?

Cidral

2007/8/17, Célio Cidral Junior <[EMAIL PROTECTED]>:
> Is it possible to calculate a duration from two local times? Something like:
>
> duration = endLocalTime - startLocalTime
>
> I tried many things but could not come with a solution. Searching the
> docs and googling also didn't help.
>
> Regards,
>
> Cidral
>

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

Reply via email to