I\'m trying to use either Calendar or Gregorian Calendar to iterate and create a date grid. However, both of them seem to think that August, 2010 has 30 days, and that Septembe
I strongly suspect you're not taking into account the fact that the month is 0-based. So this:
startDate.set(2010, 8, 28);
is setting it to September 28th 2010. You haven't said what you expect it to be, but I suspect you wanted August (which is month 7 in java.util.Calendar).
I suspect this is the problem, given that October 2nd and 3rd are Saturday and Sunday.
Can I strongly recommend that you use Joda Time as your date and time API instead of java.util.{Date,Calendar}? The built-in classes have lots of gotchas like this.