Android Day Get dayIndexToDate(int dayindex)

Here you can find the source of dayIndexToDate(int dayindex)

Description

day Index To Date

Declaration

public static String dayIndexToDate(int dayindex) 

Method Source Code

//package com.java2s;

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

public class Main {
    public static String dayIndexToDate(int dayindex) {
        // hardcoded date for now
        int year = 2013;
        int month = 7;
        int day = 6;

        Calendar cal = Calendar.getInstance();
        cal.set(year, month - 1, day);/*w  w  w .  j  a va  2  s  .c o  m*/
        cal.add(Calendar.DAY_OF_MONTH, dayindex - 1);
        return new SimpleDateFormat("EEEEEEEE dd").format(cal.getTime());
    }
}

Related

  1. getTimeNextDay(long lTimeMillis)
  2. getDaysTo(Date date)
  3. intDayToString(int day)
  4. leapDays(int y)
  5. getDay()