Looping/iteration may be a good addition, but it is possible with the
API as is as you demonstrate.
With my current JSR-310 commitments its unlikely I'd have time to look
into this.
Stephen

On 26 January 2013 22:22, Nepomuk Seiler <nepomuk.sei...@mukis.de> wrote:
> Hi,
>
> Joda Time has a lot of nice convenient methods. However one is missing to
> iterate nicely
> over Intervals (or Durations, Periods).
>
> Normally you would do somethink like
>
> Interval interval = ...;
> Days days = Days. daysBetween(interval.getStart(), interval.getEnd());
> for(int i=0; i < days.getDays(); i++) {
>   // do something
> }
>
> or adding up DateTimes and compare, etc.
>
> It would be nice to have an iterator for this. Like:
>
> Iterator<DateTime> iter = Intervals.daysIn(interval);
>
> So I can call
>
> for(DateTime day : Intervals.daysIn(interval)) {
>    // work with day
> }
>
>
> what do you think?
> Muki
>
> ------------------------------------------------------------------------------
> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
> MVPs and experts. ON SALE this month only -- learn more at:
> http://p.sf.net/sfu/learnnow-d2d
> _______________________________________________
> Joda-interest mailing list
> Joda-interest@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/joda-interest
>

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
_______________________________________________
Joda-interest mailing list
Joda-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/joda-interest

Reply via email to