Android Month Date Get getMonthStartDate(Date date)

Here you can find the source of getMonthStartDate(Date date)

Description

get Month Start Date

License

Open Source License

Declaration

public static Date getMonthStartDate(Date date) 

Method Source Code

//package com.java2s;

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

public class Main {
    public static Date getMonthStartDate(Date date) {
        Calendar calendar = calendarDate(date);

        calendar.set(Calendar.DAY_OF_MONTH,
                calendar.getActualMinimum(Calendar.DAY_OF_MONTH));
        Date startDate = calendar.getTime();
        return startDate;
    }/*from w  w  w . j a v  a 2 s .  co m*/

    public static Calendar calendarDate(Date date) {
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(date);
        return calendar;
    }
}

Related

  1. getCurrentMonth(Date date)
  2. monthNumber(Date date)
  3. maxMonthDate(Date date)
  4. getMonthEndDate(Date date)
  5. getCurrentMonth()
  6. monthNumber()
  7. getInterval(String beginMonth, String endMonth)