Calendar - Get day of month AND month
So I have a simple calendar that I'm working on. I have it so that the current day is marked in blue. However, it will take the date (let's say today is the 3rd) and mark the 3rd of every month as blue. I think that the problem lies here;
// Current Month Days
for (int i = 1; i <= daysInMonth; i++) {
Log.d(currentMonthName, String.valueOf(i) + " "
+ getMonthAsString(currentMonth) + " " + yy);
if (i == getCurrentDayOfMonth()) {
list.add(String.valueOf(i) + "-BLUE" + "-"
+ getMonthAsString(currentMonth) + "-" + yy);
} else {
list.add(String.valueOf(i) + "-WHITE" + "-"
+ getMonthAsString(currentMonth) + "-" + yy);
}
}
Is there a way I can add like if (i == getCurrentDayOfMonth() + getMonth()) to get it to read the current month as well? Or is there another solution?