Java tutorial
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Arrays; import java.util.Calendar; import java.util.Date; import java.util.List; public class Main { public static List<String> getOldWeekDays() { final Calendar c = Calendar.getInstance(); String[] months = new String[8]; for (int i = 0; i < 8; i++) { months[i] = new SimpleDateFormat("MM.dd").format(new Date(c.getTimeInMillis())); c.add(Calendar.DAY_OF_MONTH, -1); } return Arrays.asList(months); } }