Java Yesterday yesterday()

Here you can find the source of yesterday()

Description

yesterday

License

Apache License

Declaration

public static String yesterday() 

Method Source Code

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

import java.text.SimpleDateFormat;

import java.util.Calendar;

public class Main {
    public static SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");

    public static String yesterday() {
        Calendar day = Calendar.getInstance();
        day.add(Calendar.DATE, -1);
        return df.format(day.getTime());
    }/*from www.j a v a 2s . co m*/
}

Related

  1. getYesterdaysDate()
  2. getYesterdayStartDate()
  3. getYesterdayString()
  4. isYesterday(Date date)
  5. yesterday()
  6. yesterday()
  7. yesterDay()
  8. yesterday()
  9. yesterday()