Java Today plusDaysToday(int days)

Here you can find the source of plusDaysToday(int days)

Description

plus Days Today

License

Apache License

Declaration

public static Date plusDaysToday(int days) 

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 plusDaysToday(int days) {
        return plusDays(getToday(), days);
    }//from   w  ww . j a v a2s. c  om

    public static Date plusDays(Date date, int days) {
        return changeDays(date, days);
    }

    public static Date getToday() {
        return new Date();
    }

    private static Date changeDays(Date date, int days) {
        Calendar cal = Calendar.getInstance();
        cal.setTime(date);
        cal.add(Calendar.DAY_OF_YEAR, days);
        return cal.getTime();
    }
}

Related

  1. isToday(long timestamp)
  2. isToday(String depDateTime)
  3. isToday(String sdate)
  4. isToday(String sdate)
  5. parseToday(String s)
  6. sameTimeToday(Date time)
  7. startOfToday()
  8. today()
  9. today()