Infolinks In Text Ads

Jun 24, 2010

How to get number of days in month java code, Examples?

public static int getNoOfDays(int month, int year){
    Calendar calendar = Calendar.getInstance();
    int date = 1;
    calendar.set(year, month, date);
    int days = calendar.getActualMaximum(Calendar.DAY_OF_MONTH);
    return days;

No comments:

Post a Comment


Related Posts Plugin for WordPress, Blogger...