Java Day of getDeltaNow(int deltaDays)

Here you can find the source of getDeltaNow(int deltaDays)

Description

get Delta Now

License

Open Source License

Declaration

public static String getDeltaNow(int deltaDays) 

Method Source Code


//package com.java2s;

import java.text.SimpleDateFormat;
import java.util.Calendar;

public class Main {
    public static final String YYYYMMDDHHMMSS_FORMAT = "yyyy-MM-dd HH:mm:ss";

    public static String getDeltaNow(int deltaDays) {
        Calendar c = Calendar.getInstance();
        c.add(Calendar.DAY_OF_MONTH, deltaDays);
        return new SimpleDateFormat(YYYYMMDDHHMMSS_FORMAT).format(c.getTime());
    }//from w  w w . ja  va 2 s  .  c o m
}

Related

  1. getDataFile(int tableId, Date day)
  2. getDataTimeForwordDay(Date date, int dayNum)
  3. getDefaultOffsetDays(String strDate)
  4. getDeltaDay(String day, int delta)
  5. getDeltaDays(String date)
  6. getDisplayDate(final Date date, final int offsetDays)
  7. getEndDayofMouth(String date, String inPattern, String outPattern)
  8. getFirstDay(boolean isNeedHH24MISS)
  9. getFirstDay(boolean withTime)