Java Day of tomorrow(int dayafter)

Here you can find the source of tomorrow(int dayafter)

Description

tomorrow

License

Open Source License

Declaration

public static Calendar tomorrow(int dayafter) 

Method Source Code


//package com.java2s;
import java.text.SimpleDateFormat;
import java.util.Calendar;

public class Main {
    public static String tomorrow(int dayafter, String pattern) {
        Calendar cal = tomorrow(dayafter);
        return new SimpleDateFormat(pattern).format(cal.getTime());
    }/*  www  . j a  v a2s  .co  m*/

    public static Calendar tomorrow(int dayafter) {
        Calendar cal = Calendar.getInstance();
        cal.add(Calendar.DATE, dayafter + 1);
        cal.set(Calendar.HOUR_OF_DAY, 0);
        cal.set(Calendar.MINUTE, 0);
        cal.set(Calendar.SECOND, 0);
        cal.set(Calendar.MILLISECOND, 0);
        return cal;
    }
}

Related

  1. strToShortday(String s)
  2. subtractDate(Date d, long day)
  3. toCurrentDatedefer(int day)
  4. ToEnglishDay(Date dt)
  5. ToEnglishDayWithMon(Date dt)
  6. toNextDayYMD()
  7. toUtcDay(Date d)
  8. truncateToBeginOfDay(Date date)