Java Year Day lastDay(Integer year, int month)

Here you can find the source of lastDay(Integer year, int month)

Description

last Day

License

Open Source License

Declaration

public static int lastDay(Integer year, int month) 

Method Source Code

//package com.java2s;

import java.util.Calendar;

public class Main {

    public static int lastDay(Integer year, int month) {

        Calendar cal = Calendar.getInstance();
        cal.set(year, month - 1, 1);//from  www. j  a  va 2 s .c o m
        cal.add(Calendar.MONTH, 1);
        cal.add(Calendar.DATE, -1);
        return cal.get(Calendar.DAY_OF_MONTH);
    }
}

Related

  1. getWeekNumOfYearDay(String strDate)
  2. getYearFirstDay(String date)
  3. getYearLastDay(String dateString)
  4. getYearWeek(String curday)
  5. getYearWeek(String curday)
  6. lastdayofyear()
  7. lastDayOfYear(Integer year)
  8. todaysYear()