Java Date to Month getMonth(Date d)

Here you can find the source of getMonth(Date d)

Description

get Month

License

Open Source License

Declaration

public static Date[] getMonth(Date d) 

Method Source Code

//package com.java2s;

import java.util.Calendar;
import java.util.Date;

public class Main {

    public static Date[] getMonth(Date d) {
        Date[] dS = new Date[2];
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(d);// w w w.  ja  v  a2s.  co m
        calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMinimum(Calendar.DAY_OF_MONTH));
        dS[0] = calendar.getTime();
        calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMaximum(Calendar.DAY_OF_MONTH));
        dS[1] = calendar.getTime();
        return dS;
    }
}

Related

  1. getMondayDate(String date)
  2. getMontByDate(Date curDate)
  3. getMonth(Date aDate)
  4. getMonth(Date d)
  5. getMonth(Date d)
  6. getMonth(Date d)
  7. getMonth(Date date)
  8. getMonth(Date date)
  9. getMonth(Date date)