Java tutorial
//package com.java2s; //License from project: Apache License import java.util.Calendar; public class Main { public static int getDaysByYearMonth(Calendar calendar) { return calendar.getActualMaximum(Calendar.DATE); } }