Java Utililty Methods Day Offset

List of utility methods to do Day Offset

  1. HOME
  2. Java
  3. D
  4. Day Offset

Description

The list of methods to do Day Offset are organized into topic(s).

Method

String getOffsetDayOffNow(int offset)
get Offset Day Off Now
Calendar c = Calendar.getInstance();
c.add(Calendar.DAY_OF_MONTH, offset);
return new SimpleDateFormat("yyyy-MM-dd 00:00:00").format(c.getTime());
int getOffsetDays(String strDate, String strDate2, String pFormat)
get Offset Days
SimpleDateFormat fmt = new SimpleDateFormat(pFormat);
SimpleDateFormat fmt2 = new SimpleDateFormat(pFormat);
Date param_date1 = fmt.parse(strDate);
Date param_date2 = fmt2.parse(strDate2);
return getOffsetDays(param_date1, param_date2);

AltStyle によって変換されたページ (->オリジナル) /