Java Date to Month getMonthStart(Date date)

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

Description

get Month Start

License

Apache License

Declaration

public static Date getMonthStart(Date date) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.*;

public class Main {

    public static Date getMonthStart(Date date) {
        java.util.Calendar calendar = java.util.Calendar.getInstance();
        calendar.setTime(date);//from  w  ww.  j a va2s. c  o m
        calendar.set(Calendar.DAY_OF_MONTH, 1);
        return calendar.getTime();
    }
}

Related

  1. getMonthOfYear(Date dt)
  2. getMonthOfYear(final Date date)
  3. getMonthRate(Date date, boolean moveIn)
  4. getMonths(Date date1, Date date2)
  5. getMonthStart(Date date)
  6. getMonthStartDay(Date date)
  7. getNextMonth(Date baseDate, int Month)
  8. getNextMonth(Date time)
  9. getNextMonth(long date)