Java Date After getSpecifiedDayAfter4Date(Date date)

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

Description

get Specified Day After Date

License

Apache License

Declaration

public static Date getSpecifiedDayAfter4Date(Date date) 

Method Source Code

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

import java.util.Calendar;
import java.util.Date;

public class Main {
    public static Date getSpecifiedDayAfter4Date(Date date) {
        try {/*from   www.  ja v a2s. co m*/
            Calendar c = Calendar.getInstance();
            c.setTime(date);
            int day = c.get(Calendar.DATE);
            c.set(Calendar.HOUR, 0);
            c.set(Calendar.MINUTE, 0);
            c.set(Calendar.SECOND, 0);
            c.set(Calendar.DATE, day + 1);
            return new Date(c.getTimeInMillis());
        } catch (Exception e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
            return null;
        }
    }
}

Related

  1. getDateScopeAfterMonth(int year, int month)
  2. getDateTimeAfter(final Date _from, final int _time_type, final int _count)
  3. getMonthAfter(final Date _from, final int _mons)
  4. getNDayAfterCurrentDate(int n)
  5. getSpecifiedDayAfter(Date date, int num)
  6. isAfter(Date d1, Date d2)
  7. isAfter(Date date1, Date date2)
  8. isAfterForDay(Date date, Date ref)
  9. isAfterHour(Date source, int hour)