Jason Bennett wrote:
> Stephen Colebourne <scolebourne <at> joda.org> writes:
>>The problem is explaining the issue in the API. How do you easily
>>communicate that a day might not be a fixed number of milliseconds (it
>>may vary by zone, or by chronology).
> 
> In terms of days, I agree. They're tricky and the docs just have to say that.
> However, since I was dealing in hours, I don't think that was a problem.

Unfortunately, the number of minutes in an hour, or seconds in a minute 
may also vary by chronology. However, this is theoretical as no 
chronology has yet done this. So, there is probably a case for 
simplification.

> Frankly, the method I was looking for was a companion to Period.hours on
> Duration (Duration.hours) that would construct a duration given an integer. It
> would just do the millisecond arithmatic for you.

We'll have to look into that as a possibility.

>>Any other feedback? (from anyone on the list!)
> 
> Another thing that might be nice is to expose the conversion constants
> publically (minutes -> seconds, hours->millis, etc). At least if I had to do 
> the
> math myself, I wouldn't have to redefine 3600 in yet another application.

We do! See DateTimeConstants.

Stephen

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Joda-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/joda-interest

Reply via email to