Here you can find the source of dayIndexToDate(int dayindex)
public static String dayIndexToDate(int dayindex)
//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()); } }