Java Calendar Month getLastMonthDays(Calendar c)

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

Description

get Last Month Days

License

Open Source License

Declaration

public static int getLastMonthDays(Calendar c) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.Calendar;

public class Main {

    public static int getLastMonthDays(Calendar c) {
        Calendar calendar = c;//www . java 2  s . c om
        calendar.set(Calendar.MONTH, calendar.get(Calendar.MONTH) - 1);
        return calendar.getActualMaximum(Calendar.DAY_OF_MONTH);
    }
}

Related

  1. getFirstDayOfMonth(final Calendar calendar, final Date date)
  2. getLastDateOfMonth(Calendar calendar)
  3. getLastDayOfMonth(Calendar c)
  4. getLastDayOfMonth(Calendar c)
  5. getLastDayOfMonth(Calendar calendar)
  6. getMonth(Calendar c)
  7. getMonth(Calendar cal)
  8. getMonth(Calendar calendar)
  9. getMonthBegin(Calendar c)