Java Day Next nextDay(Date date)

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

Description

next Day

License

Apache License

Declaration

public static Date nextDay(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 nextDay() {
        return dateAdd(new Date(), 1);
    }//from ww  w  .j av a  2 s . c  o m

    public static Date nextDay(Date date) {
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(date);
        calendar.add(Calendar.DAY_OF_MONTH, 1);
        date = calendar.getTime();
        return date;
    }

    public static Date dateAdd(Date date, int val) {
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(date);
        calendar.add(Calendar.DAY_OF_MONTH, val);
        date = calendar.getTime();
        return date;
    }
}

Related

  1. getNextDay(String nowdate, String delay)
  2. getNextDayZeroPoint()
  3. nextDay(Date d)
  4. nextDay(Date date)
  5. nextDay(Date date)
  6. nextDay(Date date)
  7. nextDay(Date date)
  8. nextDay(Date then)