Java Day of getPriorDay(int offset, String pattern)

Here you can find the source of getPriorDay(int offset, String pattern)

Description

get Prior Day

License

Open Source License

Declaration

public static String getPriorDay(int offset, String pattern) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

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

public class Main {
    public static String getPriorDay(int offset, String pattern) {
        SimpleDateFormat timeFormat = new SimpleDateFormat(pattern);
        Calendar theday = Calendar.getInstance();
        theday.add(5, offset);/*from   w  ww  .ja v  a2s. co m*/
        return timeFormat.format(theday.getTime());
    }
}

Related

  1. getLateInTheDay(Date date)
  2. getLatest7Day()
  3. getNDayAfterCurrentDate(String dateStr, String dateFormat, int n)
  4. getOtherDayLastUpdateTimeFormat()
  5. getPaxBirthday()
  6. getRunningTime(Date date, SimpleDateFormat sday, String line)
  7. getSetDate(Date dt, int dayNum)
  8. getSignContinusDay(Date lastSignTime)
  9. getSpcilNumDayArray(Date startDate, int num)