Is there an analogous form of the following code:
if(month == 4,6,9,11)
{
do something;
}
Or must it be:
if(month == 4 ||
No question about dates and Java would be complete without mentioning Joda Time.
for(int i = DateTimeConstants.JANUARY; i <= DateTimeConstants.DECEMBER; i++) {
LocalDate localDate = new LocalDate().withMonthOfYear(i);
System.out.println(" " +localDate.toString("MMMM") + " - " + localDate.dayOfMonth().getMaximumValue());
}
January - 31
February - 29
March - 31
April - 30
May - 31
June - 30
July - 31
August - 31
September - 30
October - 31
November - 30
December - 31