Java Yesterday getYesterDay()

Here you can find the source of getYesterDay()

Description

get Yester Day

License

Apache License

Declaration

public static String getYesterDay() 

Method Source Code

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

import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {
    private static Date date = new Date();
    public final static SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");

    public static String getYesterDay() {
        String operationtime = dateFormat.format(new java.util.Date(date.getTime() - 24 * 60 * 60 * 1000));
        return operationtime;
    }//from   ww  w  .jav  a2  s  . c  o m
}

Related

  1. getYesterday()
  2. getYesterday()
  3. getYesterday()
  4. getYesterday()
  5. getYesterday()
  6. getYesterday()
  7. getYesterday(Date date)
  8. getYesterday(Date date, Boolean isBefore, int interval)
  9. getYesterDay(String pattern)