Java Month Day firstDayOfMonth(Date date)

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

Description

first Day Of Month

License

Apache License

Declaration

public static Date firstDayOfMonth(Date date) 

Method Source Code

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

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

public class Main {

    public static Date firstDayOfMonth(Date date) {
        Calendar c = Calendar.getInstance();
        c.setTime(date);/*from  www .java  2  s  .c o  m*/
        c.set(Calendar.DAY_OF_MONTH, 1);
        return c.getTime();
    }
}

Related

  1. addMonthsAndDays(Date date, int months, int days)
  2. addMonthToDayOfMonth(Calendar c, int dayOfMonth, int monthInterval)
  3. daysInMonth(GregorianCalendar c)
  4. firstDayOfMonth(Date date)
  5. firstMonthDay(String dateTime, int num)
  6. getActualMaximumDayOfMonth(final Date date)
  7. getCurMonthFirstDay()
  8. getCurrentDayOfMonth()