Java Yesterday yesterDay()

Here you can find the source of yesterDay()

Description

yester Day

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;

import java.util.GregorianCalendar;

public class Main {
    public static String yesterDay() {
        Calendar calendar = new GregorianCalendar();
        calendar.add(Calendar.DATE, -1);

        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd");
        return simpleDateFormat.format(calendar.getTime());
    }//from   w ww. j ava  2  s .  c  o  m
}

Related

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