Java Month Calculate beforeAMonth()

Here you can find the source of beforeAMonth()

Description

before A Month

License

Apache License

Declaration

public static long beforeAMonth() 

Method Source Code

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

import java.util.*;

public class Main {

    public static long beforeAMonth() {
        Calendar cal = Calendar.getInstance();
        Date currentDate = new Date();
        cal.setTime(currentDate);/*  w  w w. j a  va2s.  c o  m*/
        cal.add(Calendar.MONTH, -1);
        Date date = cal.getTime();
        return date.getTime();
    }
}

Related

  1. alignMonth(Calendar timestamp)
  2. calendarMonthToInt(int calendarMonth)
  3. currentMonth()
  4. divideIntoMonthlyIntervals(Date start, Date end)
  5. endOfLastMonth()