Java Yesterday getYesterdayDate(Date date)

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

Description

get Yesterday Date

License

Apache License

Declaration

public static Date getYesterdayDate(Date date) throws ParseException 

Method Source Code

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

import java.text.ParseException;

import java.util.Date;

public class Main {
    public static Date getYesterdayDate(Date date) throws ParseException {
        //SimpleDateFormat format1 = new SimpleDateFormat("yyyy-MM-dd");
        date = new Date(-1000L * 60 * 60 * 24 + date.getTime());
        return date;
    }//from   w w  w .j  av a2s. com
}

Related

  1. getYesterday(Date date, Boolean isBefore, int interval)
  2. getYesterDay(String pattern)
  3. getYesterday6AM()
  4. getYesterdayBegin()
  5. getYesterdayCompactTime()
  6. getYesterdayDate(int day)
  7. getYesterdayDate(String format)
  8. getYesterdayDateAsString()
  9. getYesterdayFormat(String format)