Java Date Previous getPreviousDateStart()

Here you can find the source of getPreviousDateStart()

Description

get Previous Date Start

License

Apache License

Declaration

public static Date getPreviousDateStart() 

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 getPreviousDateStart() {
        Calendar cal = Calendar.getInstance();
        cal.add(Calendar.DATE, -2);
        cal.set(Calendar.HOUR_OF_DAY, 0);
        cal.set(Calendar.MINUTE, 0);
        cal.set(Calendar.SECOND, 0);
        cal.set(Calendar.MILLISECOND, 0);
        return cal.getTime();
    }//from ww  w.  j  av a2s  .c o m
}

Related

  1. getPrevDay(Date date)
  2. getPrevDueDate(int payperiod, long time)
  3. getPreviousDate(Date date)
  4. getPreviousDate(final Date date)
  5. getPreviousDate(int period)
  6. getPreviousDay(Date date)
  7. getPreviousDay(Date dateTime)
  8. getPreviousDay(Date inputDate)
  9. getPreviousFriday(final Date d)