All;
I have used joda for some projects. I have a requierment to calculate the
third Friday of any month. Is below the most effecient
DateTime dateStart = new DateTime(2010, 1, 1, 0, 0, 0, 0);
for (int ii=0;ii<11;ii++) {
DateTime dt= dateStart.plusMonths(ii);
DateTime last = dt.dayOfMonth().withMaximumValue();
DateTime first = dt.dayOfMonth().withMinimumValue();
for(int jj=1;jj<8;jj++) {
if
(first.plusDays(jj).dayOfWeek().getAsText().startsWith("F")==true ) {
DateTime thirdfriday = first.plusDays(jj+14);
System.out.println("Third Friday:
"+thirdfriday);
}
}
}
Thanks
Rocky
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Joda-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/joda-interest