Java Month Calculate getLastMonthBegin()

Here you can find the source of getLastMonthBegin()

Description

get Last Month Begin

License

Open Source License

Declaration

public static Date getLastMonthBegin() 

Method Source Code

//package com.java2s;

import java.util.*;

public class Main {

    public static Date getLastMonthBegin() {
        Calendar calendar = Calendar.getInstance();
        calendar.add(Calendar.MONTH, -1);
        calendar.set(Calendar.DAY_OF_MONTH, 1);
        calendar.set(Calendar.HOUR_OF_DAY, 0);
        calendar.set(Calendar.MINUTE, 0);
        calendar.set(Calendar.SECOND, 0);
        calendar.set(Calendar.MILLISECOND, 0);
        return calendar.getTime();
    }//from   ww  w. ja v  a 2  s .com
}

Related

  1. getDateMonthShift(int Shift)
  2. getDiffInMonths(Date firstDate, Date lastDate)
  3. getDisplayMonth(int month)
  4. getIntMonthShift(Date Shift)
  5. getlastDateofThisMonth()
  6. getMonthFormat(String date)
  7. getMonthlyIntervals(Date start, Date end)
  8. getMonthNumber()
  9. getMonthsMap()