Java Yesterday getYesterdayBegin()

Here you can find the source of getYesterdayBegin()

Description

get Yesterday Begin

License

Open Source License

Declaration

public static Date getYesterdayBegin() 

Method Source Code

//package com.java2s;

import java.util.*;

public class Main {

    public static Date getYesterdayBegin() {
        Calendar calendar = Calendar.getInstance();
        calendar.set(Calendar.HOUR_OF_DAY, 0);
        calendar.set(Calendar.MINUTE, 0);
        calendar.set(Calendar.SECOND, 0);
        calendar.set(Calendar.MILLISECOND, 0);
        calendar.add(Calendar.DATE, -1);
        return calendar.getTime();
    }//from   w  ww. j  av a 2 s .  c  o  m
}

Related

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