The is no method in Joda-Time to do this.
Period period = ...
Interval interval = ....
DateTime start = interval.getStart();
int count = 0;
start = start.plus(period);
while (start.isBefore(interval.getEnd())) {
count++;
start = start.plus(period);
}
Stephen
[EMAIL PROTECTED] wrote:
What's the best way to compute the number of Periods in an interval?
This is easy for the standard Periods (day, week, ...), but suppose I have an
arbitrary duration Period?
--
John Alan McDonald
[EMAIL PROTECTED]
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Joda-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/joda-interest
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Joda-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/joda-interest