Java Month Calculate getCurrentMonth()

Here you can find the source of getCurrentMonth()

Description

get Current Month

License

Open Source License

Declaration

@SuppressWarnings("deprecation")
public static int getCurrentMonth() 

Method Source Code

//package com.java2s;

import java.util.*;

public class Main {

    @SuppressWarnings("deprecation")
    public static int getCurrentMonth() {
        return getCurrentDate().getMonth();
    }/* w w w. java 2 s  . c o  m*/

    @SuppressWarnings("deprecation")
    public static int getMonth(int i) {
        return getCurrentDate().getMonth();
    }

    public static Date getCurrentDate() {
        return new Date(System.currentTimeMillis());
    }
}

Related

  1. currentMonth()
  2. divideIntoMonthlyIntervals(Date start, Date end)
  3. endOfLastMonth()
  4. getAgeInMonths(Date startDate, Date endDate)
  5. getAlphaMonth(String mon)
  6. getCurrentMonth()
  7. getCurrentMonthName()
  8. getDateMonthShift(int Shift)
  9. getDiffInMonths(Date firstDate, Date lastDate)