private static final int FIRST_DAY = Calendar.MONDAY;
public static List<String> getWeekdays() {
Calendar calendar = Calendar.getInstance();
Map<Integer,String> map = new HashMap<Integer,String>();
List<String> list = new ArrayList<String>();
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
while (calendar.get(Calendar.DAY_OF_WEEK) != FIRST_DAY) {
calendar.add(Calendar.DATE, -1);
map.put(0,dateFormat.format(calendar.getTime()));
}
for (int i = 0; i < 7; i++) {
map.put(i,dateFormat.format(calendar.getTime()));
calendar.add(Calendar.DATE, 1);
}
for (Integer key : map.keySet()) {
list.add(map.get(key));
}
return list;
}