Java Calendar Month lastDayOfMonth(Calendar c)

Here you can find the source of lastDayOfMonth(Calendar c)

Description

last Day Of Month

License

Open Source License

Declaration

public static synchronized int lastDayOfMonth(Calendar c) 

Method Source Code

//package com.java2s;

import java.util.Calendar;

public class Main {
    public static synchronized int lastDayOfMonth(Calendar c) {
        // final int[] daysPerMonth = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31,
        // 30, 31};
        // int month = c.get(Calendar.MONTH);
        // return daysPerMonth[month];
        return c.getActualMaximum(Calendar.DATE);
    }/*w  ww.j  a va2s .  c om*/
}

Related

  1. getStartOfMonth(Date day, Calendar cal)
  2. incrementMonth(Calendar cal)
  3. incrementMonthByVal(Calendar theCal, int val)
  4. intToCalendarMonth(int month)
  5. isFirstDayOfMonth(Calendar calendar)
  6. month(Calendar calendar)
  7. month(Calendar date)
  8. numberOfDaysInMonth(Calendar cal)
  9. sameMonth(Calendar one, Calendar two)