Android Day Get getIndexDay(Date origin, int index)

Here you can find the source of getIndexDay(Date origin, int index)

Description

get Index Day

Declaration

public static Date getIndexDay(Date origin, int index) 

Method Source Code

//package com.java2s;

import java.util.Calendar;
import java.util.Date;

public class Main {
    public static Date getIndexDay(Date origin, int index) {
        Date dt = origin;/*from  ww  w . j av  a2s. c o  m*/

        Calendar rightNow = Calendar.getInstance();
        rightNow.setTime(dt);
        rightNow.add(Calendar.DAY_OF_YEAR, index);
        Date dt1 = rightNow.getTime();
        // String reStr = sdf.format(dt1);
        //System.out.println(reStr);
        return dt1;
    }
}

Related

  1. getDaySelect(String selectName, String value, boolean hasBlank, String js)
  2. getCurrentDay()
  3. getSmartDateString(long time, String extString, String zeroDayString)
  4. getWeatherDateStr(int day)
  5. getArrayDiffDays(String startDate, String endDate)
  6. getDateOfLastSunday(Date d)
  7. getStartNextDay(Date d2)
  8. getNextDay(Date d2)
  9. getNextDateForDay(int calendarDay)